Repository navigation
shell: a killed transcription's children are waited for as gone, not checked the instant it is answered (#845) - #846
Merged
napkinstack-agent[bot] merged 2 commits intoNov 15, 2026
Conversation
…not checked the instant it is answered (#845) The KILL sent, the child is gone once the kernel has delivered it and reaped it: on a loaded runner, after the answer (#812's CI, run 43596085957). Now polled as a state for half a second after the answer; the two seconds' bound kept on the answer itself, read before. Without the group's KILL, it still fails: « still runs half a second after the answer ». Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cancelled one does (#845) The same race, in a_transcript_ended_by_kitokey_ends_with_what_it_started_and_is_not_written: its child checked the instant the answer came, with `kill -0`, which a zombie not yet reaped still answers. It failed #851's attest and #836's. Now waited for with `gone`, zombie-aware, within half a second. Without the group's KILL in `end`, it still fails. Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-agent
Bot
deleted the
shell-845-deaf-child-gone-after-its-kill
branch
November 15, 2026 05:13
kitokey-marc Bot
added a commit
that referenced
this pull request
Nov 15, 2026
The transcription tests' children waited for as gone on main: this branch's attest no longer carries #845's race. Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kitokey-marc Bot
added a commit
that referenced
this pull request
Nov 15, 2026
…eciders-key The transcription tests' children waited for as gone on main: this branch's attest no longer carries #845's race. Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 of 17 tasks
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.
shell: a killed transcription's children are waited for as gone, not checked the instant it is answered
Closes #845.
Module
modules/shell— exactly one.cross-modulelabel is required, justification belowDeliverable
Out of cycle: #845, a test that fails in CI and blocks #812's merge. It is outside the freeze for that reason (the coordinator, 2026-11-15).
What it changes
Only a test.
tests/transcription.rs,cancelled_it_ends_within_two_seconds_with_what_it_started_even_deaf_to_term, from #807:gone(&child)is polled as a state, every 10 ms for up to 500 ms. This is the playbook's rule: wait for an observable state, never for a fixed duration.a_transcript_ended_by_kitokey_ends_with_what_it_started_and_is_not_writtenchecked its child the instant the answer came, withkill -0, which a zombie not yet reaped still answers. It failed the unit tests of shell: e2e — D60's bar waited for whole, not read after a fixed pause (#850) #851's attest and shell: e2e presses the stop once it is the stop gesture (#763) #836's (transcription.rs:105, « what the program started is left running »). It is now waited for the same way, withgone, which counts a zombie as gone, within 500 ms.Oracle
its child, deaf to TERM, still runs. A timing race; locally the test passed.transcription.rs:105.cargo test --test transcriptionpasses 13 of 13. Both tests run 40 times, 8 at a time, pass 40 of 40.cancel(src/transcription.rs:278,git diff --numstat1 1), the first fails with « its child, deaf to TERM, still runs half a second after the answer »;end(src/transcription.rs:232, 1 1), the second fails with « what the program started is left running half a second after the answer ».Kind of oracle: the unit test itself, its race taken out, and a mutant that shows it still holds the behaviour.
Review budget
Contracts
Definition of Done
cargo fmt --check,cargo clippy --all-targets -D warningsTest sheet
Verifier: session 04463b35-db3b-47ea-bef5-6892f2baedb7
git clone --sharedof my own under my cache:cargo test --locked --test transcription,ok. 13 passed. The test alone (--exact), 40 runs, 8 at a time, under 16 busy loops (one per core): 40 of 40 printedok. 1 passed. At 3da2920 before it: 40 of 40 the same way, and the test before #846 32 of 40 under that load.cancelwithout the group's KILL, when the test runs, then it fails, the child still runningsrc/transcription.rsl.278,cancel's groupSIGKILLcommented out (numstat 1 1, restored by atrap), undertimeout 300:FAILED. 0 passed; 1 failed, « its child, deaf to TERM, still runs half a second after the answer ».end, the test failsa_transcript_ended_by_kitokey_ends_with_what_it_started_and_is_not_writtenalone, 40 runs, 8 at a time, under 16 busy loops: 40 of 40ok. 1 passed, the binary rebuilt from the restored source first.src/transcription.rsl.232,end's groupSIGKILLcommented out (numstat 1 1, restored by atrap), undertimeout 300:FAILED. 0 passed; 1 failed, « what the program started is left running half a second after the answer ».Verifier's remarks: by reading the diff at 3da2920 and my own probes. (1) The 2 s bound is still measured at the answer:
answered = pressed.elapsed()is read on the line afterrecv_timeout(2 s)returns, and asserted before the 500 ms wait begins; the wait's own clock (killed) starts after it, so it cannot stretch the bound. A probe of mine did not discriminate and is not evidence: a 1.5 s sleep added incancelafter the KILL passed, because the answer is sent once the program ends, before that sleep. (2) The race is real under load, and gone: the earlier test failed 8 of 40 runs in my clone under 16 busy loops, the new one 0 of 40. Not run by me: CI's runner (its red is run 43596085957), clippy, the attest. At a44408a: (3) the test before a44408a (a44408a~1'stranscription.rs) passed 40 of 40 in my clone under the same load: the CI flake it fixes (exit 101 in #836's and #851's attests) did not replay here, so S3 rests on the test's reading and its mutant, not on a red seen locally. The new wait is the same as S1's:gone, every 10 ms, for 500 ms, after the answer. (4) A method slip of mine, set right: one ×40 run used the binary still built from theendmutant (0 of 40, « left running »); rebuilt from the restored source, 40 of 40. Only the rebuilt run is evidence.Summary
DONE
VERIFIED
ASSUMED
NOT VERIFIED
RISKS
Signals to report
🤖 Generated with Claude Code