Repository navigation
test(signals): wait for wt receipt before alias child exits - #4607
Closed
worktrunk-bot wants to merge 1 commit into
Closed
worktrunk-bot wants to merge 1 commit into
worktrunk-bot wants to merge 1 commit into
Conversation
This was referenced Oct 27, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 27, 2026
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](#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. > _This was written by Codex on behalf of max-sixty_ --------- Co-authored-by: worktrunk-bot <[email protected]>
Owner
|
The signal receipt trace and alias handshake were incorporated into merged #4609, together with the separate foreground-retirement repair and regression test. This PR's changes are now on main, so closing it as completed.
|
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.
The final-alias Ctrl-C test could let its shell exit before the group SIGINT reached
wt. At that pointwtwas idle, so the late signal ended it even though the alias child had exited successfully. Keep the shell alive untilwtrecords receiving SIGINT, then assert the child's successful exit is preserved. The debug trace now records foreground signal receipt to make that synchronization observable.This reproduces the failed Linux run and the recurrences tracked in #4603. Locally, the original test failed on focused iteration 31; with exit diagnostics it failed on iteration 773 with
wtterminated by SIGINT after the trace logged the alias child as successful. The synchronized test passed 500 focused runs, then 100 more on the latest main. The failed CI job passed on rerun.Fixes #4603.