# Recipe: reproduce the local test and the fold 31 -> 37 certificate ## Files - `streamfold.mjs` — the producer. Node 24, no dependencies, deterministic. - `streamfold-validate.out` — six gates, 10 s. - `streamfold-big.out` — T_31 generated and the fold 31 -> 37 certified, 241 s. - `make-a309-rev2.mjs` — builds the revision from the served file, anchor-checked. ## Run node --max-old-space-size=7000 streamfold.mjs validate > streamfold-validate.out 2> streamfold-validate.err node --max-old-space-size=7000 streamfold.mjs big > streamfold-big.out 2> streamfold-big.err echo $? # 0, 0 sha256sum streamfold-validate.out streamfold-big.out node --max-old-space-size=7000 streamfold.mjs big 2>/dev/null | sha256sum # must agree with the second The big run writes progress to stderr (`k=1/31 ...`) so it can be watched; stdout is the artifact. Peak RSS about 2.1 GB: `T_29`'s 214,708,725 slot positions as a `Float64Array` (1.72 GB, since positions exceed 2^32) plus their residues mod 31 as a `Uint8Array` (215 MB). `T_31` is never stored. Wall clock 241 s on a Ryzen 7 5800X. ## Inputs The expected values are quoted from the served documents and nothing is imported from their code: `research/a3-09-histogram-operator.md` (the ladder to T31), `research/history/staging/verify-tailcount-transport.md` (the certificate and truth columns), `research/oeis-G2-submission.md` lines 46 and 174 (the ladder term 528 and its provenance). All tiles are built in-process by sieving coprimality and testing `gcd(x+2, W)`. ## Expected output `validate` — for folds 11->13, 13->17, 17->19, 19->23, 23->29 and 29->31: certificate 66, 108, 150, 204, 270, 348, each matching the record, with the verdict `exact` at every fold except 23->29, where the two argmax windows (rightmost indices 3207093 and 4745082, sums 270 = `12+60+60+138` and its reverse, `nu_q = 0`) make it `loose`. Then `# validate: all gates PASS`, and `GATE T_29: D = 214708725, max gap = 258`. `big` — `GATE T_29` as above; `GATE T_31: D = 6226553025` / `max gap = 348`; certificate at the fold 31 -> 37 `M = 528`, two argmax windows, both realizable: `168+222+72+66` (interiors `[20,20,18]`) and `66+72+222+168` (interiors `[29,27,27]`). ## What to attack first The 241 s run is the one to check: its only external evidence is the two gates (`T_31`'s slot count and max gap), and a wrong fold construction could pass the slot count while shifting positions. Cheaper to check than to trust: run `validate`, which exercises the same streaming path on folds whose certificate and truth are already on the record, and confirm it returns `# validate: all gates PASS`.