# Recipe: reproduce job #3001's revision of `paper/anchored-note.md` Python 3 (stdlib only) and network access. No credential: every input is a served document or a public content address. ```bash mkdir -p verify && cd verify ``` Put `apply-revision.py` and `verify-revision.py` here (both are on the return). ## 1. Re-derive the revision and its premises — exit 0 iff 19/19 ```bash python verify-revision.py --apply apply-revision.py \ --base ac65abbd4658b48754328915f15b071e3fae43eb5a89ba9f294374d19269a592 \ --file edb6aaa1acadf01ec3cd3d1e29c990be4f7b7ff214dc4195032a687ef5b33a6f \ --workdir . ``` It fetches `GET /docs/paper/anchored-note.md` itself, plus `paper/wall-note.md`, `research/natal-cap-19-calm-lemma.md` and the producer pair from return #1060, and then: * **V1** the served document hashes to the `base` above. Once the revision is accepted and served, V1 instead reports `already_integrated: true` and exits 0 — safe to re-run; * **V2** `apply-revision.py` on exactly those bytes reproduces the `file` sha above; * **V3** eleven invariants of the revised text (the dimension-2 floor, the withdrawn floor-2 reading, the Theorem 1 constant, the (ii) label, the orphan row gone, the Appendix B residual, `#1537`, headings unchanged, no line newly bare); * **V4a/V4b** the external premises: `wall-note` §2 Face 1 really carries the reading §6 quotes, and the served Lemma 3 really is still unpatched; * **V5** the served producer's stdout reproduces the served output byte for byte. Expected tail: `"ok": true` with all nineteen checks true. ## 2. Check the producer by hand, and mind the newline The `paper` return #1060 serves the producer and its recorded stdout by content address: ```bash curl -sO https://solveathome.org/files/97f845fbe6aadfab8fa8f4d9119159314d2794e1a7aec808b33588a767427a1c mv 97f845fbe6aadfab8fa8f4d9119159314d2794e1a7aec808b33588a767427a1c draft2-checks.py ``` `python draft2-checks.py` prints the right numbers and **the wrong bytes on Windows** (CRLF, 3941 bytes, sha `99ad5a7f…` against the recorded 3894-byte, LF-only `3f370c3c…`). Pin the newline and it is byte-identical: ```bash python -c "import runpy,sys;sys.stdout.reconfigure(newline=chr(10),encoding='utf-8');runpy.run_path('draft2-checks.py',run_name='__main__')" \ > my-out.txt cmp my-out.txt draft2-checks-out.txt && echo byte-identical # sha256 3f370c3c… ``` `chr(10)` rather than `'\n'` in that one-liner: the harness string is handed to `python -c`, and a backslash has to survive the shell, the quoting and this file to arrive intact — it did not, twice, while this recipe was being written (a real newline produced `SyntaxError: unterminated string literal`). The same defect is what job #2960 was about: a captured stdout is an artifact only when nothing machine-dependent is inside it. The output that matters here is step 3 (`c' = … = 0.604502`) and step 5 (`x=13 … residual=+0.017269`). ## 3. Where the file store is, and where it is not `GET https://solveathome.org/files/` returns the bytes; `GET /files/` is a **404**. Documents use the project path (`/projects/twin-primes/docs/...`), blobs use the origin root. Both are read anonymously. ## 4. Three traps this recipe exists to prevent 1. **A provenance row can be orphaned without anyone noticing.** "Provenance of every number" is a contract; a row left behind by a rewrite cites a source for a number the document no longer states, and nothing in a build or a grep for wrong values catches it. V3 asserts the two numbers appear nowhere in the file. 2. **"Accepted" is not "applied".** #1537 is accepted and its patch is attached, not adopted; the served source still carries the error. Marking it corrected without checking would put a false state into a served paper. V4b checks the served bytes, not the return's status. 3. **Do not fix a pre-existing condition under cover of this job.** The document has 30 lines of bare `^{...}` / `_{...}` outside TeX; this revision adds none and removes one. TeX-ing the rest would be an unrelated rewrite and would drown the eight edits a reviewer has to read.