#!/usr/bin/env python3 # Job #609: build the audit patch for the four source-stale rows of # research/QUESTIONS.md (38, 39, 47, 48). Each corrected row text follows the # served source that supersedes it, quoted in the return. Every old string must # occur exactly twice (section 1 and section 2 of the generated index) and must # not occur inside the new string. import difflib, hashlib, io, sys P = "QUESTIONS.md" src = io.open(P, encoding="utf-8", newline="").read().replace("\r\n", "\n") def slice_between(a, b): i = src.find(a) if i < 0: raise SystemExit("start anchor not found: %r" % a[:60]) j = src.find(b, i) if j < 0: raise SystemExit("end anchor not found: %r" % b[:60]) return src[i:j + len(b)] EDITS = [] # --- row 38, Q-rec-cheapest-0830 ------------------------------------------------- old38 = slice_between("the exit-chain count is DERIVED (held)", "under z^{u0})") new38 = ( "the exit-chain count is DERIVED (held) to grow like z^{16s/9 - o(1)} for " "s <= 3, the hypothesis the 2026-08-30 red team added to the threshold, and " "z^{2s - o(1)} in the limit, so REC(s, u0) is false for every u0 < 16s/9 = " "4.7088 at s -> 1+sqrt(e), the whole legal band (2, beta_2] included, and " "RML(alpha) with it, its falsity beyond z ~ 5.6e31; at every computable z it " "is a proof gap (Omega(z) exact to z = 73 reads 251, and the ledger's former " "comparator 1.05e6 is HM(u0), not z^{u0} = 7.188e7 at z = 73, so the gap is " "68.3x larger than the ledger stated, while a certified lower bound 8.86e17 " "at z = 5e5 sits a factor 1.2e6 under z^{u0})" ) EDITS.append((old38, new38)) # --- row 39, Q-recon-0904-sifting-limit-floor ------------------------------------ old39 = slice_between("the cap at 4.26645 is a METHOD ARTEFACT at rung MEASURED", "the band (2, 4.26645] is untouched by anything proven.") new39 = ( "the cap at 4.26645 as a METHOD ARTEFACT at rung MEASURED is REFUTED as " "stated (rider 2026-09-04, from `redteam-0904-sifting-limit.md`, on four " "independent grounds): the level-D LP fixes one omega-profile out of the " "class Ford defines by a one-sided inequality, and a legal profile inside the " "classical budget at x = 13 reads 5.0113 calibrated, above beta_2, firing the " "note's own pre-registered refutation; the ledger's \"3.3152 sits about 18 per " "cent below the DHR value\" is 22.3 per cent; and its \"passed, 0 of 15\" " "external test does not survive, so the calibrated sentence is that no barrier " "theorem exists, no axiom-only argument inside the band is exhibited, and the " "LP number is a finite-level measurement for one profile; the band " "(2, 4.26645] is untouched by anything proven." ) EDITS.append((old39, new39)) # --- row 47, Q-xchannel-closedform ---------------------------------------------- old47 = "match to 2%. |" new47 = ( "match to 2%. The @31 figure is quoted at the run's own sigma_J = 0.000024, " "and audit #85 (accepted, verified, its also_fix unapplied) records that the " "note's section 7 calls that sigma inherited rather than derived: under the " "slot-clustered sigma calibrated in `item-x-offset.md` section 4 on seven " "known-truth controls the same residual reads z = -2.32, inside the " "pre-registration's own HIT band, so this row's \"one detection at 4.93 " "sigma\" is zero detections at the pre-registration's threshold; the adjacent " "`Q-xchannel-offset` row quotes -0.43 and -2.32 for this same law at the same " "two levels, a factor 2.09 and 2.13 apart. |" ) EDITS.append((old47, new47)) # --- row 48, Q-xchannel-offset -------------------------------------------------- old48 = "and the deciding blind test at @37 is pre-registered and committed alone." new48 = ( "and the deciding blind test at @37 has RUN: `Q-xchan-at37-score` (ANSWERED, " "2026-08-21) measures 1 - J = 0.020823 there, below every registered " "prediction, so scored exactly as registered every one of the seven " "candidates dies at |z| = 104 to 122 with a 13.4*S3 shortfall and an EMPTY " "survivor set, and the finite-level-correction family is CLOSED as the " "offset's description, this row's 4S2 - S3 candidate with it; the @37 note's " "proposed TODO item X update is recorded there as \"report only, not applied\"." ) EDITS.append((old48, new48)) new_src = src for old, new in EDITS: n = new_src.count(old) if n != 2: raise SystemExit("old string occurs %d times, expected 2: %r" % (n, old[:70])) if old in new: raise SystemExit("new string still contains the old: %r" % old[:70]) new_src = new_src.replace(old, new) if new_src.count("\n") != src.count("\n"): raise SystemExit("line count changed") diff = difflib.unified_diff(src.split("\n"), new_src.split("\n"), fromfile="a/research/QUESTIONS.md", tofile="b/research/QUESTIONS.md", lineterm="", n=2) patch = "\n".join(diff) + "\n" io.open("job609/questions-rows38-52.patch", "w", encoding="utf-8", newline="").write(patch) io.open("job609/QUESTIONS.corrected.md", "w", encoding="utf-8", newline="").write(new_src) changed = sum(1 for ln in patch.split("\n") if ln.startswith(("+", "-")) and not ln.startswith(("+++", "---"))) print("edits:", len(EDITS), " changed lines in patch:", changed) print("served QUESTIONS.md sha256(raw):", hashlib.sha256(io.open(P, "rb").read()).hexdigest()) print("patched QUESTIONS.md sha256(LF):", hashlib.sha256(new_src.encode()).hexdigest()) for f in ("job609/questions-rows38-52.patch", "job609/QUESTIONS.corrected.md"): raw = io.open(f, "rb").read() print(f, len(raw), "sha256(raw):", hashlib.sha256(raw).hexdigest())