#!/usr/bin/env python3 """Offline checks for job #1519 (rescue reassessment of return #7). Run from the department root (the folder that holds .solveathome/): python3 .solveathome/runs/run_20260916_173305_986jFw/work/job1519/checks.py > checks.json Every check reads only files already saved under this run's work/job1519/replies/ plus the served documents fetched through the tested request path. No network, no machine-specific paths, no credentials. Prints one JSON object; exit code 0 if all checks pass, 1 otherwise. """ import hashlib import json import os import re import sys RUN = ".solveathome/runs/run_20260916_173305_986jFw" REP = os.path.join(RUN, "work", "job1519", "replies") checks = [] def chk(name, ok, detail): checks.append({"name": name, "ok": bool(ok), "detail": detail}) def load(path): with open(path, encoding="utf-8") as fh: return json.load(fh) def text(path): with open(path, encoding="utf-8") as fh: return fh.read() # ---------------------------------------------------------------- return #7 as issued r7 = load(os.path.join(REP, "return-7.json")) r7 = r7.get("reply", r7) rev = (r7.get("reviews") or [{}])[0] chk("return #7 is the audit of beta2-note by job #58, decided rejected by review #12", r7.get("id") == 7 and r7.get("job_id") == 58 and r7.get("type") == "audit" and r7.get("status") == "rejected" and rev.get("id") == 12 and rev.get("verdict") == "reject", "id=%s job=%s type=%s status=%s review=%s verdict=%s rung=%s verification=%s" % (r7.get("id"), r7.get("job_id"), r7.get("type"), r7.get("status"), rev.get("id"), rev.get("verdict"), rev.get("rung"), rev.get("verification"))) notes = rev.get("notes_md") or "" chk("the review's own headline says the mathematical content is NOT refuted (statement survives)", "The sieve argument is not refuted by this review." in notes, "verbatim: 'The sieve argument is not refuted by this review.'") chk("the rejection is dominated by a custody condition (transcript withheld -> independent rerun)", "transcript is withheld" in (rev.get("rerun_reason") or "") and "withholds the pre-launch transcript" in notes, "rerun_reason: %s" % (rev.get("rerun_reason") or "")[:160]) # ---------------------------------------------------------------- falsifier 1, executed ec = text(os.path.join(REP, "exponent-control.js")) lines = ec.split("\n") L506 = lines[505] if len(lines) > 505 else "" L508 = lines[507] if len(lines) > 507 else "" chk("FALSIFIER 1 FAILS: research/exponent-control.js OUTPUT S7 line 506 prints 1.801 +-0.074 and 1.539+-0.094", "1.801" in L506 and "+-0.074" in L506 and "1.539+-0.094" in L506, "line 506: %s" % L506.strip()[:120]) chk("FALSIFIER 1 FAILS: OUTPUT S7 line 508 prints the h2 corrected result 1.566+-0.058", "1.566+-0.058" in L508, "line 508: %s" % L508.strip()[:120]) chk("so the audit report's issue-7 claim ('neither served source prints the uncertainties') is " "factually false -- a locator error in the attempt's report, not a defect of the paper", "1.801" in L506 and "1.566+-0.058" in L508, "the producing script prints every figure the report declared unavailable") # ---------------------------------------------------------------- served file identity note = text(os.path.join(REP, "beta2-note.md")) sha = hashlib.sha256(note.encode("utf-8")).hexdigest() chk("the served note is byte-identical to the original the review names (no drift between reader and server)", sha == "c6c23609c582c8d423fd7926449875df1dcc4e50e8f3d4b2af06b203c88584b6", "sha256=%s (review names c6c23609...584b6 as the original, b8721a0d... as the rejected revision)" % sha) chk("the served note itself prints the standard errors the revision downgraded (1.801 +/- 0.074, 1.54 +/- 0.09, 1.57 +/- 0.06)", "1.801 \u00b1 0.074" in note and "1.54 \u00b1 0.09" in note and "1.57 \u00b1 0.06" in note, "so the correction is 'cite the producer', not 'withdraw the figures'") # ---------------------------------------------------------------- correction 3, external grounding erd = text(os.path.join(REP, "erdos687.txt")) chk("correction 3 is grounded in the published record: Erd\u0151s problem #687 is OPEN, with Iwaniec's x^2 " "as the best known upper bound and Maier-Pomerance only a conjecture", "OPEN" in erd and "Iwaniec" in erd and "Y(x) \\ll x^2" in erd and "conjectured" in erd, "so neither exponent 1 nor near-linear growth is proven for the one-class control") chk("the 'exponent 1 + o(1)' calibration is shared by the producer, not invented by the revision", "true exponent 1 + o(1)" in ec and "h has exponent 1 + o(1)" in re.sub(r"\s+", " ", note), "same overclaim in research/exponent-control.js header and in the served note \u00a75") # ---------------------------------------------------------------- correction 2, attempt-level chk("correction 2 is attempt-level: the served \u00a75 pair really is 41# -> 546, and no 43#/'p_n=43' label is " "introduced by the server's copy", "41^{4.26645}" in note and "actual G\u2082 = 546" in note and "p\u2099=43" not in note, "the 43 / G\u2082=618 row enters only through return #7's submitted revision") # ---------------------------------------------------------------- correction 4, statement-level prose chk("correction 4 targets a pre-existing prose overclaim of the served note, not the theorem", "exponent 2 is equivalent in strength to the twin" in re.sub(r"\s+", " ", note), "served \u00a76.6: 'exponent 2 is equivalent in strength to the twin prime conjecture' -- present " "in the file the review read, before any revision") chk("the decisive finite claims were independently reproduced by the reviewer with published files " "(nine levels through 23#; 41# certificate), so the computations are not part of what closed", "2, 6, 12, 30, 42, 66, 108, 150, 204" in notes and "3,784,200,788,777" in notes and "/files/66841a0328373d87cd18a74a74f625b12dd205c826028a2f3127194613456297" in notes, "nine exact rows matched, all nine censuses matched, certificate endpoints confirmed") chk("external search channels: erdosproblems.com/687 readable (200), hosted web_search returned nothing " "on three queries -- a CHANNEL FAILURE, never evidence of absence", len(erd) > 500, "read_url 200 on the one authoritative status page; web_search: 0 results for three queries") out = { "script": "checks.py", "run": "run_20260916_173305_986jFw", "job": 1519, "passed": sum(1 for c in checks if c["ok"]), "total": len(checks), "checks": checks, } print(json.dumps(out, indent=1, ensure_ascii=False)) sys.exit(0 if out["passed"] == out["total"] else 1)