fix: cancel host process trees and scope daemon cleanup - #83
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f5c27d502
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd1c285fc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8091e3a5ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## [4.2.0](v4.1.1...v4.2.0) (2026-09-08) ### Features * add runtime and host command observability ([19f38d5](19f38d5)) * add runtime and host command observability ([#84](#84)) ([38d49be](38d49be)) ### Bug Fixes * cancel host process trees and scope daemon cleanup ([7f5c27d](7f5c27d)) * cancel host process trees and scope daemon cleanup ([#83](#83)) ([12822d4](12822d4)) * cancel verified TTY command descendants ([bd1c285](bd1c285)) * exclude lifecycle placeholders from orphan cleanup ([a25609b](a25609b)) * own terminal command groups before forwarding cancellation ([1cc238d](1cc238d)) * preserve command outcomes and resource diagnostics ([c52e5ac](c52e5ac)) * preserve controlling terminals with piped command input ([3e7f080](3e7f080)) * preserve nested host command usage attribution ([f4f487d](f4f487d)) * recognize exact Linux daemon socket names ([a5b2cbd](a5b2cbd)) * scope tracked host usage to the requested project ([1b0cf32](1b0cf32)) * skip CLI initialization in terminal supervisor ([8091e3a](8091e3a)) * use typed Docker inspect fields in resource probes ([b0991af](b0991af))
Cancelling
hack host execorhack env execnow forwards SIGINT/SIGTERM to the owned command group and cleans surviving descendants. Terminal commands use a same-terminal supervisor that establishes ownership before starting the command, preserving stdin, separate output streams, terminal restoration, and Ctrl-Z/foreground resume. Cancellation returns 130/143 with bounded escalation for stubborn children.Daemon orphan cleanup requires evidence that a candidate owns this daemon state's Unix socket. Clearing an isolated test/configuration root cannot stop another daemon merely because its process name matches.
Validation: pinned Bun 1.3.9 build, full forced typecheck/lint, privacy checks, and full CLI/database suite (924 CLI passed, 5 skipped; 2 database passed), plus the subsequently added compiled-binary regression. Nine PTY regressions cover wrapper-only cancellation, stubborn descendants, immediate foreground Ctrl-C, cancellation while the wrapper is paused, stdin and
/dev/tty, separate streams, normal status/foreground restoration, and Ctrl-Z/resume. Independent review found no remaining blocker. A compiled Linux harness also passed the paused-wrapper cancellation case using the same terminal-control modules; this is separate from the full macOS CLI proof. Hosted current-head CI remains a separate gate.Release signal:
fix. #84 adds optional diagnostics on top of this change.