Repository navigation
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: MUST_FIX: The lane-skip self-test can report success after fixture teardown fails.
Must fix
1. Propagate the teardown error from lskip_case
tools/gate-batch.sh:1689 A writer surviving the bound makes stop_lanes return 70 at line 1304. Both callers capture lskip_case through $(...) at lines 1695 and 1701, where Bash clears errexit by default. Execution continues to the final printf, which returns success. With batch rc=0 and one skip, the caller receives 0 1 and passes its assertions despite failed teardown. The EXIT trap then removes the fixture.
Propagating the error here keeps the self-test from approving failed cleanup. Replace the call with:
stop_lanes "$t/target/c-$tag" || return $?Checked
Duplicates: 1 new function checked; it reuses call_alive and reap_calls; no duplicate owner found.
Complexity: no Rust functions changed.
Silent failure: all 7 teardown call sites traced. The other 6 preserve errors under set -e.
Tests: bash -n passed. A probe using the actual caller tail injected teardown rc=70: the original returned success with 0 1; the suggested guard returned 70. The delayed-writer assertion checks both the final-write marker and the lane's termination; removing the wait permits it to fail.
Gates: no existing assertion or threshold was relaxed. The PR body reports FAIL-first results for the delayed-writer assertion.
Escapes: C1 status masking applies. C2–C4 did not match.
Notes
dryer and crapper did not run because no Rust file changed.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
| for f in "$t/target/c-$tag"/lane-*.pid "$t/target/c-$tag"/lane-*.child; do | ||
| if [ -f "$f" ]; then kill -TERM "$(cat "$f")" 2> /dev/null || true; fi | ||
| done | ||
| stop_lanes "$t/target/c-$tag" |
There was a problem hiding this comment.
Propagate teardown failure: command substitution clears errexit by default, so the final printf otherwise turns status 70 into success.
| stop_lanes "$t/target/c-$tag" | |
| stop_lanes "$t/target/c-$tag" || return $? |
|
Burntgogi님, 고맙습니다. 이 PR의 수정은 #338로 이어받아 main에 들어갔습니다( (AI 코딩 에이전트가 작성한 코멘트이며, 내용은 제가 확인했습니다.) |
What and why
Closes #264. End and observe stopped self-test lanes/items before their fixture tree can be removed. Seven existing ad-hoc TERM loops now use one fixture-only teardown; registered fake box calls still use the existing reap helper. Production timeout/signal handling is unchanged and remains separate from #201.
Release notes: Fixed — gate-batch self-tests wait for stopped fixture writers instead of racing directory removal after reporting successful cases.
Code shape
cargo fmt/cargo clippy: no Rust changes; whole-tree formatting is covered by integrated T0 below.Duplication removed: the registered lane/item TERM loops in
tools/gate-batch.sh's self-test. PID arguments are checked against this fixture's path before signalling, and zombies count as no longer able to write. TERM gets 50 ticks before KILL, followed by bounded observation.What I ran
Base
2b43ceb; independent branchfix/batch-fixture-quiescence, head72f0c8b.Strengthened the real part-2 fixture: its hung mutant's lane handles TERM by waiting until the parent has stopped, then delaying its final write. The new contract requires both the final-write marker and the lane's absence before cleanup. With only this regression added:
LC_ALL=C bash tools/gate-batch.sh --self-test --part 27 of 8 ok, exit 1: the lane still writes or has not finished its handler. After the fix, the actual complete CLI self-test:
LC_ALL=C bash tools/gate-batch.sh --self-test640 of 640 ok, exit 0, including part 2 8/8 and all migrated teardown callers.
This deterministically exercises the suspected race mechanism; it does not identify which process wrote during the original CI failure. No real GPU or remote batch ran. No output/count parser was weakened.
bash tools/affected-gates.sh origin/main..fix/batch-fixture-quiescence --no-box: five gate recipes selected, plus always-static checks; local-check documentation unmapped. This is static reach, not evidence that those GPU/model gates ran or that PTX narrowing was established.Integrated verification
LC_ALL=C bash tools/contrib-check.sh --tier t0at combined validation commit1d0ef55f(all four independent fixes):DONE tier=t0 total=83 red=0 wall=295sFormatting, all T0 host/tool units and every included check script passed, including the complete check-recipes block. This is one combined run, not four separate full T0 runs. It does not establish GPU, model-oracle, PTX or whole-workspace strict Clippy evidence.