# Recipe — job #3013, every step from the served bytes Paths are relative to the repository root; nothing here needs a credential, and the only tools are `python3` (stdlib) and `node`. The served bytes are in this package as `fold-profile-13-hotspot-sweep.base.js` (`0ebd5120…`), so the whole revision is reproducible offline; to start from the store instead, fetch `GET /docs/research/fold-profile-13-hotspot-sweep.js` and check the sha. Lay out the scratch tree the corpus paths expect (the sweep and the two QC modules it needs): ``` mkdir -p /tmp/f13/research/qc cp fold-profile-13-hotspot-sweep.base.js /tmp/f13/research/fold-profile-13-hotspot-sweep.js cp /tmp/f13/research/qc/embed.js cp /tmp/f13/research/qc/tailfmt.js ``` **1. See the defect and the gate's own verdict on the served file.** ``` cd /tmp/f13 node research/qc/embed.js --check research/fold-profile-13-hotspot-sweep.js ``` `code-sha256 matches`, `body matches out-sha256`, then `out-sha256 DIFFERS` on this build (see step 5 — it is the host locale, not the code), and the advisory lists the READINGS figures the block does not carry. **2. Apply the revision.** ``` cd /tmp/f13 python apply-revision.py --base research/fold-profile-13-hotspot-sweep.js \ --out research/fold-profile-13-hotspot-sweep.rev.js --diff rev.diff ``` Five anchors, each required to match exactly once; it refuses a base whose sha is not `0ebd5120…`. `rev.diff` should equal `revision.diff` in this package, and the output sha should be `300f20fd…` (the pre-embed revision). **3. Re-embed, because the code above the banner changed.** ``` cp research/fold-profile-13-hotspot-sweep.rev.js research/fold-profile-13-hotspot-sweep.js node research/qc/embed.js --streams both research/fold-profile-13-hotspot-sweep.js diff <(# the pre-embed file) research/fold-profile-13-hotspot-sweep.js # == reembed.diff ``` `out-sha256` must come out **unchanged** at `2f869b3a…`; that is the proof the pasted block is the same run. What changes is `code-sha256`, the added `body-lines: 86`, `node:`/`embedded:`/`elapsed:` and the four timestamp lines of the body — nothing else. **4. The gate, now green.** ``` node research/qc/embed.js --check research/fold-profile-13-hotspot-sweep.js # exit 0 ``` **5. Reproduce the locale finding on any non-comma host.** On a host whose default locale groups with U+202F (fr-FR here), the *served* file fails step 1 for that reason alone: ``` node reproduce-block.js --repo /tmp/f13 research/fold-profile-13-hotspot-sweep.js ``` on the served bytes: `plain does not reproduce`, `grouping pinned to en-US MATCHES`. On the revision both lines match. `reproduce-block.js` pins the grouping only in the child process (`node -r `); it never edits the tree. **6. The provenance claim.** ``` python reproduce-retired.py --served research/fold-profile-13-hotspot-sweep.base.js ``` Each candidate form of `rnd` is written into a scratch copy and the two SEAMS blocks are printed. The `mod 2**31` family (four spellings) reproduces all six retired digits; the served `Math.imul` form reproduces the table's six; `& 0xffffffff`, `% 2**32` and `| 0` print no seam block at all. **7. The whole verdict.** ``` python verify-revision.py --file fold-profile-13-hotspot-sweep.js \ --base fold-profile-13-hotspot-sweep.base.js \ --apply apply-revision.py --retired reproduce-retired.py --repo /tmp/f13 ``` Exit 0 and stdout identical to `verify-revision.out`: 13 booleans, `ok: true`. ## Two things to know before re-running * **The run is genuinely reproducible; the wall clock is not.** `out-sha256` is over the *normalised* capture, and `tailfmt` scrubs exactly the volatile lines, so the timestamps in the pasted body differ between runs while the hash does not. Both scripts here print `out-sha256 matches` and nothing about elapsed time, so a fresh run diffs byte for byte. * **`--check` re-runs the recorded invocation** (`node research/fold-profile-13-hotspot-sweep.js`) from the repository root inside the tree it is given; it needs `research/qc/tailfmt.js` beside `embed.js`, and it takes about five seconds.