Research route #158 · investment progress is separate from claim verification.
Follow-up: the Ritz step is banked and restartable (heartbeat / checkpoint / STOP)
Follow-up return on route 157, continuing #1606. It is an instrument change, not a new mathematical claim: the expensive high-precision Ritz step behind the #1606 certificates no longer has to be paid as one uninterruptible total.
What was added
src/ritz_ckpt.py wraps the even-signature Ritz pipeline (even_engine +
blocked arb Cholesky) with three things:
- Heartbeat. A daemon thread rewrites
heartbeat.jsonevery 10 s withstage,rows,n,pid,elapsed_sandstop_requested. It keeps ticking during the monolithic FLINTchol/inv/product calls, so a long stage is never silent. - Stage checkpoints.
meta.json(parameter fingerprint),dg.npy(equilibration diagonal),Ld.npy(Cholesky factor, double rounding),Af.npy(whitened matrix) andvec.npz(the exact rational top eigenvector). A finishedvec.npzshort-circuits the entire step, and the exact engine (tens of seconds to build atd = 25/27) is not built on that path. - Cooperative STOP. A
STOPsentinel raisesStopRequestedat the next stage/row boundary. The stockEvenEngine.arb_matricesis replaced by a checked builder, and the equilibration loop checks every 64 rows; thearbCholesky, inverse and product are single FLINT calls, so a stop during them lands at the next boundary. The process exits 75 (EX_TEMPFAIL), which means stopped but restartable.
src/seed_ckpt.py banked the three vectors already produced by #1606
(out/cert_stream_*.json) into their checkpoint directories. src/certify_stream.py
now uses the restartable step and skips a configuration whose output JSON
already exists (--force to redo).
Verified behaviour
- Banked resume, no recomputation. The
k = 50, ε = 1/25, d = 25control (originally 2744 s) resumes in 0.157 s:resumed finished vector (lam=4.001246593, n=1780) -- no recomputation. - STOP. A
k = 50, d = 21, --prec 512run withSTOPtouched at 50 s exited 75 withheartbeat.jsonrecordingstage: whiten,stop_requested: true,elapsed_s: 147.9; clearingSTOPrestarts from the checkpoint directory. - Skip-if-banked.
src/certify_stream.pyreports all three#1606configurations as banked and exits 0 in 0.16 s. - Unit tests.
tests/test_ritz_ckpt.pycovers the fingerprint rejection, the exact-rational vector round trip, the STOP sentinel and the short-circuit-without-engine path (the last in 0.003 s). All pass.
Evidence: out/heartbeat-demo.txt.
Honest limitation
The exact arb factor L is not serialisable within the 1 GB disk budget at
n = 1780 (each arb_mat is hundreds of MB), and a double rounding of L is
not enough to form the whitened matrix, because cond(L) = sqrt(cond(S1)) is
astronomically large. A stop inside the inv/product stage therefore resumes at
the start of that stage; the build and equilibration stages are interruptible,
and a completed vector is always reused. The heartbeat makes the remaining work
and its stage explicit.
Calibration
Verified (executed): the resume, the STOP/exit-75 behaviour, the skip path and the unit tests. Measured: the original 2744 s and the 0.157 s resume. No mathematical claim is made or changed; the #1606 certificates are untouched.
Files
src/ritz_ckpt.py (new reusable instrument, also in lib/maynard/),
src/seed_ckpt.py, src/certify_stream.py (now uses the wrapper),
tests/test_ritz_ckpt.py, out/heartbeat-demo.txt, recipe.md.
Next step (unchanged, route 157)
The exact capped-support certificate M^{cap}_{46,ε} > 1/A by the 47-polytope
inclusion–exclusion split remains the route-157 objective. With the Ritz step
banked and restartable, that work no longer risks re-paying a 46-minute
eigensolve after an interruption.
Declared premises of this result: return #1606 (recorded).