Repository navigation
tools: share t0 test setup and optimize placement tests - #752
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: The shared setup preserves the assertions and propagates command failures.
Checked
Duplicates: 0 new functions, types or constants; the existing Graph.inputs and Reach.gate_files owners are reused. No dryer pairs were produced.
Complexity: self_test gains one cache-warming loop. No Rust function changed.
Silent failure: 1 producer-status path followed through check, bad and the final exit. A nonzero producer exit remains red even with valid output.
Tests: by inspection, changing F to D in placement's balanced return at tools/gate-batch.sh:5264 fails the retained DS41 and Nemotron assertions. Cache warming precedes the fork and uses the existing per-tree memos.
Gates: no threshold, tolerance, lint or assertion was removed or relaxed. The profile changes only placement's test optimization level.
Escape catalog: C1–C4 checked; none matched. The original classes call still checks its exit status before its output is reused.
Notes
dryer and crapper did not run because no Rust file changed.
Validation used static inspection; the full t0 suite was not rerun.
🔨 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. |
t0 검사에서 같은 일을 되풀이하던 부분을 줄여, 검사 범위는 그대로 두고 전체 시간을 단축합니다.
What and why
just contrib-check --tier t0spends most of its time in two checks:test-bloomery-placementandcheck-recipes. This PR removes repeated work in both without dropping any test, assertion or gate.Cargo.toml: the placement test profile now usesopt-level = 1. Debug assertions, overflow checks and debug info stay on. The placement tests are compute-bound, so most of their run time was unoptimized code.tools/gate-batch.sh: part 13 calledgate-batch --tier fixture --classesthree times on the same real tree. It now runs it once and the three existing checks read that output. The tests that change a copy of the table and expect an error still run.tools/recipes.py:self_testcomputesGraph.inputsandReach.gate_filesfor every gate before it forks, so the child processes inherit the results instead of each recomputing them.Release notes: Under the hood: the t0 tier runs the same checks in less time by doing the placement tests with light optimization and computing shared gate analysis once.
Code shape
Graph.inputsandReach.gate_files.cargo fmtandcargo clippy:cargo fmtand the other t0 static checks ran inside the t0 runs below. I did not runcargo clippyseparately; the change touches no Rust source.Duplication found or removed: the three identical real-tree
--classescalls intools/gate-batch.share now one.What I ran
Each arm ran the whole
just contrib-check --tier t0once, in this order on one machine: main, this branch, main, this branch. The first pair started from an empty Cargo build folder, the second pair reused each side's build output.The reduction is
(main - branch) / main. Each condition has one pair, so these are single observations with no significance claim.Per-check time from the
contrib-checkoutput:Inside
check-recipes, thegate-batchpart 13 block took 173.6 s, 78.6 s, 174.4 s and 78.0 s in the same four runs. Therecipes.pyself-test block took 105.6 s, 100.3 s, 107.3 s and 100.0 s, so its gain is small and most of the t0 gain comes from placement and part 13.Coverage is unchanged. All four runs ended with
DONE tier=t0 total=38 red=0, ran the same 38 checks, the same 177 placement tests (177 passed; 0 failed; 0 ignored) and all 145 recipes blocks with no green-key skips. For the placement profile, Cargo's unit graph for the branch showsopt_level=1 debug_assertions=true overflow_checks=true debuginfo=2for the test, build and doctest units; main hasopt_level=0with the same debug settings.To reproduce:
Run it on main and on this branch, alternating, with the same build-folder state.
Hardware
Linux 7.0.0-38-generic, x86_64, AMD Ryzen 5 PRO 6650H, 12 logical CPUs, 12186 MiB memory,
rustc 1.100.0-nightly (e457a7b0d 2026-08-27),RUSTFLAGS='-C target-cpu=x86-64-v3',CARGO_BUILD_JOBS=4,RAYON_NUM_THREADS=4. The change touches no GPU code, so no GPU gate ran.What I ran into
This does not block the PR. The slowest
check-recipesblocks on this branch arecardtestsandlease, at 109 s and 102 s in the first branch run; this PR does not change them. I did not measure the GitHub Actions job time after this change, so the numbers above are not a CI estimate.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.