Repository navigation
tools: wait for stopped batch fixture writers before cleanup - #338
Conversation
Fixes midagedev#264. Share the self-test lane teardown, observe registered writers through TERM and bounded KILL, and retain cleanup failures. A delayed last-write regression fails 7/8 before the fix; the full runner passes 640/640 afterward. Production timeout and signal handling is unchanged.
There was a problem hiding this comment.
Verdict: CLEAN: The teardown waits for recorded fixture writers and propagates its failure status.
Non-blocking
⚠ Commit the teardown-error regression probe: tools/gate-batch.sh:1712.
Deleting || return $? makes an injected teardown status of 70 become exit 0 with output 0 1.
The committed delayed-writer case exercises successful teardown. Add the reported error-injection probe to the self-test so this regression turns an assertion red.
Checked
Duplicates: 1 new function checked; no duplicate owner. The existing reap_calls handles box calls; stop_lanes handles lanes and items. No dryer pairs.
Complexity: no Rust functions changed.
Silent failure: 4 status paths followed: PID lookup, TERM, KILL and teardown return. The teardown error reaches the caller.
Tests: bash -n passed. An in-memory probe of the actual lskip_case tail returned 70 with no output for an injected teardown failure. Removing the return guard produced exit 0 and 0 1. The delayed-writer assertion checks that the lane exited and wrote its final marker.
Gates: no existing pin, threshold or case relaxed.
Escapes: C1 checked at command substitution; teardown status is preserved. C2 heredoc is quoted. C3 signals use recorded PIDs. C4 has no match.
Notes
Dryer and crapper did not run because no Rust file changed.
Full fixture self-tests were not run here. The PR reports part 6; the new delayed-handler case is in part 2 and has no reported run.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
This carries #280 by @Burntgogi forward. His commit is unchanged; the last commit fixes what the review asked for.
What and why
Burntgogi replaced seven fire-and-forget fixture teardown loops with one bounded helper. His delayed TERM-handler case checks that the lane finishes its last write before cleanup. Production batch signal handling is unchanged.
The follow-up propagates that helper's error from
lskip_case. Bash command substitution can clearerrexit, so the final count summary previously hid a teardown failure.Release notes: Fixed: gate-batch's lane-skip self-test reports fixture teardown failure instead of returning a successful count summary.
Code shape
stop_lanes.cargo fmtandcargo clippyare clean. Formatting passed; Clippy was not run because this change contains no Rust edits.Duplication found or removed: none in the follow-up.
What I ran
Checks used head
ed17b92a43f02ed42d77c98a94bea7ad9042b45d, rebased onto75f72268e50dc172a8b0dc13d7734633440dbcdb.lskip_caseteardown tail and injects astop_lanesfailure of 70. Before the fix:teardown injected=70 observed=0 output=<0 1>, probe exit 1. After the fix:teardown injected=70 observed=70 output=<>, probe exit 0.bash tools/gate-batch.sh --self-test --part 6:gate-batch self-test: 42 of 42 ok, exit 0.bash -n tools/gate-batch.shandcargo fmt --check: exit 0.python3 tools/recipes.py check:133 gate rows held to the derivation, exit 0.bash tools/check-{arch,records,unsafe,defaults,levers}.sh(each script separately): exit 0.bash tools/check-comments.sh:check-comments: ok, exit 0 in a Git worktree. An earlier archive-only invocation correctly refused to give a verdict because Git metadata was absent.The shell self-test ran on an Apple Silicon MacBook. Full T0, the remaining self-test parts, Clippy and GPU gates were not run in this follow-up. No model or GPU behavior changed.
What I ran into
This does not block the PR: the archive-only comments check required a retry in a Git worktree. Its refusal was not treated as a pass.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.