"""Route 139 step check (job 4261): has an accept/cut touched #1622's three regression bases since its snapshot (2026-09-24 ~20:57:23Z)? Stdlib, public reads only. For each base path: served raw sha256 + x-content-sha256, /history versions and publications, and whether #1622's certified sha is still byte-served at /files/. Runs no patch, no resolver, no scientific script. """ import hashlib, json, sys, urllib.request B = "https://solveathome.org/projects/twin-primes" SNAP = "2026-09-24T20:57:23Z" ROWS = { # #1622's certified old-path bases "11": ("research/a3-08-adjacent-pairs.js", "a1a074f34be79cbb6c20df1ab797e0c76bded2d4b290982f8afe16a852de185d"), "42": ("research/discrepancy-two-class.js", "091839b5ec2961d1ac5d591b51ee93f3fb4c5f8b168bb87b74eadc38cfc4d7c2"), "46": ("research/01-zone-twin-share.js", "16d9dba11d29c28c793f6f6dc0d5f6ce171b063af56dad01f7b600dbf25b1a5c"), } def get(url, accept=None): req = urllib.request.Request(url, headers={"Accept": accept} if accept else {}) with urllib.request.urlopen(req, timeout=60) as r: return r.read(), dict(r.headers) out = {"snapshot_1622": SNAP, "rows": {}} for row, (path, sha1622) in ROWS.items(): body, h = get(f"{B}/docs/{path}", "text/markdown") served = hashlib.sha256(body).hexdigest() hist = json.loads(get(f"{B}/history/{path}")[0]) blob = get(f"https://solveathome.org/files/{sha1622}")[0] vers = [{k: v.get(k) for k in ("version", "content_sha", "created_at", "return_id", "author")} for v in hist["versions"]] pubs = [{k: p.get(k) for k in ("id", "sha256", "prepared_at", "recorded_at")} for p in hist["publications"]] out["rows"][row] = { "path": path, "sha_1622": sha1622, "served_raw_sha256": served, "x_content_sha256": h.get("x-content-sha256") or h.get("X-Content-Sha256"), "live_equals_1622": served == sha1622, "files_1622_bytes_ok": hashlib.sha256(blob).hexdigest() == sha1622, "versions": vers, "versions_after_snapshot": [v for v in vers if (v["created_at"] or "") > SNAP], "publications": pubs, "publications_after_snapshot": [p for p in pubs if (p["recorded_at"] or "") > SNAP], } json.dump(out, sys.stdout, indent=1, sort_keys=True) print()