# Recipe — reproduce the `recon-0830-smooth-aps.md` revision Offline after five anonymous fetches; deterministic; Python standard library only. Run from this folder (`work/j3653`). `` = `https://solveathome.org/projects/twin-primes`. ``` # 1. the served document and the finding list (anonymous reads; both are public project data) python3 fetch_doc.py /docs/research/history/staging/recon-0830-smooth-aps.md # -> doc/recon-0830-smooth-aps.md 38698 B, x-content-sha256 b64900a74c7649dbc91e4f8efc5e181d705150ffd3db4db115447a8ef0eab38e python3 fetch_api.py "/findings?path=research/history/staging/recon-0830-smooth-aps.md" # -> seven open findings: 6, 142, 201, 222, 2554, 2555, 2556 # 2. the record the revision answers (each by sha256, so the reads are pinned) python3 fetch_api.py /return/269 # base of #142 and #222: the ledger verdict rewrite python3 fetch_api.py /return/925 # revision_sha b64900a7 = the served text; review 323 python3 fetch_api.py /return/926 # the scoped transfer; review 188 (accept, proven) python3 fetch_api.py /return/921 # the two families; review 187 (accept, proven) python3 fetch_api.py /return/1548 # the rejected 3.4(b) hunk; review 424 (reject, refuted) python3 fetch_api.py /return/184 # finding #222's source python3 fetch_doc.py /docs/research/history/staging/redteam-0830-imports.md # a1130c9693b46e3305a206b0e9061ac03f1cd827538590d7423714b2c7994a8c # optional, for the hunk under review: # https://solveathome.org/files/a940885e8ba82a06357cfaf65be5d5e1a99779a6faa82a8b19c1e2fe345bd9e1 (#1548's file) # https://solveathome.org/files/ebb979f53de43f8bf1079d4aaaea09a3e6ff30db531b8f171237122df444c164 (#269's file) # https://solveathome.org/files/ded0e9ddc4930e72b6ea27fa1a04d02702dd818cdab208f44978006123953dcc (#926 report) # 3. write the revised document and its diff python3 fix_recon.py doc/recon-0830-smooth-aps.md out/recon-0830-smooth-aps.md > fix-recon.out ``` `fix_recon.py` refuses to write unless the input sha256 is `b64900a7…` and contains no CR, and unless **each** of its nine replacements matches its old string exactly once and its new string zero times — so a drifted base fails loudly instead of patching the wrong place. It then prints the hunk list, the structural guards and the before/after digests. Expected (`fix-recon.out`, sha256 `a8af6565a54329dd9e9b881c1f56f4c728d86b18f60860ba9d3c3d520016e899`): ``` edits applied (old string occurred once): nine lines, all ok verdict line replaced at line 7 (1-indexed) lines 408 -> 445 9 non-equal hunks ... ledger block opens: True ; closes: True ; todo line: True ledger lines 3-6 and 8-9 untouched: True section count: 13 headings -> 13 table rows: 25 -> 25 sha256 before b64900a74c7649dbc91e4f8efc5e181d705150ffd3db4db115447a8ef0eab38e sha256 after 9bcd35cc0db13fbd98f3ffac36c1510a1ace5f01b97200f23fa90ba55fc9b65e bytes 38698 -> 41940 diff: +48 -12 lines in 4 hunks ``` `out/recon-0830-smooth-aps.md.diff` is the whole change (sha256 `c2d292cc37cbab40dec73fc168996b4fddadb5a76746493e24b26b55f49f686e`), with `a/research/…` and `b/research/…` headers, so `git apply -p1` in a checkout of the served corpus reproduces the revised file from the served one. There is no build step and no script to run: the target is a served Markdown note, and its only executable companion is `research/history/staging/recon-0830-smooth-aps.js` (embedded by `node research/qc/embed.js`, PARTS A-C), which this revision does not touch — the change is prose and citations, so no producer output is affected and no embedded hash exists to re-embed (0 matches for a 64-hex digest in the served bytes). **What the recipe does not establish.** It does not re-run the two checks the note's own producer performs (§3.2's identity and the kernel bound), because the revision does not change the mathematics they check. It does not re-fetch Harman, Acta Arith. 91 (1999) 279-289: that addition is carried from red-team row b7 (`redteam-0830-imports.md` `a1130c96…`), which read Soundararajan p. 1 and reports Harman's statement there. It does not adjudicate the three further red-team rows left open on this document (b1's two misquotes in the Harper table row, b5's dropped `M^{1/2}` in section 0, b7's DGS constant `5/2`); those are named in the report for the next fix job. And it does not regenerate `research/QUESTIONS.md`, which still prints the old verdict at two places until the index is rebuilt from the corrected ledger block. Run time: under 5 s for step 3; the fetches dominate.