interplane.Get Omega
Read in your language

physics-mv

FORGE: request-bound machine realization, providers and verification for AienOS. Host, simulated and GB10 hardware paths have separate evidence.

Brought by drakestapleton

branch main Branches Tags History

physics-mv / TRANSITION_PLAN_M2.md

79 lines · 6091 bytes Raw Blame History Source

Sovereign Tooling Transition Plan: Milestone 2 (PHYSICS)

Tracking: aien-spark/aien-architecture#12, aien-spark/physics#8

Context & Sovereignty Rule

Per the Sovereign Machine doctrine, qualification and build tooling must be local, in-house, and offline, with zero Python in the trusted path. Milestone 2 previously relied on Python for canonical binary generation, variant matrix builds, static audits, QEMU dynamic harnesses, and gate orchestration (build.py, run_milestone2_gates.py, seam1_static_audit.py, seam2_dynamic_harness.py, verify_golden.py, verify_unit.py, verify_trap.py, verify_no_auth.py, generate_canary.py, generate_snippet.py, generate_audit_ledger.py).

Implementation Summary

A complete, pure C (C11) and POSIX shell replacement suite has been designed and implemented in aien-spark/physics:

  1. tools/m2tool.c: Pure C host qualification tool compiled via host gcc -O2 and linked directly with audited sha256_clean.c.
    • Subcommands: sha256, hexfield, bytes, pin-inc, gen-canary, gen-snippet, audit-verify, verify-golden, verify-unit, verify-trap, verify-no-auth, get-symbol.
  2. tools/qemu_inspect.sh: Sovereign POSIX shell QEMU inspection harness using QMP socket pmemsave to inspect bare-metal execution state directly from physical memory.
  3. m2_build.sh (symlinked as build.sh): Master build pipeline that:
    • Builds canonical physics.bin from source.
    • Extracts symbol addresses, produces physics_pin.inc, and builds canonical atlas_m2.bin.
    • Assembles and links qualification test variants: unit, trap_brk, trap_align, and the 22 hostile atlas defsym variants.
  4. run_m2_gates.sh (symlinked as run_milestone2_gates.sh): Master POSIX shell gate runner orchestrating Seam 1 static audits and Seam 2 dynamic harnesses.

Artifact Integrity & Receipt Preservation

All 15 gates complete execution in ~16.2 seconds with zero Python dependencies.

Transition Phasing

  1. Phase 1 (Dual-Track Availability - Present):
    • Pure C and shell tooling (tools/m2tool.c, tools/qemu_inspect.sh, m2_build.sh, run_m2_gates.sh) are active.
    • Developers and automated CI can build and verify all gates using ./run_m2_gates.sh without Python.
    • Legacy Python scripts were kept as historical reference until Phase 3 (below).
  2. Phase 2 (Formal Requalification Decision):
    • When recorded in aien-architecture#12, run_m2_gates.sh --write-receipt generates a refreshed receipt reflecting the pure C/shell verification toolchain.
  3. Phase 3 (Python Retirement & Archival):
    • Legacy Python files are moved to history/legacy-python/ or deleted, completing total retirement of Python from the sovereign path.

Phase 3 Status: COMPLETE (2026-09-30)

The five legacy Python files (generate_physics_audit.py, m2_build.py, run_milestone2_gates.py, seam1_physics_audit.py, seam2_physics_harness.py) are deleted. They remain in git history at d52759d and earlier; qualification_receipt.json (historical evidence, untouched) pins their SHA-256. Phase 2 (receipt refresh under aien-architecture#12) remains open: the committed receipt still describes the retired Python run.

Equivalence check before deletion (scratch copies of d52759d, QEMU on the Spark):

Regeneration recipe for the committed M2 audit artifacts (no Python)

Run ./m2_build.sh first (produces build/canonical/physics.elf and physics.bin).