-
fix(finish): the global-stem gate compares against the master now, not a magic number · 696ba12a
A threshold of 3700 seconds against an expected 3779 accepted exactly the state the pass sits in for minutes: it writes in 120 s chunks, so 31 chunks is 3720 s — one short — and "basically done" sails through a loose comparison. My own monitor fired a premature COMPLETE on that very number, which is how I noticed: the check and the bug had the same blind spot because I wrote both. It now reads the expected duration from the master itself and allows two seconds, so the check cannot drift from the thing it checks. The fallback message says what a short global file would actually cost, which is the part worth naming: it does not FAIL the comparison, because compare_global takes min(len(a), len(b)). It compares fewer seconds per track and reports thinner evidence under identical column headings. Silent degradation in a summary nobody watches being written is worse than an error. Second attempt at this commit. The first edit silently no-op'd — a scripted replacement whose search string carried escaped line-continuations that did not match the file, while the script printed "gate tightened" unconditionally, and I reported success on the strength of that print. Caught by grepping the file. This version asserts the anchor exists before replacing and asserts the content changed after, then proves it by grep rather than by message. That is the third instance tonight of the same failure shape — a check whose failure mode is indistinguishable from success — so the assertions are the actual fix, not the gate. Held until now deliberately: finish_cosmic.sh was mid-execution, and bash reads scripts incrementally, so editing a running script can corrupt the run.
PLN (Algolia) authored696ba12a
×