Skip to content

tools: wait for stopped batch fixture writers before cleanup - #338

Merged
juliankang4 merged 2 commits into
midagedev:mainfrom
juliankang4:fix/batch-fixture-quiescence
Oct 16, 2026
Merged

juliankang4 merged 2 commits into
midagedev:mainfrom
juliankang4:fix/batch-fixture-quiescence

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

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 clear errexit, 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

  • No second copy. The follow-up adds no helper and reuses stop_lanes.
  • Model code holds only architecture facts. No model code changes.
  • Dead code is gone. No new entry point or unused code.
  • No silent failure. The teardown status reaches the caller.
  • Comments state what is true now. No comment changes in the follow-up.
  • No relaxed gate. No assertion, tolerance or lint changed.
  • cargo fmt and cargo clippy are 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 onto 75f72268e50dc172a8b0dc13d7734633440dbcdb.

  • A focused probe extracts the actual lskip_case teardown tail and injects a stop_lanes failure 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.sh and cargo 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 초안 리뷰는 제가 직접 했습니다.

Burntgogi and others added 2 commits October 17, 2026 00:37
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.
@github-actions github-actions Bot added documentation Improvements or additions to documentation tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 16, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit bf83ac8 into midagedev:main Oct 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants