Skip to content

fix(tether): stop supervised processes on Ctrl-C - #4623

Merged
max-sixty merged 2 commits into
mainfrom
repro/issue-4622
Oct 29, 2026
Merged

max-sixty merged 2 commits into
mainfrom
repro/issue-4622

Conversation

@worktrunk-bot

@worktrunk-bot worktrunk-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

wt step tether put the supervised command in a separate process group, but Ctrl-C reached only the supervisor. The supervisor exited before its cleanup sweep, leaving the command running. This PR keeps a foreground signal lease while tether waits and has the reaper terminate the supervised group when the command is interrupted.

The integration test sends SIGINT to the supervisor's group and verifies that the supervised group exits. It failed before the production change and now passes. All four tether integration tests pass locally; CI will check the platform matrix.

Fixes #4622.

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new test reproduces #4622: cargo test --test integration test_tether_kills_process_group_when_interrupted fails because the supervised process group remains alive after the supervisor receives SIGINT. The PR description says the production fix is still pending, so this head is not ready to merge. The supervisor needs to finish group teardown on interruption before this regression test can pass.

@worktrunk-bot worktrunk-bot changed the title test: reproduce tether child leak on SIGINT fix(tether): stop supervised processes on Ctrl-C Oct 29, 2026

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The production fix and Ctrl-C regression test pass the focused local suite, but codecov/patch is red: Codecov reports 13 of 14 added executable lines covered (92.85%, below the 98.62% target). The uncovered line is the error return from ForegroundSignals::install in src/commands/step/tether.rs. I found no meaningful way to trigger signal-handler installation failure through this command's test boundary. The repository's Coverage rule requires explicit approval before merging with a failing patch check.

@max-sixty
max-sixty merged commit e82f74e into main Oct 29, 2026
37 of 38 checks passed
@max-sixty
max-sixty deleted the repro/issue-4622 branch October 29, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wt step tether leaves supervised processes running after Ctrl+C

2 participants