Skip to content

v469 — Every pass writes its own file

Choose a tag to compare

@MBHudson MBHudson released this 14 Nov 23:39
· 2 commits to master since this release

What changed

Each pass writes its own file, and can no longer borrow the last one. A drill graded the file name loosely: the write step accepted any pass's file, so a second pass that rebuilt its todo list from the first — path and all — wrote …-p1.txt again, overwrote pass 1's evidence, and still counted as clean. v467 made the report tell the truth about that; this release stops it happening.

Grading follows the pass counter. trainingFileCheckFor maps a pass number to that pass's file while the history is walked, so a call in pass 2 must name the pass-2 file. The old matcher that accepted any generation is gone, and a multi-pass history still grades correctly — pass 1 against p1, pass 2 against p2, rather than the whole history against the newest name.

The write is refused before the tool runs. Grading alone only notices after the file has been overwritten. drillWriteRefusal() sits in the tool loop for write_file, edit_file and append_file while training is on: a path inside this run's own drill family that is not the current pass's file comes back as an ordinary tool error naming the right file, so the model corrects itself next step and nothing is written. Reading an earlier pass's file is still allowed — that is how evidence is inspected — and paths outside the run's drill files are untouched.

Checks

Verified on a live Advanced run, not just the suites. The writes came back in this order:

…-p1.txt = ok
…-p1.txt = error  "Error: drill pass 2 writes training/…-p2.txt, not training/…-p1.txt …"
…-p2.txt = ok

and on disk pass 1's file kept its original timestamp (382 bytes, unchanged) while pass 2's created its own — the evidence each pass produced survived.

JS 42 files / 1,409 assertions, PHP 35 files / 35 passed (3 skipped on this host), docs 14/14.

VERSION 467 → 469, APP_VERSION 467 → 469, every ?v= under ui/**, and both index.html files.