Repository navigation
Serialize signal scope retirement with signal receipt - #4609
Conversation
|
Codecov's patch check failed at 94.77% against the 98.60% target. Its compare report shows five misses in the regression test's failure diagnostics and polling loop, plus two in |
Codecov patch check failed at 94.77%; AGENTS.md requires explicit approval before merging with failing patch coverage.
worktrunk-bot
left a comment
There was a problem hiding this comment.
The alias test still has the receipt race addressed by #4607. These PRs edit the same test, so their test changes need to be reconciled before this assertion is used as evidence for the fix.
A final alias child can catch Ctrl-C and exit successfully before wt's signal-owning thread finishes handling its SIGINT. Retiring the final foreground scope on another thread can restore idle default handling during that receipt, killing wt instead of preserving the child's exit status.
Retire foreground scopes on the existing process owner, which already serializes signal receipt with child admission. Add a controlled regression that pauses receipt while a real child handles Ctrl-C and exits successfully, cover nested owner requests and panic propagation, and preserve exit status and stderr in the alias test's failure diagnostic.
Includes the receipt handshake from #4607: the alias test keeps its child alive until wt records receiving SIGINT. This separates an interrupt received during the command from one that arrives after the child has exited. The controlled unit regression independently exercises teardown during an already-entered handler.
The regression fails against main and passes with the fix on Linux and macOS. Validation: full project gate (5,442 tests passed, one skipped), Linux signal/process-owner tests, and all 91 Linux alias tests.
Fixes #4603.