Skip to content

test(git_bridge): a cancelled git's survivors are confirmed gone through the release's recheck, not asserted gone at the first snapshot (card fb166622) - #5063

Merged
joelteply merged 2 commits into
canaryfrom
fb166622/git-bridge-test-a-cancelled-git-s-surviv
Oct 15, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fb166622/git-bridge-test-a-cancelled-git-s-surviv

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

#5062's CI (run 38750082018, 2026-10-15 14:32Z, base eeb7a32) failed
a_git_ends_with_its_waiter_and_says_how_it_ended at git_bridge.rs:1103:
Lingering { processes: [pid 15439] }. lane_process::end_tree kills the
cancelled git's descendants and then takes ONE still_present snapshot, so a
descendant still dying is reported. That is conservative custody, not a
leak; the test asserted the snapshot empty. It's the same race #5053 fixed
for the hook pid (card 0d18171d).

The test now runs the release as code/release-hands does: close, then
recheck the reported processes (kill again while the pid still names it)
and retain_processes until confirmed, within the existing 10 s deadline.
No tree may be unknown, and a second close must report nothing. No timeout
was raised and no report is cleared: a process the recheck never confirms
still fails the test.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…ugh the release's recheck, not asserted gone at the first snapshot (card fb166622)

#5062's CI (run 38750082018, 2026-10-15 14:32Z, base eeb7a32) failed
a_git_ends_with_its_waiter_and_says_how_it_ended at git_bridge.rs:1103:
Lingering { processes: [pid 15439] }. lane_process::end_tree kills the
cancelled git's descendants and then takes ONE still_present snapshot, so a
descendant still dying is reported. That is conservative custody, not a
leak; the test asserted the snapshot empty. It's the same race #5053 fixed
for the hook pid (card 0d18171d).

The test now runs the release as code/release-hands does: close, then
recheck the reported processes (kill again while the pid still names it)
and retain_processes until confirmed, within the existing 10 s deadline.
No tree may be unknown, and a second close must report nothing. No timeout
was raised and no report is cleared: a process the recheck never confirms
still fails the test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply merged commit 47c1e0f into canary Oct 15, 2026
7 checks passed
@joelteply
joelteply deleted the fb166622/git-bridge-test-a-cancelled-git-s-surviv branch October 15, 2026 15:43
joelteply added a commit that referenced this pull request Oct 15, 2026
… gap, not judged by one snapshot

canary 8eaed76's cargo test failed code::shell_session::tests::test_kill_execution ("nothing the
shell started is recorded as surviving"), and that one red tip held every node's deploy from 14:30Z
(the tracker's RefuseRed). A rerun went green: a race, the third of its kind today (#5053 a hook's
pid, #5063 git_bridge's test), each patched in a caller.

The owner is lane_process::end_tree. It SIGKILLs every descendant, reaps the shell, then took ONE
snapshot of what is still present; still_present already counts a zombie as gone, so what that
snapshot catches is a process between its SIGKILL and its exit. Production paid the same race: a
release (code/release-hands) does one recheck and reports "not confirmed gone", holding the hands.

end_tree now calls confirm_gone(killed, KILL_POLL): re-kill-and-check at a doubling interval from 1
ms until the set is gone or one KILL_POLL has passed (the cadence a release already checks a killed
execution at; no new constant). What remains is recorded as before and a release re-checks it.

## Measured (M5, 2026-10-15)
- SIGKILL to gone for a shell's `sleep` grandchild, n=200: 2.2 ms p50, 2.6 p95, 3.7 max (ps
  included), so KILL_POLL is 27x the measured worst case here.
- test_kill_execution 20x serial: 20 pass; 16 parallel copies x 5 rounds: 80 pass. NOT a
  reproduction: the old code also passed 80/80 under that load on macOS; the failure was on CI's
  Linux runner. The fix is argued from the mechanism, not from a local repro.
- cargo test (lib, metal) filtered lane_process / code::git_bridge / release_hands /
  code::shell_session: 51 passed, 0 failed. cargo check -p continuum-core --features metal,accelerate: clean.

## Measured after merge (owner Fable)
test_kill_execution across the next canary CI runs (Linux): no failure of this assertion; any
failure is posted to card and this PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 15, 2026
… gap, not judged by one snapshot (#5070)

* fix(process): a killed tree is confirmed gone across the kill-to-exit gap, not judged by one snapshot

canary 8eaed76's cargo test failed code::shell_session::tests::test_kill_execution ("nothing the
shell started is recorded as surviving"), and that one red tip held every node's deploy from 14:30Z
(the tracker's RefuseRed). A rerun went green: a race, the third of its kind today (#5053 a hook's
pid, #5063 git_bridge's test), each patched in a caller.

The owner is lane_process::end_tree. It SIGKILLs every descendant, reaps the shell, then took ONE
snapshot of what is still present; still_present already counts a zombie as gone, so what that
snapshot catches is a process between its SIGKILL and its exit. Production paid the same race: a
release (code/release-hands) does one recheck and reports "not confirmed gone", holding the hands.

end_tree now calls confirm_gone(killed, KILL_POLL): re-kill-and-check at a doubling interval from 1
ms until the set is gone or one KILL_POLL has passed (the cadence a release already checks a killed
execution at; no new constant). What remains is recorded as before and a release re-checks it.

## Measured (M5, 2026-10-15)
- SIGKILL to gone for a shell's `sleep` grandchild, n=200: 2.2 ms p50, 2.6 p95, 3.7 max (ps
  included), so KILL_POLL is 27x the measured worst case here.
- test_kill_execution 20x serial: 20 pass; 16 parallel copies x 5 rounds: 80 pass. NOT a
  reproduction: the old code also passed 80/80 under that load on macOS; the failure was on CI's
  Linux runner. The fix is argued from the mechanism, not from a local repro.
- cargo test (lib, metal) filtered lane_process / code::git_bridge / release_hands /
  code::shell_session: 51 passed, 0 failed. cargo check -p continuum-core --features metal,accelerate: clean.

## Measured after merge (owner Fable)
test_kill_execution across the next canary CI runs (Linux): no failure of this assertion; any
failure is posted to card and this PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(process): confirm_gone only looks; the receipt names its build

Cormac's review of #5070 (P3): the loop re-sent SIGKILL per survivor per check, spawning a taskkill
each time on Windows; the kill was already sent, so still_present alone confirms the same thing, and a
release's recheck still re-kills what remains. The M5 measurement now names its machine, time and the
canary it was taken against.

Measured (M5, worktree on fable/confirm-tree-ended): test_kill_execution 20x: 0 failed; lane_process /
code::git_bridge / release_hands / code::shell_session: all pass; cargo check (metal, accelerate) clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant