fix(terminal): recover from transient macOS login preflight failures#9404
Open
brennanb2025 wants to merge 1 commit into
Open
fix(terminal): recover from transient macOS login preflight failures#9404brennanb2025 wants to merge 1 commit into
brennanb2025 wants to merge 1 commit into
Conversation
brennanb2025
force-pushed
the
brennanb2025/macos-login-preflight-followup
branch
from
July 19, 2026 02:00
e34f0ff to
d010bf3
Compare
Contributor
📝 WalkthroughWalkthroughThe changes add typed macOS TCC preflight results with failure classification, retry backoff, concurrent request sharing, and daemon log reporting. Local PTY spawning now deduplicates stable-session requests and cancels stale-generation preparations. Daemon PTY preparation tracking is scoped to control clients, allowing disconnect and reconnect cleanup without canceling unrelated preparations. Tests cover retries, reporting, spawn deduplication, generation cancellation, and client disconnect handling. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #9301. This keeps the macOS TCC attribution fix enabled after temporary PAM probe failures and closes the small spawn-lifecycle races identified in post-merge review.
macos-login-preflightdaemon event containing onlyenabled,reason,retryable, and optionalretryAfterMs.ELI5
The first version asks macOS whether Orca can launch shells in the privacy-friendly way. If macOS was merely slow once, Orca remembered that as a permanent no until restart. This follow-up remembers only real yes/no answers. Temporary failures use the normal shell so terminals still open, then Orca tries again later.
It also makes sure two requests cannot accidentally create two shells for the same terminal, and that a request abandoned by a reload or disconnect cannot finish in the background.
Safety and performance
Validation
/usr/bin/loginpreflight: success in 56 ms with the production 500 ms timeout and 1 KiB output cap.pnpm run typecheck:nodepnpm exec oxlinton all changed filespnpm exec oxfmt --checkon all changed filespnpm run check:max-lines-ratchetpnpm run check:reliability-gatesgit diff --checkScreenshots
No visual change.
AI Review Report
Security Audit
Notes