From 9628a2b77cd34b2ca193dc0f5c9a68c89828b0f8 Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 25 May 2026 19:45:42 -0400 Subject: [PATCH] fix(marathon): forbid ad-hoc bare cargo test, mandate nextest filters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bare `cargo test --package pdftract-core --lib buffer` hung and stalled the marathon ~5h on 2026-05-25, bypassing the nextest terminate-after guard. The instruction only banned bare cargo test at the final gate, not for narrow/iterative runs — which is exactly where the trap is. instruction.md: extend the ban to narrow/iterative runs and document the nextest filter equivalents (-E 'test(...)', -p ). Co-Authored-By: Claude Opus 4.7 (1M context) --- .marathon/instruction.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.marathon/instruction.md b/.marathon/instruction.md index 4a807db..eb9752e 100644 --- a/.marathon/instruction.md +++ b/.marathon/instruction.md @@ -81,9 +81,18 @@ bf claim --model claude-code-glm-4.7 --harness needle --harness-versio cargo clippy --all-targets -- -D warnings cargo fmt cargo nextest run # NEVER bare `cargo test` — see CLAUDE.md "Test hygiene". - # nextest kills hung tests via .config/nextest.toml slow-timeout. + # nextest kills hung tests via .config/nextest.toml terminate-after. # If nextest is unavailable: timeout --kill-after=30s 600s cargo test --all-targets ``` + **This ban covers narrow / iterative runs too** — to exercise a single test or package, + filter *through nextest*; never run a bare `cargo test -p … --lib …`: + ```bash + cargo nextest run -E 'test(buffer)' # by test-name substring + cargo nextest run -p pdftract-core buffer # by package + filter + ``` + (On 2026-05-25 a bare `cargo test --package pdftract-core --lib buffer` hung and stalled + the loop ~5h — it bypassed the nextest timeout. Ad-hoc runs are exactly where the guard + matters; a "quick check" with bare `cargo test` is the trap.) If the run is killed by a timeout (nextest `TIMEOUT`/`TERMINATED`, or `timeout` exit 124), a test hung — fix it; never close the bead claiming the tests passed.