#!/usr/bin/env python3 """ The Neon Companions — Unified 250-Check Live Verification Runner & Atlas Auditor ================================================================================ Zero-dependency Python 3 verifier for the 10-Companion, 50-Chamber Physics & Applied-Math Constellation: 1. Verifies the 50-chamber registry & 36-bridge cross-physics constellation graph (uniqueness, completeness, connectivity across all 10 companions, valid routes). 2. Fetches all 10 live Companion verifier scripts from GitLab Pages, computes exact byte lengths and SHA-256 receipts, executes every suite locally, parses exact PASSED/FAILED counts, and confirms 10/10 companions and 250/250 individual mathematical & physical checks pass with 0 failures. Usage: python3 verify_companions.py # Topology audit + all 10 live verifiers (250 checks) python3 verify_companions.py --topology # Audit only the 50-chamber / 36-bridge graph python3 verify_companions.py --comp C1 C10 # Audit + selected companions (C1..C10) """ import argparse import collections import hashlib import os import re import subprocess import sys import tempfile import time import urllib.request COMPANIONS = [ { "num": "C1", "short": "Relativity", "title": "The Neon Spacetime & Relativity Planetarium", "url": "https://the-neon-relativity-planetarium-60a16a.gitlab.io/", "verifier": "verify_relativity.py", "chambers": [ ("C1.1", "minkowski", "Minkowski Spacetime & Twin Paradox"), ("C1.2", "schwarzschild", "Schwarzschild Photon Sphere & Lensing"), ("C1.3", "kerr", "Kerr Rotating Black Hole & Penrose Ergosphere"), ("C1.4", "waves", "Gravitational Waves & GW150914 Chirp"), ("C1.5", "cosmology", "FLRW Cosmology & Cosmic Horizons"), ], }, { "num": "C2", "short": "Fluids", "title": "The Neon Fluid, Vortex & Soliton Observatory", "url": "https://the-neon-fluid-observatory-59cefc.gitlab.io/", "verifier": "verify_fluids.py", "chambers": [ ("C2.1", "vortices", "Point Vortices & Leapfrogging Pairs"), ("C2.2", "solitons", "KdV Hirota Solitons & Burgers Shocks"), ("C2.3", "karman", "2D Navier–Stokes & von Kármán Street"), ("C2.4", "kelvin", "Kelvin–Helmholtz Vortex-Sheet Roll-Up"), ("C2.5", "beltrami", "3D Beltrami ABC Flow & Lagrangian Chaos"), ], }, { "num": "C3", "short": "Plasma & EM", "title": "The Neon Electromagnetism, Plasma & Knotted-Light Observatory", "url": "https://the-neon-plasma-observatory-274949.gitlab.io/", "verifier": "verify_plasma.py", "chambers": [ ("C3.1", "dipole", "Van Allen Dipole & Størmer Bottle"), ("C3.2", "penning", "Penning Trap & E×B Cycloid Drift"), ("C3.3", "maxwell", "2D Yee FDTD Maxwell & Luneburg GRIN"), ("C3.4", "coils", "Helmholtz–Maxwell Coils & MHD X-Point"), ("C3.5", "hopfion", "Rañada–Hopf Knotted Light & Tokamak"), ], }, { "num": "C4", "short": "Thermo", "title": "The Neon Thermodynamics, Heat Engines & Critical Phenomena Atelier", "url": "https://the-neon-thermo-atelier-4978ae.gitlab.io/", "verifier": "verify_thermo.py", "chambers": [ ("C4.1", "carnot", "Carnot, Stirling, Otto & Diesel Cycles"), ("C4.2", "vanderwaals", "Van der Waals Maxwell Loop & Opalescence"), ("C4.3", "blackbody", "Planck Blackbody & CIE Star Forge"), ("C4.4", "maxwell", "2D Hard-Disk Gas & Maxwell's Demon"), ("C4.5", "diffusion", "Heat Diffusion & Cahn–Hilliard Spinodal"), ], }, { "num": "C5", "short": "Optics", "title": "The Neon Optics, Polarization & Diffractive Photonics Atelier", "url": "https://the-neon-optics-atelier-406143.gitlab.io/", "verifier": "verify_optics.py", "chambers": [ ("C5.1", "poincare", "Poincaré Sphere, SU(2) & Berry Phase"), ("C5.2", "diffraction", "Fraunhofer, Airy Disk & Cornu Spiral"), ("C5.3", "etalon", "Fabry–Pérot Etalon, AR & Bragg Mirror"), ("C5.4", "prism", "Dispersion Prism, Brewster & Fresnel Rhomb"), ("C5.5", "laser", "Paraxial Gaussian Beams & Cavity Stability"), ], }, { "num": "C6", "short": "Stochastic", "title": "The Neon Stochastic, Random-Walk & Diffusion Observatory", "url": "https://the-neon-stochastic-observatory-a9051d.gitlab.io/", "verifier": "verify_stochastic.py", "chambers": [ ("C6.1", "brownian", "Brownian Motion, Itô vs Stratonovich & Arcsine"), ("C6.2", "kramers", "Kramers Escape & Stochastic Resonance"), ("C6.3", "levy", "Lévy Flights & α-Stable Heavy Tails"), ("C6.4", "polya", "Pólya's 2D/3D Return Theorem & Doob Martingales"), ("C6.5", "blackscholes", "Geometric Brownian Motion & Black–Scholes PDE"), ], }, { "num": "C7", "short": "Control", "title": "The Neon Control Theory, Feedback & Robotics Lab", "url": "https://the-neon-control-lab-67744a.gitlab.io/", "verifier": "verify_control.py", "chambers": [ ("C7.1", "pendulum", "LQR Inverted Pendulum & Algebraic Riccati"), ("C7.2", "nyquist", "Nyquist Contour, Routh & Delay Margin"), ("C7.3", "kalman", "Kalman Filter, DARE & Joseph Update"), ("C7.4", "arm", "Planar Robot Kinematics & Yoshikawa Ellipsoid"), ("C7.5", "pontryagin", "Pontryagin Time-Optimal Bang–Bang & Floquet"), ], }, { "num": "C8", "short": "Elasticity", "title": "The Neon Elasticity, Acoustics & Metamaterials Atelier", "url": "https://the-neon-elasticity-atelier-88b635.gitlab.io/", "verifier": "verify_elasticity.py", "chambers": [ ("C8.1", "beams", "Euler–Bernoulli Beams, Buckling & Elastica"), ("C8.2", "stress", "Kirsch Stress Concentration & Mohr's Circle"), ("C8.3", "phonon", "Diatomic Phonon Bandgap & SSH Zak Topology"), ("C8.4", "auxetic", "Auxetic Re-Entrant Metamaterials (ν < 0)"), ("C8.5", "acoustics", "Pipe Resonance, Mach Cones & Rayleigh SAW"), ], }, { "num": "C9", "short": "Biology", "title": "The Neon Reaction–Diffusion, Morphogenesis & Biology Atelier", "url": "https://the-neon-morphogenesis-atelier-13ef60.gitlab.io/", "verifier": "verify_morphogenesis.py", "chambers": [ ("C9.1", "turing", "Gray–Scott & Brusselator Turing Morphogenesis"), ("C9.2", "spiral", "FitzHugh–Nagumo Excitable Spiral Rotors"), ("C9.3", "neuron", "Hodgkin–Huxley 1952 Action Potential & Hopf"), ("C9.4", "ecology", "Lotka–Volterra & Rosenzweig–MacArthur Cycles"), ("C9.5", "epidemic", "Kermack–McKendrick SIR Network & Herd Threshold"), ], }, { "num": "C10", "short": "Orbits", "title": "The Neon Astrodynamics, Orbital Transfers & Exoplanet Observatory", "url": "https://the-neon-astrodynamics-observatory-07dfc3.gitlab.io/", "verifier": "verify_astrodynamics.py", "chambers": [ ("C10.1", "kepler", "Kepler Orbits, LRL Symmetry & Velocity Hodograph"), ("C10.2", "transfer", "Hohmann, Bi-Elliptic Crossover & Oberth Burn"), ("C10.3", "slingshot", "Planetary Gravity Assist, Jacobi & Hill Sphere"), ("C10.4", "j2orbit", "J2 Oblate Precession, Molniya & Sun-Synchronous"), ("C10.5", "exoplanet", "Mandel–Agol Transits, RV Wobble & RM Anomaly"), ], }, ] # 36 curated cross-physics bridges spanning all 10 companions BRIDGES = [ # Gravity & Cosmos ("C1.2", "C10.1", "gravity", "Relativistic Photon Sphere ↔ Newtonian Kepler & LRL Conic"), ("C1.3", "C10.4", "gravity", "Kerr Frame-Dragging Precession ↔ J2 Oblate Nodal Precession"), ("C1.4", "C10.5", "gravity", "Binary Inspiral GW Chirp ↔ Exoplanet Keplerian RV Wobble"), ("C1.5", "C4.3", "gravity", "Cosmic Redshift & Horizons ↔ Planck Blackbody CMB & Stars"), ("C1.2", "C3.3", "gravity", "Gravitational Light Bending ↔ Luneburg GRIN Refractive Bending"), ("C10.2", "C7.5", "gravity", "Oberth & Minimum-Δv Transfers ↔ Pontryagin Optimal Thrust"), ("C10.3", "C2.1", "gravity", "Restricted 3-Body Jacobi Integral ↔ Point-Vortex Hamiltonian"), ("C4.3", "C10.5", "gravity", "Stellar Photosphere Blackbody ↔ Limb-Darkened Transit Profile"), # Waves & Fields ("C3.3", "C5.4", "waves", "Yee Maxwell Brewster Zero ↔ Fresnel Reflection & Rhomb Phase"), ("C3.3", "C5.2", "waves", "2D FDTD Wavefront Propagation ↔ Fraunhofer Airy Diffraction"), ("C5.3", "C8.3", "waves", "Optical Bragg Quarter-Wave Stopband ↔ Diatomic Phonon Bandgap"), ("C5.3", "C8.5", "waves", "Optical Quarter-Wave AR Coating ↔ Acoustic Impedance Matching"), ("C2.2", "C5.5", "waves", "KdV Dispersive Soliton Balance ↔ Paraxial Nonlinear Beam Focusing"), ("C2.4", "C8.5", "waves", "Shear-Layer Vortex Roll-Up ↔ Supersonic Mach Cone & Acoustics"), ("C1.4", "C5.3", "waves", "LIGO Strain Interferometry ↔ Fabry–Pérot Finesse Cavity"), ("C3.4", "C8.2", "waves", "MHD X-Point Saddle Topology ↔ Kirsch Elastic Stress Trajectories"), # Heat & Chance ("C4.5", "C6.1", "thermo", "Fickian Heat Equation ↔ Brownian Transition Density & Itô SDE"), ("C4.5", "C9.1", "thermo", "Cahn–Hilliard Spinodal Labyrinths ↔ Gray–Scott Turing Stripes"), ("C4.2", "C6.2", "thermo", "Double-Well Free Energy & Coexistence ↔ Kramers Barrier Escape"), ("C4.4", "C6.4", "thermo", "Hard-Disk Ergodic Gas & Entropy ↔ Pólya Random-Walk Recurrence"), ("C4.1", "C7.5", "thermo", "Carnot Thermodynamic Cycle Bounds ↔ Optimal Control Trajectory"), ("C6.5", "C4.5", "thermo", "Black–Scholes PDE Change of Variable ↔ 1D Heat Diffusion Kernel"), ("C6.3", "C9.5", "thermo", "Heavy-Tailed Lévy Superdiffusion ↔ Spatial Network Contagion"), ("C6.2", "C9.3", "thermo", "Stochastic Resonance Thresholding ↔ Hodgkin–Huxley Spike Firing"), # Vortices & Topology ("C2.5", "C3.5", "topology", "3D Beltrami ABC Force-Free Curl ↔ Rañada–Hopf Knotted Light"), ("C3.5", "C5.1", "topology", "Hopfion Villarceau Fibers ↔ Poincaré Sphere SU(2) Berry Phase"), ("C5.1", "C8.3", "topology", "Pancharatnam–Berry Solid Angle ↔ SSH 1D Zak Winding Number"), ("C2.1", "C9.2", "topology", "2D Point-Vortex Circulation ↔ Excitable Spiral Rotor Core"), ("C6.3", "C2.5", "topology", "Lévy Superdiffusive Flights ↔ Beltrami ABC Chaotic Advection"), ("C2.3", "C8.4", "topology", "Navier–Stokes Continuum Stress ↔ Auxetic Re-Entrant Tensor"), # Control & Life ("C7.1", "C8.1", "dynamics", "Inverted Pendulum LQR Stabilization ↔ Euler Column Buckling"), ("C7.2", "C9.4", "dynamics", "Nyquist Gain/Phase Stability Margin ↔ Predator–Prey Hopf Limit Cycle"), ("C7.3", "C6.1", "dynamics", "Kalman Filter Optimal Innovation ↔ Gaussian Brownian Process Noise"), ("C7.4", "C8.1", "dynamics", "Robot Manipulator Jacobian & Torque ↔ Castigliano Elastic Compliance"), ("C7.5", "C9.3", "dynamics", "Van der Pol Floquet Limit Cycle ↔ Hodgkin–Huxley 4D Hopf Cycle"), ("C1.1", "C3.2", "gravity", "Lorentz Boosts & Proper Time ↔ Relativistic Boris Cyclotron Drift"), ] def audit_topology(): print("=" * 78) print("THE NEON COMPANIONS — CONSTELLATION ATLAS TOPOLOGY & REGISTRY AUDIT") print("=" * 78) chamber_map = {} url_set = set() for c in COMPANIONS: assert c["url"].startswith("https://") and c["url"].endswith("/"), f"Bad URL {c['url']}" assert c["url"] not in url_set, f"Duplicate companion URL {c['url']}" url_set.add(c["url"]) for cid, slug, name in c["chambers"]: assert cid not in chamber_map, f"Duplicate chamber id {cid}" assert re.fullmatch(r"[a-z0-9]+", slug), f"Invalid slug {slug}" chamber_map[cid] = (c["num"], slug, name) assert len(COMPANIONS) == 10, f"Expected 10 companions, got {len(COMPANIONS)}" assert len(chamber_map) == 50, f"Expected 50 chambers, got {len(chamber_map)}" assert len(BRIDGES) == 36, f"Expected 36 bridges, got {len(BRIDGES)}" comp_adj = collections.defaultdict(set) cross_count = 0 edge_pairs = set() for a, b, theme, label 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}" pair = tuple(sorted((a, b))) assert pair not in edge_pairs, f"Duplicate bridge {pair}" edge_pairs.add(pair) ca, cb = chamber_map[a][0], chamber_map[b][0] if ca != cb: cross_count += 1 comp_adj[ca].add(cb) comp_adj[cb].add(ca) start = COMPANIONS[0]["num"] visited = {start} q = collections.deque([start]) while q: cur = q.popleft() for nxt in comp_adj[cur]: if nxt not in visited: visited.add(nxt) q.append(nxt) assert len(visited) == 10, f"Companion bridge graph disconnected: reached {len(visited)}/10" min_deg = min(len(comp_adj[c["num"]]) for c in COMPANIONS) assert min_deg >= 4, f"Minimum cross-companion degree too low: {min_deg}" print(f" [PASS] Registry integrity: 10 Companions · 50 Chambers · 50 unique #hash routes") print(f" [PASS] Bridge graph: {len(BRIDGES)} unique bridges ({cross_count} cross-companion), 0 duplicates") print(f" [PASS] Connectivity: 10/10 companions connected (min cross-companion degree = {min_deg})") return True def run_live_verifiers(selected_comps): print("\n" + "=" * 78) print("LIVE GITLAB PAGES 250-CHECK VERIFICATION SWEEP (ALL 10 STANDALONE COMPANIONS)") 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_companions_") as tmpdir: for c in COMPANIONS: if selected_comps and c["num"] not in selected_comps: continue script_url = c["url"] + c["verifier"] t0 = time.time() req = urllib.request.Request( script_url, headers={"User-Agent": "Neon-Companions-Unified-Verifier/1.0"}, ) with urllib.request.urlopen(req, timeout=30) as resp: status = resp.status raw = resp.read() assert status == 200, f"HTTP {status} for {script_url}" sha = hashlib.sha256(raw).hexdigest() local_path = os.path.join(tmpdir, f"{c['num']}_{c['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 # Parse exact PASSED/FAILED counts from verifier output 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: # Fallback: count [PASS] / [FAIL] lines 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}] {c['num']:>3} {c['short']:<11} | " f"{n_p:>2}/{n_p+n_f:<2} checks | {len(raw):>6,} B | " f"sha256:{sha[:12]} | {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((c["num"], passed, len(c["chambers"]), len(raw), sha, n_p, n_f)) total_chambers += len(c["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"COMPANIONS CERTIFICATION: {n_pass}/{len(results)} COMPANIONS · " 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 def main(): parser = argparse.ArgumentParser( description="Verify The Neon Companions Constellation Atlas & all 10 live Companions (250 checks)." ) parser.add_argument("--topology", action="store_true", help="Run only the 50-chamber / 36-bridge topology audit.") parser.add_argument("--comp", nargs="+", help="Run only specific companions (e.g. --comp C1 C5 C10).") args = parser.parse_args() audit_topology() if args.topology: sys.exit(0) selected = set(v.upper() for v in args.comp) if args.comp else None ok = run_live_verifiers(selected) sys.exit(0 if ok else 1) if __name__ == "__main__": main()