interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#397 (code only)

closed derived bf0e42784d360b14 #397

Imported from GitHub aien-dev/aienux#397 (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 17ad0167eac91edc280472020679a11969a78609 · Head 2669fc36075f9dfeaa5c72a2d8029d8bf8db55d3

Fetch it

A git bundle of the pull request's head, 5693 bytes.

curl -fsSL https://interplane.io/drakestapleton/aienux/patches/bf0e42784d360b14.bundle -o bf0e42784d360b14.bundle
git fetch bf0e42784d360b14.bundle refs/pull/397/head

Raw bundle · 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/aienux
397
2669fc36075f9dfeaa5c72a2d8029d8bf8db55d3
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":397,"url":"https://github.com/aien-dev/aienux/pull/397","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:21Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index fced4e5e..7320606f 100644
--- a/.crumb
+++ b/.crumb
@@ -22,38 +22,38 @@
       "children": [
         {
           "digest": "b5ced6fea583b485206b73ec08b91de68a5cfd2672ac448191831754c9e0907d",
-          "last_commit": "4bd49ca",
+          "last_commit": "7db773a",
           "name": "crates",
           "purpose": "Directory crates. Purpose not yet described by a human."
         },
         {
-          "digest": "2f740ef54106c2b6419bfd2df1266762cd444f439c7e12ae2a7c5c3877de926c",
-          "last_commit": "4bd49ca",
+          "digest": "3e4d272c896a9dea6ff7340b6b70bedb1db8c35979a13a848fab73acd81d7b7a",
+          "last_commit": "91013bb",
           "name": "docs",
           "purpose": "Directory docs. Purpose not yet described by a human."
         },
         {
           "digest": "64cc87f8507bb580e1788d335c5a76039f3e3a016552595526718448ab5aa098",
-          "last_commit": "3037967",
+          "last_commit": "6ad9190",
           "name": "native",
           "purpose": "Directory native. Purpose not yet described by a human."
         },
         {
           "digest": "9adb69cc749bc97fa48e268f0397b900da83c84191ab6a9373358e8b9ab57922",
-          "last_commit": "44cf2dd",
+          "last_commit": "f635add",
           "name": "scripts",
           "purpose": "Directory scripts. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:19cc8f21ac13e49018f60836bdaf7c4c23477cf558624048754f1e83c6d88cac",
-      "compiled_at": "2026-10-17T01:49:45Z",
+      "children_root": "sha256:75b8cb0ada29a264e890c2677b2bb262c35d474e82d2c30f0943aad07dca9ba9",
+      "compiled_at": "2026-10-18T12:30:25Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:1b7f96caef28425fc1a0751dd671452aa26ef3561f79f663480e083341950199",
+      "digest": "sha256:51b56af15b9ec3eafd085f75a809fbfc5e1561526311502dace47a2b9a5cea0e",
       "evidence_files": 211,
       "evidence_root": "sha256:3a8f56415109a697e4beb6048c85805c50c9c6c4089629057f4e8b3e76863981",
-      "files": 3501,
-      "generated_at_commit": "30379678add587e388db4e11713d6bca8d159b08",
-      "source_tree": "sha256:4fa99ea1d4144da8067bb5d01898dc38984898b2c5d5fb06b0e19033c824b265"
+      "files": 3502,
+      "generated_at_commit": "5b42363cea3d442ee4fe1e886340e64a76f491ec",
+      "source_tree": "sha256:363d2d6cb83e30ab540bc8ead3f0bb6a1316dfdc8a8ff5735f4b2c70bcc35916"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml
index 44460340..2fd24708 100644
--- a/.github/workflows/aien-verification.yml
+++ b/.github/workflows/aien-verification.yml
@@ -1,9 +1,10 @@
 # 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.
+# PHASE 3 (2026-10-16, Drake's agreement 2026-10-15: "the Spark becomes the only test judge").
+# This is a required check. The Spark worker (aien-test worker) runs the tests and signs a
+# bundle; tools/aien-local-ci/pipeline.sh in aien-sovereign-core publishes it to aien-receipts
+# and reruns this workflow once it is there. A missing bundle fails this check (NOT_RUN) until
+# the rerun. Pull requests labeled ready-to-merge are merged by the pipeline (docs/PIPELINE.md).
 #
 # 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
@@ -14,9 +15,9 @@
 # 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).
+# PHASE 3 rules (marked "PHASE3" below): a missing bundle is NOT_RUN (this check fails; the
+# pipeline reruns it after publication), and a trust-surface change fails unless the verified
+# bundle's signed plan shows the operator ran it by hand (plan.blocked == null).
 name: AIEN Verification
 
 on:
@@ -68,14 +69,16 @@ jobs:
             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."
+            # PHASE3: an enrolled repository whose base ref lost its key cannot verify anything.
+            echo "::error::.aien/verify.pub is not on the base ref: no trusted key, nothing can be verified."
+            exit 1
           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.
+            echo "::notice::BLOCKED_OPERATOR: this head changes the trust surface (the bundle must show an operator run):"; echo "$changed"
+            # PHASE3: enforced in the verify step: the verified bundle's signed plan must say blocked == null.
           else
             echo "blocked=false" >> "$GITHUB_OUTPUT"
           fi
@@ -146,8 +149,9 @@ jobs:
             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.
+            # PHASE3: NOT_RUN. The Spark pipeline reruns this workflow after it publishes the bundle.
+            echo "::error::NOT_RUN: no signed Spark bundle for ${{ steps.ids.outputs.sha }} yet. The Spark pipeline reruns this check once the bundle is published."
+            exit 2
           fi
 
       - name: Verify the bundle with the base-ref public key
@@ -164,6 +168,15 @@ jobs:
           set -e
           echo "verify-bundle exit $rc (0 PASS, 1 FAIL, 2 NOT_RUN, 3 REJECTED)"
           [ "$rc" = 0 ] || exit "$rc"
+          # PHASE3: a trust-surface head passes only on an operator run: the plan member is inside
+          # the signed bytes just verified, and only an operator run of such a head has blocked == null.
+          if [ "${{ steps.anchors.outputs.blocked }}" = true ]; then
+            if jq -e '.plan.blocked == null' "$RUNNER_TEMP/bundle.json" >/dev/null; then
+              echo "trust-surface change: the signed bundle shows an operator run (plan.blocked == null)"
+            else
+              echo "::error::BLOCKED_OPERATOR: this head changes the trust surface and the bundle is not from an operator run"; exit 1
+            fi
+          fi
 
       - 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'
@@ -187,7 +200,7 @@ jobs:
           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'
+      - name: "Trust-surface change: the portable smoke set is skipped (the operator ran this head on the Spark)"
+        if: 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."
+          echo "AIEN Verification: trust-surface head, accepted on the verified operator-run bundle above."
diff --git a/docs/.crumb b/docs/.crumb
index 51b2754a..39a80f70 100644
--- a/docs/.crumb
+++ b/docs/.crumb
@@ -30,14 +30,14 @@
         }
       ],
       "children_root": "sha256:491e93c09b6185b662afda8b29d24bb3ee81bc2aed9009757fdf4674d197be31",
