mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
BudgetKillDrillTests drove the stand-in deploy with `timeout -k GRACE 3`. Under load (gate pass 76 ran unit, integration and lint in parallel) timeout's TERM arrived while bash was still starting, before the stand-in's `trap cleanup EXIT` existed, so bash died on TERM without the rescue: test_without_the_window_the_kill_lands_before_the_copy failed with "124 != 137" and only "kill_epoch=…" on stdout. A 4 s stall before the trap reproduces it on the old driver; nothing in the merge touched the rescue code. The stand-in now writes to an `armed` FIFO right after it installs the trap. The driver runs `timeout -k GRACE 0 …` (duration 0 disables timeout's own clock, its TERM-then-KILL handling stays), waits for `armed`, sleeps until the deadline epoch and sends timeout the same ALRM its own expiry raises, so TERM still lands at the deadline and KILL GRACE seconds later, with the same 124/137 exit codes. `wait -n -p` lets the failure-before-the-deadline drill return as soon as its deploy ends. No timeout was raised and nothing retries; with the 4 s stall all three drills pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>