Repository navigation
fix(tether): stop supervised processes on Ctrl-C - #4623
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
wt step tetherput 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.