Check curve, ablation and baseline completion in code - #11
Merged
Merged
Conversation
A shell loop once passed `make` one argument, `curve MODEL=bert`; make read it as a variable assignment, ran its default target and exited 0, so two curves were reported done with no point run. Exit 0 is not evidence of completion, so each index command now checks its own work. - Before running: the plan must be exactly the expected points, each once (curve: 6 k x 3 seeds; ablation: ModernBERT, k=100, 0 OOS rows x 3 seeds; baselines: 2 x 6 x 3). Otherwise it raises before any training, fitting or data loading. - After running: the index is written to a temporary file, read back, and must hold the same points, each once, with every archive's SHA-256 equal on disk, in the manifest and in the index. Only then is it moved into place and `completed 18/18 encoder points (bert)`, `completed 3/3 ablation points` or `completed 36/36 baseline points` printed. Any failure raises, exits non-zero and leaves the previous index untouched. The expected sets are literals in completeness.py rather than read from CURVE_KS / SEEDS, so a wrong loop cannot agree with its own check; a test pins that the two agree today. Three curve tests that ran a subset of a curve now run the full curve and filter to k=100.
… archives A quoted `make "curve MODEL=bert"` is one argument that make reads as a variable assignment; with no goal it ran the first target (setup) and exited 0. The Makefile now stops with an error when no target is given, so the 2026-09-23 failure is non-zero at its entry point, not only missing a completion line. Nothing in the README or CI relied on a bare make running setup. tests/test_makefile.py pins both the refused quoted form and the working split form (`make -n` only, nothing runs). Also: - A test that the check reads the temporary index file from disk, not the body in memory: a write that loses a point must fail. - check_archives refuses two points that list the same archive file or SHA-256, which the baseline index did not check before. - Makefile comments and README say to match the whole completion line (`completed 18/18 encoder points (<model>)`), since `make curve` prints the baselines' `completed 36/36` line before the curve runs.
GNU make 4.x (the CI runner) reads the quoted "curve MODEL=bert" as a target name and stops with "No rule to make target"; make 3.81 (macOS) reads it as an assignment and now stops at the guard. The quoted-form test accepts either refusal; the guard itself is pinned by a bare `make` and by `make MODEL=bert`, which every version treats as an assignment with no goal. The dry runs drop inherited MAKEFLAGS and MAKELEVEL so they behave the same under `make test`.
drewOrc
added a commit
that referenced
this pull request
Sep 23, 2026
Two baselines x six k x three seeds, sharing curve_sample(k, seed) with the encoders. Re-verified with the completion checks from #11: completed 36/36 baseline points, 39 archives match the manifest. Archives were not recomputed. Logits files will be attached to a release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A shell loop once passed
makea single argument,curve MODEL=bert. Make read it as a variable assignment, ran its default target (setup) and exited 0, so two curves were reported done with no point run. No result was affected, but exit 0 is not evidence that anything ran. This makes each index command prove its own completion.What changes
New
src/tinyrouter/completeness.py, used bycurves.run_curveandbaselines.run_all.make curve MODEL=bert|modernbert(k, seed), each once; every archive's SHA-256 equal on disk, in the manifest and in the indexcompleted 18/18 encoder points (bert)make oos-ablationcompleted 3/3 ablation pointsmake baselines(and the first half ofmake curve)(baseline, k, seed), same SHA-256 checkcompleted 36/36 baseline points<name>.json.tmp, read back and verified, and only then moved into place; on failure the temp file is removed, the previous index stays as it was, and the command raises (non-zero exit).completeness.py, not read fromCURVE_KS/SEEDS, so a wrong loop cannot agree with its own check. A test pins that the two agree today.make baselinesno longer printswrote N baseline runs; the completion line replaces it.No change to
docs/PLAN.md, the acceptance criteria, hyperparameters or any result file. No training or paid API call was run.Tests
27 new tests in
tests/test_completeness.py: for the curve, the ablation and the baselines, a missing point and a duplicated point at the plan check and at the index check (12), plus the completion message and its ordering, archive changed / manifest disagrees / archive deleted, wrong model, OOS rows in the ablation, and a failed rerun leaving the old index intact. Three existing tests intests/test_curves.pyran a 3-point subset of a curve; they now run the full curve and filter to k=100.Mutation check (first commit): each of 13 mutations (dropping each plan check, each index check, the manifest comparison, the missing-file check, duplicate / missing / unexpected detection, verifying after the move instead of before, printing the message before publishing) turned at least one test red; all restored.
Review follow-up (second commit)
make -n "curve MODEL=bert"expandedsetup. The Makefile now stops with$(error ...)whenMAKECMDGOALSis empty, before any target. Chosen over.DEFAULT_GOAL := helpwith a failing help target because it fails at parse time for every no-goal call, includingmake -n, and its message names the actual mistake. README and CI only ever call named targets.tests/test_makefile.py(dry runs only, inherited MAKEFLAGS dropped): the quoted form, a baremakeandmake MODEL=bertexit non-zero without reaching setup;make -n curve MODEL=bertandmake -n setupstill exit 0. Make versions differ on the quoted form: GNU make 3.81 (macOS, where the incident happened) reads it as an assignment and now hits the guard; make 4.x (CI) reads it as an unknown target and fails withNo rule to make target. The quoted-form test accepts either refusal, and the guard itself is pinned by the bare and assignment-only calls, which every version treats the same.check_archivesrefuses two points listing the same archive file or SHA-256, so the baseline index gets the check the curve index already had.completed 18/18 encoder points (<model>), sincemake curveprints the baselines'completed 36/36 baseline pointsbefore the curve runs.Mutation check for these: removing the guard, making it fire on every call, verifying the in-memory body instead of the file, and dropping the shared-archive check each turned at least one test red; all restored.
make lint,make test(348 passed, 1 skipped, 7 network deselected) andmake smokepass locally.