#!/usr/bin/env python3 """ The Neon Capstones — Unified 125-Check Live Verification Runner & Master 35-Observatory Auditor =============================================================================================== Zero-dependency Python 3 verifier for Part IV (Observatories #31–#35, 25 Chambers) and the complete 35-Observatory, 176-Chamber Neon Grand Constellation: 1. Audits the 25-chamber, 25-bridge Golden-Pentagon Capstone constellation graph (uniqueness, completeness, connectivity across all 5 capstones, valid routes) and the 4-Atlas / 35-Observatory Master Registry. 2. Default mode: fetches all 5 live Capstone verifier scripts (#31–#35) from GitLab Pages, computes exact byte lengths and SHA-256 receipts, executes every suite locally, and confirms 5/5 Capstones and 125/125 mathematical checks pass with 0 failures. 3. Master mode (--all-35): runs all 5 Capstones AND executes the 3 sibling live Grand Portal unified verifiers (Decet 10 + Companions 10 + Specials 10) for a complete 35/35 Observatory · 176-Chamber · 1,382,106-Byte end-to-end certification. Usage: python3 verify_capstones.py # Topology audit + 5 live Capstones (125 checks) python3 verify_capstones.py --all-35 # Full 35-Observatory Master Sweep (all 4 suites) python3 verify_capstones.py --topology # Audit only the 25-chamber / 25-bridge graph python3 verify_capstones.py --cap C31 C35 # Audit + selected Capstones (C31..C35) """ import argparse import collections import hashlib import os import re import subprocess import sys import tempfile import time import urllib.request CAPSTONES = [ { "num": "C31", "obs": "#31", "short": "Harmony", "title": "The Neon Harmony, Acoustics & Algorithmic Counterpoint Atelier", "url": "https://the-neon-harmony-atelier-7e43e6.gitlab.io/", "verifier": "verify_harmony.py", "chambers": [ ("C31.1", "euclidean", "Euclidean Rhythms, Bjorklund & Evenness"), ("C31.2", "tuning", "Just Intonation, Commas & Continued Fractions"), ("C31.3", "fm", "FM Synthesis, Bessel Sidebands & Jacobi–Anger"), ("C31.4", "shepard", "Shepard–Risset Pitch Helix & Tritone Paradox"), ("C31.5", "counterpoint", "Neo-Riemannian PLR Group (D₁₂) & Crab Canon"), ], }, { "num": "C32", "obs": "#32", "short": "Color", "title": "The Neon Color, Vision & Perceptual Geometry Atelier", "url": "https://the-neon-color-atelier-baa238.gitlab.io/", "verifier": "verify_color.py", "chambers": [ ("C32.1", "cie", "CIE 1931 Chromaticity, Grassmann & Planckian Locus"), ("C32.2", "macadam", "MacAdam Ellipses, CIEDE2000 & OKLab Geodesics"), ("C32.3", "metamers", "Spectral Metamerism, Cohen Matrix R & Nullspace"), ("C32.4", "cones", "LMS Cones, Dichromacy Copunctal Points & Ishihara"), ("C32.5", "structural", "Thin-Film Fresnel–Airy & Morpho Bragg Iridescence"), ], }, { "num": "C33", "obs": "#33", "short": "Cartography", "title": "The Neon Cartography, Map Projections & Geodesy Atelier", "url": "https://the-neon-cartography-atelier-ef00a1.gitlab.io/", "verifier": "verify_cartography.py", "chambers": [ ("C33.1", "projections", "Map Projections, Tissot Indicatrix & Egregium"), ("C33.2", "loxodrome", "Great Circles, Finite Polar Loxodromes & Clairaut"), ("C33.3", "geodesy", "WGS84 Vincenty Geodesics & Jacobi 4-Cusped Astroid"), ("C33.4", "polyhedral", "Polyhedral Dymaxion, Descartes 720° & Snyder"), ("C33.5", "spherical", "Girard Excess, Stereographic Circles & Borsuk–Ulam"), ], }, { "num": "C34", "obs": "#34", "short": "Quantum", "title": "The Neon Quantum Computing, Entanglement & Error Correction Atelier", "url": "https://the-neon-quantum-computing-atelier-3ecb67.gitlab.io/", "verifier": "verify_quantum_computing.py", "chambers": [ ("C34.1", "bloch", "Bloch Sphere, SU(2) 4π Cover & Clifford S₄"), ("C34.2", "bell", "Bell States, CHSH 2√2 Tsirelson & Teleportation"), ("C34.3", "grover", "Grover 2D Subspace Rotation & Soufflé Problem"), ("C34.4", "qft", "Quantum Fourier Transform, QPE & Shor Factoring"), ("C34.5", "qec", "Steane [[7,1,3]], Surface [[9,1,3]] & Knill–Laflamme"), ], }, { "num": "C35", "obs": "#35", "short": "Computability", "title": "The Neon Computability, Turing Machines & Lambda Calculus Atelier", "url": "https://the-neon-computability-atelier-59844a.gitlab.io/", "verifier": "verify_computability.py", "chambers": [ ("C35.1", "turing", "Busy Beaver BB(2)–BB(5) & Marxen–Buntrock Macro"), ("C35.2", "lambda", "Lambda Calculus, Church–Rosser & Y-Combinator"), ("C35.3", "automata", "Chomsky Hierarchy, Myhill–Nerode & Pumping Lemma"), ("C35.4", "tag", "Post Tag Systems, De Mol Collatz & Minsky 2-Counter"), ("C35.5", "godel", "Gödel Numbering, Halting Diagonal & Kolmogorov"), ], }, ] # 25 Cross-Disciplinary Capstone Bridges across #31–#35 BRIDGES = [ ("C31.1", "C31.2", "Euclidean Bjorklund evenness & Stern–Brocot / Farey continued fractions share the exact same mediant tree"), ("C31.2", "C34.4", "Continued-fraction convergents that yield 53-EDO (0.068¢) are the exact Shor post-processing algorithm extracting period r"), ("C31.3", "C34.4", "Jacobi–Anger Bessel harmonics & Quantum Fourier Transform unitary phase estimation share discrete Fourier duality"), ("C31.3", "C32.5", "FM optical/acoustic sideband interference & multilayer Bragg thin-film transfer-matrix reflection share wave phase superposition"), ("C31.4", "C33.2", "The Shepard–Risset logarithmic pitch helix & the finite-length spherical loxodrome are both constant-bearing logarithmic spirals"), ("C31.4", "C32.1", "Circular pitch-class perception (Tritone Paradox) & CIE closed hue/purple-line chromaticity both wrap 1D spectra into perceptual loops"), ("C31.5", "C34.1", "Neo-Riemannian dihedral group D₁₂ = ⟨P,L,R⟩ & the 24-element single-qubit Clifford group S₄ = ⟨H,S⟩ are finite symmetry generators"), ("C31.5", "C35.2", "Palindromic Crab Canon symmetry & Church–Rosser confluence both preserve global invariants under local reversible rewrites"), ("C31.1", "C35.3", "Periodic Euclidean necklace rhythms & minimal Myhill–Nerode cyclic DFAs share exact congruence-class periodicity"), ("C32.1", "C33.1", "CIE projective chromaticity projection (X,Y,Z) → (x,y) & gnomonic/perspective map projections share projective ray geometry"), ("C32.2", "C33.1", "MacAdam discrimination ellipses & Tissot distortion indicatrices are both Riemannian metric tensors drawn as tangent ellipses"), ("C32.2", "C33.3", "CIEDE2000 perceptual color geodesics (70.38 → 59.79) & WGS84 ellipsoidal Vincenty geodesics both minimize curved-metric arc length"), ("C32.3", "C34.2", "Wyszecki 28D metameric nullspace projection (R²=R) & reduced quantum density partial trace both erase unobserved Hilbert dimensions"), ("C32.3", "C35.5", "Many-to-one spectral metamerism & Kolmogorov incompressibility pigeonhole both quantify finite-channel information loss"), ("C32.4", "C34.5", "Cone-loss dichromacy projection onto a 2D confusion plane & stabilizer syndrome projection onto error subspaces share linear projection"), ("C32.5", "C34.3", "Constructive/destructive Fabry–Pérot Bragg phase stacking & Grover 2D amplitude amplification share unitary interference"), ("C33.1", "C33.4", "Gauss Theorema Egregium zero-distortion impossibility & Descartes 720° polyhedral angle defect concentrate curvature at vertices"), ("C33.2", "C33.5", "Great-circle sailing & Girard spherical excess A+B+C−π both govern geodesic triangles on constant positive curvature S²"), ("C33.5", "C34.1", "Stereographic projection S² → ℂ̂ & the SU(2) Bloch sphere qubit state map identify Möbius maps with single-qubit gates"), ("C33.4", "C34.5", "Polyhedral icosahedral/toric tessellations & the Rotated Surface Code [[9,1,3]] topological lattice both protect invariants globally"), ("C33.5", "C35.5", "Borsuk–Ulam antipodal theorem (f(x)=f(−x)) & Cantor–Turing Halting diagonalization both forbid continuous/computable escape"), ("C34.1", "C34.2", "Single-qubit SU(2) unitary rotations & two-qubit Bell entanglement with CHSH 2√2 Tsirelson violation"), ("C34.3", "C35.1", "Grover O(√N) unstructured quantum query speedup vs classical Turing machine Ω(N) search lower bound"), ("C34.4", "C35.4", "Shor polynomial-time quantum period factoring vs Post 2-Tag Collatz / Minsky universal arithmetic dynamics"), ("C34.5", "C35.5", "Quantum error-correcting Hamming/Steane codes & Elias Gamma prefix-free Kraft inequality both obey coding-theoretic capacity bounds"), ] SIBLING_ATLASES = [ ( "Part I · Neon Decet (Vols I–X · 51 Chambers)", "https://the-neon-decet-atlas-a6206b.gitlab.io/verify_decet.py", 10, 51, 329564, ), ( "Part II · Physics Companions (C1–C10 · 50 Chambers)", "https://the-neon-companions-constellation-atlas-6aaff0.gitlab.io/verify_companions.py", 10, 50, 388224, ), ( "Part III · Special Editions (SE I–X · 50 Chambers)", "https://the-neon-special-editions-constellation-atlas-8d86a6.gitlab.io/verify_specials.py", 10, 50, 453421, ), ] def fetch_with_retry(url, ua="Neon-Capstones-Master-Verifier/1.0", timeout=35): req = urllib.request.Request(url, headers={"User-Agent": ua}) for attempt in range(4): try: with urllib.request.urlopen(req, timeout=timeout) as resp: return resp.status, resp.read() except Exception: if attempt == 3: raise time.sleep(0.5 * (attempt + 1)) def audit_topology(): print("=" * 78) print("THE NEON CAPSTONES — GOLDEN-PENTAGON ATLAS TOPOLOGY & REGISTRY AUDIT") print("=" * 78) assert len(CAPSTONES) == 5, f"Expected 5 capstones, got {len(CAPSTONES)}" chamber_map = {} routes = set() for cap in CAPSTONES: assert len(cap["chambers"]) == 5, f"{cap['num']} must have 5 chambers" for cid, slug, name in cap["chambers"]: assert cid not in chamber_map, f"Duplicate chamber ID: {cid}" route = f"{cap['url']}#{slug}" assert route not in routes, f"Duplicate route: {route}" routes.add(route) chamber_map[cid] = (cap["num"], slug, name) assert len(chamber_map) == 25, f"Expected 25 chambers, got {len(chamber_map)}" seen_pairs = set() cap_adj = collections.defaultdict(set) cross_count = 0 for a, b, note in BRIDGES: assert a in chamber_map, f"Unknown bridge source: {a}" assert b in chamber_map, f"Unknown bridge target: {b}" assert a != b, f"Self-loop bridge: {a}" key = tuple(sorted((a, b))) assert key not in seen_pairs, f"Duplicate bridge: {key}" seen_pairs.add(key) assert len(note.strip()) >= 20, f"Bridge note too short for {key}" ca, cb = chamber_map[a][0], chamber_map[b][0] if ca != cb: cross_count += 1 cap_adj[ca].add(cb) cap_adj[cb].add(ca) # Check K5 completeness of cross-capstone meta-graph! visited = set() q = collections.deque(["C31"]) visited.add("C31") while q: u = q.popleft() for v in cap_adj[u]: if v not in visited: visited.add(v) q.append(v) assert len(visited) == 5, f"Capstones bridge graph disconnected: {len(visited)}/5" min_deg = min(len(cap_adj[c["num"]]) for c in CAPSTONES) assert min_deg == 4, f"Expected complete K5 capstone pentagram (deg=4), got min_deg={min_deg}" # Verify Grand 35-Observatory totals total_obs = sum(s[2] for s in SIBLING_ATLASES) + len(CAPSTONES) total_ch = sum(s[3] for s in SIBLING_ATLASES) + len(chamber_map) assert total_obs == 35, f"Expected 35 total observatories, got {total_obs}" assert total_ch == 176, f"Expected 176 total chambers, got {total_ch}" print(" [PASS] Capstone registry: 5 Ateliers (#31–#35) · 25 Chambers · 25 unique #hash routes") print(f" [PASS] Pentagram bridges: {len(BRIDGES)} unique bridges ({cross_count} cross-capstone), 0 duplicates") print(f" [PASS] Meta-graph topology: Complete K₅ pentagram (every capstone links to all 4 others, deg = {min_deg})") print(f" [PASS] Grand Constellation totals: 4 Atlases · {total_obs} Observatories · {total_ch} Interactive Chambers") return True def run_live_capstones(selected_caps): print("\n" + "=" * 78) print("LIVE GITLAB PAGES 125-CHECK VERIFICATION SWEEP (CAPSTONES #31–#35)") print("=" * 78) results = [] total_chambers = 0 total_bytes = 0 total_checks_pass = 0 total_checks_fail = 0 t_all = time.time() with tempfile.TemporaryDirectory(prefix="neon_capstones_") as tmpdir: for cap in CAPSTONES: if selected_caps and cap["num"] not in selected_caps: continue script_url = cap["url"] + cap["verifier"] t0 = time.time() status, raw = fetch_with_retry(script_url) assert status == 200, f"HTTP {status} for {script_url}" sha = hashlib.sha256(raw).hexdigest() local_path = os.path.join(tmpdir, f"{cap['num']}_{cap['verifier']}") with open(local_path, "wb") as fh: fh.write(raw) proc = subprocess.run( [sys.executable, local_path], capture_output=True, text=True, timeout=120, ) dt = time.time() - t0 out = (proc.stdout or "") + "\n" + (proc.stderr or "") passed = proc.returncode == 0 m = re.search(r"(\d+)\s+PASSED,\s+(\d+)\s+FAILED", out) if m: n_p, n_f = int(m.group(1)), int(m.group(2)) else: n_p = len(re.findall(r"\[PASS\]", out)) n_f = len(re.findall(r"\[FAIL\]", out)) if n_f > 0: passed = False status_tag = "PASS" if passed else "FAIL" print( f" [{status_tag}] {cap['obs']} {cap['short']:<14} | " f"{n_p:>2}/{n_p + n_f:<2} checks | {len(raw):>6,} B | " f"sha256:{sha[:16]} | {dt:4.2f}s" ) if not passed: lines = [ln.strip() for ln in out.splitlines() if ln.strip()] print(" STDERR/STDOUT tail:\n" + "\n".join(" " + l for l in lines[-12:])) results.append((cap["num"], passed, len(cap["chambers"]), len(raw), sha, n_p, n_f)) total_chambers += len(cap["chambers"]) total_bytes += len(raw) total_checks_pass += n_p total_checks_fail += n_f elapsed = time.time() - t_all n_pass = sum(1 for r in results if r[1]) n_fail = len(results) - n_pass print("-" * 78) print( f"CAPSTONES CERTIFICATION: {n_pass}/{len(results)} ATELIERS · " f"{total_chambers} CHAMBERS · {total_checks_pass}/{total_checks_pass + total_checks_fail} CHECKS · " f"{total_bytes:,} BYTES · {elapsed:.2f}s · {n_fail} FAILURES" ) print("=" * 78) return (n_fail == 0 and total_checks_fail == 0), total_bytes def run_all_35_master_sweep(): print("\n" + "=" * 78) print("MASTER 35-OBSERVATORY GRAND CONSTELLATION SWEEP (ALL 4 GRAND PORTALS)") print("=" * 78) t_master = time.time() all_ok = True grand_bytes = 0 with tempfile.TemporaryDirectory(prefix="neon_master35_") as tmpdir: for idx, (label, url, n_obs, n_ch, expected_b) in enumerate(SIBLING_ATLASES, 1): t0 = time.time() status, raw = fetch_with_retry(url) assert status == 200, f"HTTP {status} for {url}" path = os.path.join(tmpdir, f"portal_{idx}.py") with open(path, "wb") as fh: fh.write(raw) proc = subprocess.run( [sys.executable, path], capture_output=True, text=True, timeout=240, ) dt = time.time() - t0 out = (proc.stdout or "") + "\n" + (proc.stderr or "") ok = proc.returncode == 0 all_ok = all_ok and ok cert_line = "" for ln in reversed(out.splitlines()): if "CERTIFICATION:" in ln or "0 FAILURES" in ln: cert_line = ln.strip() break m_bytes = re.search(r"([\d,]+)\s+BYTES", cert_line) suite_bytes = int(m_bytes.group(1).replace(",", "")) if m_bytes else expected_b grand_bytes += suite_bytes tag = "PASS" if ok else "FAIL" print(f" [{tag}] {label:<52} | {suite_bytes:>7,} B | {dt:5.2f}s") if cert_line: print(f" ↳ {cert_line}") ok_caps, cap_bytes = run_live_capstones(None) all_ok = all_ok and ok_caps grand_bytes += cap_bytes dt_all = time.time() - t_master print("\n" + "=" * 78) print( f"MASTER 35-OBSERVATORY CERTIFICATION: 35/35 OBSERVATORIES · 176 CHAMBERS · " f"{grand_bytes:,} BYTES · {dt_all:.2f}s · {'0 FAILURES' if all_ok else 'FAILURES DETECTED'}" ) print("=" * 78) return all_ok def main(): parser = argparse.ArgumentParser( description="Verify The Neon Capstones Constellation Atlas (#31–#35) or all 35 live Observatories." ) parser.add_argument("--topology", action="store_true", help="Run only the 25-chamber / 25-bridge topology audit.") parser.add_argument("--all-35", action="store_true", help="Run ALL 4 Grand Constellation suites (35/35 Observatories · 176 Chambers).") parser.add_argument("--cap", nargs="+", help="Run only specific capstones (e.g. --cap C31 C34 C35).") args = parser.parse_args() audit_topology() if args.topology: sys.exit(0) if args.all_35: ok = run_all_35_master_sweep() sys.exit(0 if ok else 1) selected = set(v.upper() for v in args.cap) if args.cap else None ok, _ = run_live_capstones(selected) sys.exit(0 if ok else 1) if __name__ == "__main__": main()