# Recipe: reproduce job #2987's revision of `research/history/staging/attack-kstar-01.md` Python 3 (stdlib only) and network access to the project server. No credential: every input is a public content address. From the run directory, `runs/t1-2026-09-24/`: ```bash mkdir -p work/job2987/verify && cd work/job2987/verify ``` Put these four files here (they are on the return): | file | sha256 declared on the return | |---|---| | `apply-revision.py` | the deterministic re-applier — 16 anchored edits | | `verify-revision.py` | the checker (V1…V5, exit 0 iff all pass) | | `kstar_dfs.py` | the served instrument (same bytes as return #1144's copy, `02104457…`) | | `reproduce-row.py` | the added row's cell reproduction | ## 1. Re-derive the revision from the served document ```bash python verify-revision.py --apply apply-revision.py \ --base 1be1ded08fc8ef1018df3019f1f24ad603505f8615a3184ec19d20c9df46e510 \ --file 1200f6cac2d527e16f2ca2c39d19f3d0af383296d989e8750eca37ac1f3cff68 \ --instrument ./kstar_dfs.py --workdir . ``` It fetches `GET /docs/research/history/staging/attack-kstar-01.md` itself and then: * **V1** those bytes hash to the `base` above. If the revision has already been accepted and served, V1 instead reports `already_integrated: true` and stops — that is the expected outcome *after* integration, and it is why this check is safe to re-run; * **V2** `apply-revision.py` on exactly those bytes reproduces the `file` sha above, byte for byte; * **V3** the ladder line has 17 entries ending in 21, the 19#→43# row is present, no falsified count survives; * **V4** the frozen cells: `kstar_dfs.py 13 29` → 10, `13 31` → 17, `17 31` → 13; * **V5** every row's `s` satisfies the document's own `P(2s)` rule (the largest prime ≤ 2s), including the new row's 22, 23 → 43. Exit 0 and stdout identical to `verify-revision.out`. ## 2. Reproduce the row the revision adds ```bash python reproduce-row.py --instrument ./kstar_dfs.py --full \ --hash 02104457340ae375c6db641c62cb37cbad5ec0826f478469490c65eab3387ba0 \ > my-row.out diff my-row.out rerun-kstar_dfs.out && echo "byte-identical" ``` `--full` adds `kstar_dfs.py 19 43` (about three minutes; the frozen cells are seconds) and its two certificate cells. Expected, and byte-identical to the uploaded `rerun-kstar_dfs.out`: ``` python kstar_dfs.py 19 43 -> {"D":378675,"P":19,"PP":43,"Q":[23,29,31,37,41,43],"hi":378675,"kstar":20,"lo":0,"windows_tested":378695,"witness_start":22352} [19#->43# K*] match python kstar_dfs.py 19 43 -> {"N_k":4,"P":19,"PP":43,"k":20} [certificate cell N_20] match python kstar_dfs.py 19 43 -> {"N_k":0,"P":19,"PP":43,"k":21} [certificate cell N_21] match verdict: PASS ``` `reproduce-row.py` prints only fields that do not depend on the machine: `seconds` is dropped and the progress lines (elapsed seconds, on stderr) are never read. Without that, a covering search's stdout is not comparable across machines — the same reason the document names `seconds` as the only field that differs between runs, and quotes #1144's 329.2 s rather than the 175.6 s measured here. ## 3. Three traps this recipe exists to prevent 1. **Adding a row without moving the counts is the defect, not the fix.** The finding asks for one row; the served document says "five new steps", "16 doubling steps", "five new certificates", and ends its ladder at 17. Adding the row alone would leave four sentences false. V3 exists to catch exactly that, and it fails on the served base for that reason. 2. **A revision must be applied to the bytes that are actually served.** V1 refuses to check a diff against anything but the base sha; applying it to an already-revised copy silently produces a different file and a different sha — which is how a "fix" becomes a second, unreviewed edit. 3. **Do not re-derive another return's result.** The row's K* = 20 and its certificate cells are #1144's, already on the record; §1's "all five of this pass's new C₂ comparisons" sentence keeps its scope on the five and attributes the sixth by citation. The `--full` run corroborates and does not claim.