Repository navigation
Conversation
nwparker
added a commit
that referenced
this pull request
May 31, 2026
* fix: address pr-bug-scan validated finding from #2835 * test: cover async macOS resolver health check --------- Co-authored-by: orca-bug-scan-bot <[email protected]> Co-authored-by: Neil <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
* fix: address pr-bug-scan validated finding from stablyai#2835 * test: cover async macOS resolver health check --------- Co-authored-by: orca-bug-scan-bot <[email protected]> Co-authored-by: Neil <[email protected]>
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
Fixes #2797.
Detects when an existing macOS terminal daemon has lost access to the system resolver namespace and replaces it instead of reusing it. The health check runs inside the daemon process so Orca checks the same resolver context that daemon-spawned PTYs inherit.
The follow-up review also covered the live-session case: fresh daemon-backed PTY spawns now perform the resolver-health gate before creating the new session, so a daemon that degrades while Orca remains open is replaced before it can spawn another broken terminal. Attach-style spawns are not health-gated, so existing session reattach/restore paths do not replace the daemon out from under a still-live PTY.
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildRan:
pnpm vitest run --config config/vitest.config.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/ipc/pty.test.ts src/main/network/macos-system-resolver-health.test.ts src/main/daemon/daemon-health.test.ts src/main/daemon/daemon-init.test.ts src/main/daemon/daemon-server.test.tspnpm lintpnpm typecheckpnpm testpnpm buildgit diff --checksystemResolverHealth: unhealthy, launched the fixed app, confirmed it replaced the bad daemon, then confirmed the replacement daemon reported healthy and a daemon-spawned PTY resolved/pingedgoogle.comsuccessfully.verifycheck passed on this PR branch.AI Review Report
Ran a review-until-clean pass. The review found one correctness issue: the first version only replaced bad daemons at app startup, so a daemon that lost resolver access while Orca stayed open could still create broken new PTYs. Fixed by marking fresh daemon-backed session spawns and having
DaemonPtyAdaptercheck daemon-reported resolver health before creating those new sessions. The review rechecked daemon startup/reuse, live spawn behavior, attach/restore behavior, router behavior, concurrency, macOS/Linux/Windows compatibility, and SSH/remote boundaries.Security Audit
The new IPC request remains behind the existing daemon socket token handshake. The macOS resolver probe executes a fixed system binary (
/usr/sbin/scutil) with fixed args, no user-controlled command string, ignored stdin, and a timeout. Failed, missing, or inconclusive health checks fail open asunknowninstead of killing a daemon unexpectedly. The live-spawn gate only runs for local daemon-backed fresh sessions; SSH providers and attach-style session restores are not routed through it.Notes
Bumps the daemon protocol from v8 to v9 so new app launches do not reuse daemons that cannot report their own macOS resolver health. v8 remains listed as a previous daemon protocol for legacy session compatibility.