-      "compiled_at": "2026-10-16T10:58:02Z",
+      "compiled_at": "2026-10-16T20:34:44Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:2f740ef54106c2b6419bfd2df1266762cd444f439c7e12ae2a7c5c3877de926c",
+      "digest": "sha256:3e4d272c896a9dea6ff7340b6b70bedb1db8c35979a13a848fab73acd81d7b7a",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 216,
-      "generated_at_commit": "4637b04d06f4e3cec4c79920bbed0efb46b93995",
-      "source_tree": "sha256:1abaa75a2a66a6ce77842c9439ad7a5cbb7dee680ef47a6c33d9b865e8f70417"
+      "files": 217,
+      "generated_at_commit": "91013bb1dbd35798f689f725f5cc559da0343b46",
+      "source_tree": "sha256:fa615d328c1122e4160b2784b67267a157d5c852eaddcca06fdede90fc3dd574"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/PIPELINE.md b/docs/PIPELINE.md
new file mode 100644
index 00000000..ef8b2536
--- /dev/null
+++ b/docs/PIPELINE.md
@@ -0,0 +1,48 @@
+# The Spark pipeline: how a pull request gets tested and merged
+
+Since 2026-10-16 the DGX Spark is the only test judge for this repository (ADR 0033 Decision 11,
+phase 3, agreed by Drake on 2026-10-15). GitHub's heavy test jobs are retired one by one as a
+Spark gate is proven to cover each of them.
+
+## What happens to every pull request
+
+1. The Spark worker (`aien-test worker --github`, aien-sovereign-core `tools/aien-test`) sees the
+   new head, runs the gates in `tests/gates/` that the change touches plus `.aien/always`, inside
+   the Spark sandbox, and signs a bundle with the Spark key. It posts the commit status
+   `AIEN Verification (Spark)`.
+2. The pipeline (`tools/aien-local-ci/pipeline.sh` in aien-sovereign-core, every 2 minutes)
+   checks the bundle against `.aien/verify.pub` on `main` and publishes it to
+   `aien-dev/aien-receipts` at `aienos/<sha>/bundle.json`.
+3. It then reruns the `AIEN Verification` workflow on that head. That workflow downloads the
+   bundle and verifies it on GitHub. Until the bundle is published the check is red with
+   `NOT_RUN`; that is expected and clears on the rerun.
+
+## How to get a pull request merged
+
+Add the label **`ready-to-merge`** when the pull request is finished. The pipeline merges it
+(merge commit) only when all of these hold for the current head:
+
+- the label is exactly `ready-to-merge` and the pull request is not a draft;
+- the Spark bundle for that head verifies as PASS, including every gate in `.aien/always`;
+- the published copy in aien-receipts is byte-identical to the Spark's copy;
+- every required check on `main` is green on that head, and no `AIEN Verification` run is pending.
+
+Pushing a new commit moves the head; the pipeline tests the new head before it merges anything.
+Without the label nothing is merged. Remove the label to stop a merge.
+
+To add the label from a terminal use the REST call (`gh pr edit --add-label` currently fails on
+this repository with a Projects (classic) error):
+`gh api -X POST repos/aien-spark/aienos/issues/<number>/labels -f 'labels[]=ready-to-merge'`.
+
+## Changes to the pipeline itself
+
+A head that changes `.aien/`, `tests/gates/`, `.github/workflows/`, `.forgejo/` or
+`tools/aien-test/` is `BLOCKED_OPERATOR`: the worker does not run it on its own. The operator runs
+it by hand on the Spark (`aien-local-ci once aienos <sha> --operator`); the signed bundle then
+records the operator run and the checks pass.
+
+## Where to look
+
+- Spark state: `aien-local-ci status`, journal `~/.local/state/aien-local-ci/journal.jsonl`,
+  pipeline journal `~/.local/state/aien-local-ci/pipeline.jsonl`.
+- Published bundles: <https://github.com/aien-dev/aien-receipts/tree/main/aienos>.