#!/bin/bash # gen_q#288 / stream WM_MCBUNDLE -- the "5-second test": the invariants that must NOT move. # # Run 49 wrote this down because the test had been carried in prose in the NEXT-RUN list and I # reconstructed the escaping check WRONG twice in one run: I grepped for an escaped PERCENT sign # (\%), which these files never contain. That wrong check prints "escaped=0 raw=0" -- and `raw=0` # is the half that looks green, so it would have PASSED while being structurally incapable of # seeing the defect it exists to catch (an unescaped `gen_q#288` in the provenance line). # A check that cannot fail is worse than no check. Hence: one script, exact patterns, no prose. cd /proj/dmfexp/zwhong/rsm_rise || exit 2 rc=0 say() { printf '%-46s %s\n' "$1" "$2"; } got=$(md5sum scripts/flagship_latex.py | cut -c1-12) [ "$got" = "5bb4a170087e" ] && say "builder md5 (5bb4a170087e)" "OK $got" || { say "builder md5" "MOVED -> $got"; rc=1; } # Run 50: this check used to read ONLY flagship_table.tex, and only line 18. All THREE flagship # files carry the same per-model-filtered WM row (DINO-WM = M1 arms, LeWM = M16), and other streams # rebuild them independently -- flagship_paper.tex was rewritten at 08:36Z on 2026-09-27, after this # stream's install, with nothing watching its copy of the row. A fixed line number is also the kind # of check that silently stops pointing at the thing it was written for. Keyed on content now, and # required to appear EXACTLY ONCE in EACH file. SQ='48\.7{\\pm}1\.4\$ & \$50\.0{\\pm}1\.4\$ & \$48\.7{\\pm}2\.2\$ & \$\\mathbf{54\.0{\\pm}1\.3}' for f in docs/tex/flagship_table.tex docs/tex/flagship_single_actor.tex docs/tex/flagship_paper.tex; do n=$(grep -c "$SQ" "$f") if [ "$n" = 1 ]; then say "Square (Sub.) LeWM/DINO-WM/RSM $(basename "$f")" "OK 48.7 / 50.0 / 54.0" else say "Square (Sub.) row $(basename "$f")" "MOVED (matches=$n)"; grep -n '^Square (Sub\.)' "$f" | head -1; rc=1; fi done # the provenance stamp must be LaTeX-escaped: `gen\_q\#288`, never raw `gen_q#288`. for f in docs/tex/flagship_table.tex docs/tex/flagship_single_actor.tex docs/tex/flagship_paper.tex; do e=$(grep -c 'gen\\_q\\#288' "$f"); r=$(grep -c 'gen_q#288' "$f") if [ "$e" = 1 ] && [ "$r" = 0 ]; then say "$(basename "$f") provenance" "OK escaped=1 raw=0" else say "$(basename "$f") provenance" "BAD escaped=$e raw=$r"; rc=1; fi done n=$(grep -c "wm=UNFILTERED" scripts/verdict_table.py) [ "$n" = 2 ] && say "verdict_table wm=UNFILTERED (FLAG_TOPUP's)" "OK 2" || { say "verdict_table wm=UNFILTERED" "MOVED -> $n"; rc=1; } m=$(stat -c '%y' docs/tex/appendix_rise_methods.tex | cut -c1-19) [ "$m" = "2026-09-25 21:39:17" ] && say "appendix_rise_methods.tex (owner-edited)" "OK untouched" \ || { say "appendix_rise_methods.tex" "TOUCHED -> $m"; rc=1; } echo "5-SECOND TEST: $([ $rc = 0 ] && echo 'ALL GREEN' || echo 'FAILURES ABOVE')" exit $rc