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

GitHub aien-dev/physics-mv#51 (code only)

closed derived c29a503a05a7bd22 #51

Imported from GitHub aien-dev/physics-mv#51 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 8b23e5a2352e68990154aad0bd986364a694064e · Head 33a13ea543b95aad0d476c7989aea6a8e7b29ac9

Apply it

git checkout -b patch-c29a503a05a7bd22 8b23e5a2352e68990154aad0bd986364a694064e
curl -fsSL https://interplane.io/drakestapleton/physics-mv/patches/c29a503a05a7bd22.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/physics-mv
51
33a13ea543b95aad0d476c7989aea6a8e7b29ac9
{"kind":"github-import","owner":"aien-dev","repo":"physics-mv","number":51,"url":"https://github.com/aien-dev/physics-mv/pull/51","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:39:27Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.aien/always b/.aien/always
new file mode 100644
index 0000000..51c749c
--- /dev/null
+++ b/.aien/always
@@ -0,0 +1,4 @@
+# Gates that run on every commit regardless of changed paths (ADR 0033 Decision 12
+# allow-list; inventory contract C6). One gate name per line. Read from the base ref.
+CRUMB-VERIFY
+PHYSICS-ZERO-DISK-SECRETS
diff --git a/.aien/unmapped-ok b/.aien/unmapped-ok
new file mode 100644
index 0000000..bb6c039
--- /dev/null
+++ b/.aien/unmapped-ok
@@ -0,0 +1,8 @@
+# Changed paths matching these globs need only the always-run set (.aien/always).
+# Everything else must be covered by a manifest's inputs or the commit is NOT_RUN.
+# Conservative: the hosted host-gates workflow has no path filter, so only pure
+# documentation is listed. Read from the base ref.
+docs/**
+*.md
+LICENSE
+.gitignore
diff --git a/.aien/verify.pub b/.aien/verify.pub
new file mode 100644
index 0000000..3e65411
--- /dev/null
+++ b/.aien/verify.pub
@@ -0,0 +1 @@
+01368e0b02dc1113ae7425ad6ab00fdf5aa7dd97e0690745918a52f051d5cf68
diff --git a/.crumb b/.crumb
index a8acf28..104600b 100644
--- a/.crumb
+++ b/.crumb
@@ -67,8 +67,8 @@
           "purpose": "Directory m3. Purpose not yet described by a human."
         },
         {
-          "digest": "12c4b5d90b57c51b8d44aab4366ba7792be6e495ff28153ca0e7c5abdd5b567d",
-          "last_commit": "a25df81",
+          "digest": "3cc7a5864c3b01e5a641485cbbe84957f7cfcae6a0d394cb5ab507b3a4ba49c0",
+          "last_commit": "103b571",
           "name": "tests",
           "purpose": "Directory tests. Purpose not yet described by a human."
         },
@@ -85,15 +85,15 @@
           "purpose": "Directory tools. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:d274fc9707332eea17973f05e53075630ed1ce2ec3c190d591d445282f19997f",
-      "compiled_at": "2026-10-10T10:44:35Z",
+      "children_root": "sha256:51ae2b5daab10a1fe09cfe1a0647cec6806561e8b47daff45471530e21c9218d",
+      "compiled_at": "2026-10-11T16:52:26Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:7283415d1596e9d1da4026b6807ac4933a0bf4f07baf22797c2a854b434ae319",
+      "digest": "sha256:01118788d94d845da49efc63c891b0d4807306dc89d0b8f6d559657ffa6d2fec",
       "evidence_files": 81,
       "evidence_root": "sha256:0a0459a4517679721bb2817540dd06995500a1c1ede079bc4665d9da5c39183d",
-      "files": 262,
-      "generated_at_commit": "dd451f98ab3eed7317570d678ee9b5aae26538c0",
-      "source_tree": "sha256:00d18090b6c11213f6008a38c06369e476dfea56734d537a91beda4e42c16f68"
+      "files": 280,
+      "generated_at_commit": "103b571dc7d9b28552d68dc5dcabe122d67f3c49",
+      "source_tree": "sha256:2756d0edb588f0085b8e462a327a4c4c7772dc18309e96996ae67859f4891f21"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml
new file mode 100644
index 0000000..6561fe5
--- /dev/null
+++ b/.github/workflows/aien-verification.yml
@@ -0,0 +1,186 @@
+# AIEN Verification: the GitHub thin gate (ADR 0033 Decision 11, inventory contract C5).
+#
+# PHASE 2 DRAFT (2026-10-11, lane REPOS). This workflow is NOT a required check yet. It runs
+# beside the existing hosted workflows so that, for N >= 3 commits, the hosted verdict and the
+# locally signed bundle verdict can be compared (advisor amendment A7). Nothing here changes
+# the repository's required contexts; that switch is phase 3 and needs Drake's agreement.
+#
+# What it does: checkout; read the trust anchors from the BASE ref (origin/main), never from
+# the head under test (amendment A1); crumb verify; fetch <repo>/<sha>/bundle.json from
+# aien-dev/aien-receipts; verify the bundle signature and content with the pinned aien-test
+# build; run the repository's portable smoke set (gates whose requires is only "portable").
+#
+# GitHub-hosted compute: this workflow compiles only the two pinned verifier tools (the crumb
+# checker, and aien-test once the repository is enrolled). It never builds or tests this
+# repository's own code; the portable smoke set is text scans and format checks only.
+#
+# PHASE 3 FLIPS (marked "PHASE3" below): a missing bundle becomes NOT_RUN (status pending with
+# a retry window) instead of a neutral note, and a trust-surface change becomes a failure
+# unless the operator ran it by hand (BLOCKED_OPERATOR).
+name: AIEN Verification
+
+on:
+  pull_request:
+  push:
+    branches: [main]
+
+permissions:
+  contents: read
+
+jobs:
+  verify:
+    name: AIEN Verification
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    env:
+      REPO_SLUG: aien-dev/physics
+      AIEN_TEST_PIN: c26f4d7ac3156088469b27462390f5b08ef4f436
+      RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
+    steps:
+      - name: Checkout the head under test
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+
+      - name: Resolve the commit under test and the base ref
+        id: ids
+        run: |
+          if [ "${{ github.event_name }}" = pull_request ]; then
+            sha="${{ github.event.pull_request.head.sha }}"
+          else
+            sha="${{ github.sha }}"
+          fi
+          git fetch -q origin main
+          echo "sha=$sha" >> "$GITHUB_OUTPUT"
+          echo "base=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
+          echo "commit under test: $sha"
+          echo "base (trust anchors): $(git rev-parse origin/main)"
+
+      - name: "Trust anchors from the base ref (A1: never from the head under test)"
+        id: anchors
+        run: |
+          mkdir -p "$RUNNER_TEMP/anchors"
+          base="${{ steps.ids.outputs.base }}"
+          if git show "$base:.aien/verify.pub" > "$RUNNER_TEMP/anchors/verify.pub" 2>/dev/null; then
+            echo "enrolled=true" >> "$GITHUB_OUTPUT"
+            git show "$base:.aien/always" > "$RUNNER_TEMP/anchors/always" 2>/dev/null || : > "$RUNNER_TEMP/anchors/always"
+            git show "$base:.aien/unmapped-ok" > "$RUNNER_TEMP/anchors/unmapped-ok" 2>/dev/null || : > "$RUNNER_TEMP/anchors/unmapped-ok"
+            echo "verify.pub (base): $(cat "$RUNNER_TEMP/anchors/verify.pub")"
+          else
+            echo "enrolled=false" >> "$GITHUB_OUTPUT"
+            echo "::notice::.aien/verify.pub is not on the base ref yet: this repository is not enrolled. Phase 2: neutral."
+          fi
+          # Trust-surface changes are run by the operator by hand (A1): BLOCKED_OPERATOR.
+          changed=$(git diff --name-only "$base...${{ steps.ids.outputs.sha }}" -- .aien tests/gates .github/workflows .forgejo tools/aien-test || true)
+          if [ -n "$changed" ]; then
+            echo "blocked=true" >> "$GITHUB_OUTPUT"
+            echo "::notice::BLOCKED_OPERATOR: this head changes the trust surface:"; echo "$changed"
+            # PHASE3: fail here unless an operator attestation for this sha is present.
+          else
+            echo "blocked=false" >> "$GITHUB_OUTPUT"
+          fi
+
+      - name: Checkout the pinned crumb tool source (aien-architecture @ d0f0b95d344b4c6628c3d868346932fd247ce168)
+        uses: actions/checkout@v4
+        with:
+          repository: aien-dev/aien-architecture
+          ref: d0f0b95d344b4c6628c3d868346932fd247ce168
+          path: .crumb-tool-src
+
+      - name: Build the crumb tool, then remove its source from this tree
+        run: |
+          make -C .crumb-tool-src/tools/crumb crumb
+          mkdir -p "$RUNNER_TEMP/bin" && cp .crumb-tool-src/tools/crumb/crumb "$RUNNER_TEMP/bin/crumb"
+          rm -rf .crumb-tool-src
+          echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
+
+      - name: Crumbs must be exactly what the compiler produces now (stays GitHub-hosted, D11)
+        run: crumb verify .
+
+      - name: Install Stable Rust Toolchain (for the pinned aien-test build and the smoke set)
+        if: steps.anchors.outputs.enrolled == 'true'
+        uses: dtolnay/rust-toolchain@stable
+        with:
+          components: rustfmt
+
+      - name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
+        if: steps.anchors.outputs.enrolled == 'true'
+        uses: actions/checkout@v4
+        with:
+          repository: aien-dev/aien-sovereign-core
+          ref: ${{ env.AIEN_TEST_PIN }}
+          path: .aien-test-src
+
+      - name: Cache the pinned aien-test build
+        if: steps.anchors.outputs.enrolled == 'true'
+        uses: actions/cache@v4
+        with:
+          path: |
+            ~/.cargo/registry
+            ~/.cargo/git
+            .aien-test-src/target
+          key: aien-test-${{ runner.os }}-${{ env.AIEN_TEST_PIN }}
+
+      - name: Build aien-test from the pin (never from the tree under test), then remove the source
+        if: steps.anchors.outputs.enrolled == 'true'
+        run: |
+          cargo build --release -p aien-test --manifest-path .aien-test-src/Cargo.toml
+          cp .aien-test-src/target/release/aien-test "$RUNNER_TEMP/bin/aien-test" 2>/dev/null || { mkdir -p "$RUNNER_TEMP/bin"; cp .aien-test-src/target/release/aien-test "$RUNNER_TEMP/bin/aien-test"; }
+          echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
+          rm -rf .aien-test-src
+          git status --porcelain --untracked-files=normal
+
+      - name: Fetch the signed verification bundle for this commit
+        id: bundle
+        run: |
+          url="$RECEIPTS_RAW/physics/${{ steps.ids.outputs.sha }}/bundle.json"
+          echo "bundle url: $url"
+          if curl -fsSL "$url" -o "$RUNNER_TEMP/bundle.json"; then
+            echo "present=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "present=false" >> "$GITHUB_OUTPUT"
+            echo "::notice::bundle not published yet for ${{ steps.ids.outputs.sha }} (phase 2: neutral)."
+            # PHASE3: exit 2 here (NOT_RUN, status pending with a retry window) instead of a neutral note.
+          fi
+
+      - name: Verify the bundle with the base-ref public key
+        if: steps.bundle.outputs.present == 'true' && steps.anchors.outputs.enrolled == 'true'
+        run: |
+          required=$(grep -v '^#' "$RUNNER_TEMP/anchors/always" | grep -v '^$' | paste -sd, -)
+          set +e
+          aien-test verify-bundle "$RUNNER_TEMP/bundle.json" \
+            --repo "github.com/$REPO_SLUG" \
+            --commit "${{ steps.ids.outputs.sha }}" \
+            --pubkey "$RUNNER_TEMP/anchors/verify.pub" \
+            ${required:+--require "$required"}
+          rc=$?
+          set -e
+          echo "verify-bundle exit $rc (0 PASS, 1 FAIL, 2 NOT_RUN, 3 REJECTED)"
+          [ "$rc" = 0 ] || exit "$rc"
+
+      - name: Portable smoke set (gates whose requires is only portable, named at the base ref)
+        if: steps.anchors.outputs.enrolled == 'true' && steps.anchors.outputs.blocked == 'false'
+        run: |
+          base="${{ steps.ids.outputs.base }}"
+          names=$(for f in $(git ls-tree -r --name-only "$base" -- tests/gates | grep '\.gate$'); do
+            git show "$base:$f" | awk '
+              /^gate:/ {g=$2}
+              /^requires:/ {inr=1; next}
+              inr && /^  - / { if ($2 != "portable") other=1; next }
+              /^[a-z]/ {inr=0}
+              END { if (g != "" && !other) print g }'
+          done)
+          echo "portable smoke set: $(echo $names)"
+          mkdir -p "$RUNNER_TEMP/evidence"
+          fail=0
+          for g in $names; do
+            echo "::group::$g"
+            if timeout 600 aien-test run "$g" --evidence-dir "$RUNNER_TEMP/evidence"; then echo "$g: PASS"; else echo "::error::$g: not PASS"; fail=1; fi
+            echo "::endgroup::"
+          done
+          exit $fail
+
+      - name: "Not enrolled or blocked: nothing to verify in this phase"
+        if: steps.anchors.outputs.enrolled != 'true' || steps.anchors.outputs.blocked == 'true'
+        run: |
+          echo "AIEN Verification: neutral (enrolled=${{ steps.anchors.outputs.enrolled }}, blocked=${{ steps.anchors.outputs.blocked }}). PHASE3 turns this into a failure."
diff --git a/tests/.crumb b/tests/.crumb
index 89ad0e1..59e13c0 100644
--- a/tests/.crumb
+++ b/tests/.crumb
@@ -20,14 +20,14 @@
         }
       ],
       "children_root": "sha256:be29e4df8a1e9e426d7723fccf6e09f23eb6fb07a6b21490cd019c75d6fed6cd",
-      "compiled_at": "2026-10-04T18:23:05Z",
+      "compiled_at": "2026-10-11T16:52:26Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:12c4b5d90b57c51b8d44aab4366ba7792be6e495ff28153ca0e7c5abdd5b567d",
+      "digest": "sha256:3cc7a5864c3b01e5a641485cbbe84957f7cfcae6a0d394cb5ab507b3a4ba49c0",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 16,
-      "generated_at_commit": "e7cfcb555840e67f10be136901b4d83de4a7e983",
-      "source_tree": "sha256:46d1505ad45f50a5cb2fc54679983b8ea44c2861d72f4134ba6dbe4f731dd87a"
+      "files": 30,
+      "generated_at_commit": "103b571dc7d9b28552d68dc5dcabe122d67f3c49",
+      "source_tree": "sha256:7cd4e959e2b02d7538b2b185da8ca4bffba45403675485ab14bdc363611f740a"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/tests/gates/crumb.gate b/tests/gates/crumb.gate
new file mode 100644
index 0000000..b0ca3b6
--- /dev/null
+++ b/tests/gates/crumb.gate
@@ -0,0 +1,22 @@
+# tests/gates/crumb.gate
+# Mirrors hosted: crumb.yml 'crumb verify .' with the tool built from crumb.lock (hosted job 7 s)
+# cache: never because crumbs live in many directories and inputs are literal paths; the check is sub-second.
+gate: CRUMB-VERIFY
+manifest_version: 2
+owner: physics
+requires:
+  - portable
+inputs:
+  - .crumb
+  - crumb.lock
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["crumb-verify"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 5m
+exactness: EXACT
+cache_scope: portable
+cache: never
diff --git a/tests/gates/physics-analog-sim.gate b/tests/gates/physics-analog-sim.gate
new file mode 100644
index 0000000..886cc1f
--- /dev/null
+++ b/tests/gates/physics-analog-sim.gate
@@ -0,0 +1,24 @@
+# tests/gates/physics-analog-sim.gate
+# Mirrors hosted: host-gates.yml matrix analog-sim 'tests/run_forge_analog_sim_gates.sh' with OMEGA_DIR=../omega (hosted ~47 s)
+# cache: never because the gate reads the sibling omega checkout, which is outside this repository.
+gate: PHYSICS-ANALOG-SIM
+manifest_version: 2
+owner: physics
+requires:
+  - host
+inputs:
+  - forge/
+  - evidence/AR2/
+  - tests/run_forge_analog_sim_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["analog-sim"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 10m
+exactness: EXACT
+cache_scope: machine
+cache: never
diff --git a/tests/gates/physics-forge-gate34.gate b/tests/gates/physics-forge-gate34.gate
new file mode 100644
index 0000000..94787d8
--- /dev/null
+++ b/tests/gates/physics-forge-gate34.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-forge-gate34.gate
+# Mirrors hosted: host-gates.yml job 'forge Gate 3/4 (SKIP: needs GB10 chip)' names tests/run_forge_gates.sh
+gate: PHYSICS-FORGE-GATE34
+manifest_version: 2
+owner: physics
+requires:
+  - gb10
+inputs:
+  - forge/
+  - tests/run_forge_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["forge-gate34"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 30m
+exactness: EXACT
+cache_scope: hardware
diff --git a/tests/gates/physics-forge-v2.gate b/tests/gates/physics-forge-v2.gate
new file mode 100644
index 0000000..d276f08
--- /dev/null
+++ b/tests/gates/physics-forge-v2.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-forge-v2.gate
+# Mirrors hosted: host-gates.yml matrix forge-v2 'tests/run_forge_v2_gates.sh' (hosted ~47 s)
+gate: PHYSICS-FORGE-V2
+manifest_version: 2
+owner: physics
+requires:
+  - host
+inputs:
+  - forge/
+  - tests/run_forge_v2_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["forge-v2"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 10m
+exactness: EXACT
+cache_scope: machine
diff --git a/tests/gates/physics-form0.gate b/tests/gates/physics-form0.gate
new file mode 100644
index 0000000..10ba3b3
--- /dev/null
+++ b/tests/gates/physics-form0.gate
@@ -0,0 +1,24 @@
+# tests/gates/physics-form0.gate
+# Mirrors hosted: host-gates.yml matrix form0 'tests/run_forge_form_gates.sh' (oracle gate compares against omega main; hosted ~47 s)
+# cache: never because the oracle gate reads the sibling omega checkout.
+gate: PHYSICS-FORM0
+manifest_version: 2
+owner: physics
+requires:
+  - host
+inputs:
+  - forge/
+  - evidence/FORM0/
+  - tests/run_forge_form_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["form0"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 10m
+exactness: EXACT
+cache_scope: machine
+cache: never
diff --git a/tests/gates/physics-gate34-writer.gate b/tests/gates/physics-gate34-writer.gate
new file mode 100644
index 0000000..87f2562
--- /dev/null
+++ b/tests/gates/physics-gate34-writer.gate
@@ -0,0 +1,24 @@
+# tests/gates/physics-gate34-writer.gate
+# Mirrors hosted: host-gates.yml matrix gate34-writer 'tests/test_forge_gates_receipt.sh $OMEGA_DIR' (hosted ~47 s)
+# cache: never because digests are cross-checked with the sibling omega checkout.
+gate: PHYSICS-GATE34-WRITER
+manifest_version: 2
+owner: physics
+requires:
+  - host
+inputs:
+  - forge/
+  - tests/test_forge_gates_receipt.sh
+  - tests/run_forge_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["gate34-writer"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 10m
+exactness: EXACT
+cache_scope: machine
+cache: never
diff --git a/tests/gates/physics-m15.gate b/tests/gates/physics-m15.gate
new file mode 100644
index 0000000..f337664
--- /dev/null
+++ b/tests/gates/physics-m15.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-m15.gate
+# Mirrors hosted: host-gates.yml job 'm15 gates (SKIP: reads real GB10 GPU sysfs)' names tests/run_m15_gates.sh
+gate: PHYSICS-M15
+manifest_version: 2
+owner: physics
+requires:
+  - gb10
+inputs:
+  - m15/
+  - tests/run_m15_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["m15"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 30m
+exactness: EXACT
+cache_scope: hardware
diff --git a/tests/gates/physics-m16-requal.gate b/tests/gates/physics-m16-requal.gate
new file mode 100644
index 0000000..de82ac3
--- /dev/null
+++ b/tests/gates/physics-m16-requal.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-m16-requal.gate
+# Mirrors hosted: host-gates.yml job 'm16 requalification (SKIP: needs GB10 native submission)' names tests/run_m16_requalification.sh
+gate: PHYSICS-M16-REQUAL
+manifest_version: 2
+owner: physics
+requires:
+  - gb10
+inputs:
+  - m16/
+  - tests/run_m16_requalification.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["m16-requal"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 30m
+exactness: EXACT
+cache_scope: hardware
diff --git a/tests/gates/physics-m2.gate b/tests/gates/physics-m2.gate
new file mode 100644
index 0000000..9c22fd4
--- /dev/null
+++ b/tests/gates/physics-m2.gate
@@ -0,0 +1,31 @@
+# tests/gates/physics-m2.gate
+# Mirrors hosted: host-gates.yml matrix m2 './run_m2_gates.sh' (M2 PHYSICS_BOOT, 15 gates under qemu-system-aarch64; hosted ~47 s)
+gate: PHYSICS-M2
+manifest_version: 2
+owner: physics
+requires:
+  - qemu
+inputs:
+  - physics.s
+  - physics.ld
+  - vector_table.s
+  - memory_alloc.s
+  - capability.s
+  - atlas_m2.s
+  - build.sh
+  - m2_build.sh
+  - run_m2_gates.sh
+  - physics.bin
+  - physics.sha256
+  - atlas_m2.bin
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["m2"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 15m
+exactness: EXACT
+cache_scope: machine
diff --git a/tests/gates/physics-m3.gate b/tests/gates/physics-m3.gate
new file mode 100644
index 0000000..7df849f
--- /dev/null
+++ b/tests/gates/physics-m3.gate
@@ -0,0 +1,22 @@
+# tests/gates/physics-m3.gate
+# Mirrors hosted: host-gates.yml matrix m3 'm3/tests/run_m3_gates.sh' (M3 PHYSICS_EFFECTS, 19 gates under qemu; needs ../aien-architecture; hosted ~47 s)
+gate: PHYSICS-M3
+manifest_version: 2
+owner: physics
+requires:
+  - qemu
+inputs:
+  - m3/
+  - physics.s
+  - physics.ld
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["m3"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 15m
+exactness: EXACT
+cache_scope: machine
diff --git a/tests/gates/physics-nvrm-lifecycle.gate b/tests/gates/physics-nvrm-lifecycle.gate
new file mode 100644
index 0000000..48e49c5
--- /dev/null
+++ b/tests/gates/physics-nvrm-lifecycle.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-nvrm-lifecycle.gate
+# Mirrors hosted: host-gates.yml job 'nvrm lifecycle gates (SKIP: needs GB10 + NVRM)' names tests/run_nvrm_lifecycle_gates.sh
+gate: PHYSICS-NVRM-LIFECYCLE
+manifest_version: 2
+owner: physics
+requires:
+  - nvrm
+inputs:
+  - nvrm/
+  - tests/run_nvrm_lifecycle_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["nvrm-lifecycle"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 30m
+exactness: EXACT
+cache_scope: hardware
diff --git a/tests/gates/physics-submission-visibility.gate b/tests/gates/physics-submission-visibility.gate
new file mode 100644
index 0000000..68af4cc
--- /dev/null
+++ b/tests/gates/physics-submission-visibility.gate
@@ -0,0 +1,21 @@
+# tests/gates/physics-submission-visibility.gate
+# Mirrors hosted: host-gates.yml job 'submission visibility gates (SKIP: needs GB10 + NVRM)' names tests/run_submission_visibility_gates.sh
+gate: PHYSICS-SUBMISSION-VISIBILITY
+manifest_version: 2
+owner: physics
+requires:
+  - nvrm
+inputs:
+  - nvrm/
+  - tests/run_submission_visibility_gates.sh
+  - tools/
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["submission-visibility"]
+expects:
+  exit: 0
+  verdict: PASS
+timeout: 30m
+exactness: EXACT
+cache_scope: hardware
diff --git a/tests/gates/physics-zero-disk-secrets.gate b/tests/gates/physics-zero-disk-secrets.gate
new file mode 100644
index 0000000..2b2fbd7
--- /dev/null
+++ b/tests/gates/physics-zero-disk-secrets.gate
@@ -0,0 +1,19 @@
+# tests/gates/physics-zero-disk-secrets.gate
+# Mirrors hosted: no hosted step; the zero-disk-secrets invariant of the Rust repos (always-run)
+gate: PHYSICS-ZERO-DISK-SECRETS
+manifest_version: 2
+owner: physics
+requires:
+  - portable
+inputs:
+  - tests/gates/
+run:
+  exec: tests/gates/run.sh
+  args: ["zero-disk-secrets"]
+expects:
+  exit: 0
+  observe: ["env_files_found == false"]
+  verdict: PASS
+timeout: 2m
+exactness: EXACT
+cache_scope: portable
diff --git a/tests/gates/run.sh b/tests/gates/run.sh
new file mode 100755
index 0000000..01c5900
--- /dev/null
+++ b/tests/gates/run.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env bash
+# tests/gates/run.sh: the one entry point for the local verification gates of physics.
+# Every step runs the SAME command as the hosted job it mirrors (.github/workflows/host-gates.yml
+# matrix, with working-directory physics and OMEGA_DIR pointing at a sibling omega checkout, and
+# the SKIP jobs that only ever name their GB10/NVRM script). Manifests under tests/gates/ name
+# this script plus one step word, so no manifest needs shell expansion (ADR 0028 P6).
+set -euo pipefail
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+cd "$ROOT"
+step="${1:?usage: tests/gates/run.sh <step>}"
+obs() { printf 'AIEN-OBS %s %s\n' "$1" "$2"; }
+
+# Hosted layout: physics/ with sibling checkouts omega/ (main) and aien-architecture/ (main).
+# Several gate scripts look for ../omega (or $OMEGA_DIR) and ../aien-architecture.
+need_sibling() {
+  local name="$1"
+  if [ ! -d "../$name" ]; then
+    echo "run.sh: ../$name is missing; the hosted job checks out aien-dev/$name (main) as a sibling" >&2
+    exit 3
+  fi
+  obs "sibling_${name//-/_}_commit" "\"$(git -C "../$name" rev-parse HEAD 2>/dev/null || echo unknown)\""
+}
+export OMEGA_DIR="${OMEGA_DIR:-$ROOT/../omega}"
+
+case "$step" in
+  crumb-verify)
+    # Hosted crumb.yml: crumb tool built from the aien-architecture commit in crumb.lock.
+    # Same here: build that exact commit from the sibling checkout into a temp dir outside
+    # the tree, so a newer crumb on PATH can never change the verdict.
+    need_sibling aien-architecture
+    pin=$(tr -d '[:space:]' < crumb.lock)
+    tool=$(mktemp -d)
+    trap 'rm -rf "$tool"' EXIT
+    git -C ../aien-architecture archive "$pin" tools/crumb | tar -x -C "$tool"
+    make -s -C "$tool/tools/crumb" crumb
+    obs crumb_tool_commit "\"$pin\""
+    "$tool/tools/crumb/crumb" verify .
+    ;;
+  forge-v2)        tests/run_forge_v2_gates.sh ;;
+  analog-sim)      need_sibling omega; tests/run_forge_analog_sim_gates.sh ;;
+  form0)           need_sibling omega; tests/run_forge_form_gates.sh ;;
+  gate34-writer)   need_sibling omega; tests/test_forge_gates_receipt.sh "$OMEGA_DIR" ;;
+  m2)              ./run_m2_gates.sh ;;
+  m3)              need_sibling aien-architecture; m3/tests/run_m3_gates.sh ;;
+  # The five jobs below are SKIP on GitHub (if: false, never green). Their manifests declare
+  # the real requirement (gb10 or nvrm) and the commands are the scripts those jobs name.
+  forge-gate34)    tests/run_forge_gates.sh ;;
+  m15)             tests/run_m15_gates.sh ;;
+  m16-requal)      tests/run_m16_requalification.sh ;;
+  nvrm-lifecycle)  tests/run_nvrm_lifecycle_gates.sh ;;
+  submission-visibility) tests/run_submission_visibility_gates.sh ;;
+  zero-disk-secrets)
+    # Not a hosted step in this repository; the same invariant the Rust repos enforce.
+    echo "Auditing repository for prohibited plaintext secret files..."
+    if find . -maxdepth 4 -name ".env*" -not -path "*/.git/*" -not -path "*/build/*" | grep -q .; then
+      echo "::error::Prohibited plaintext .env file found. Use an approved AIEN SecretProvider."
+      obs env_files_found true
+      exit 1
+    fi
+    obs env_files_found false
+    echo "Zero plaintext .env files verified."
+    ;;
+  *)
+    echo "run.sh: unknown step '$step'" >&2
+    exit 2
+    ;;
+esac