From ff107de7dc8f6e517eb995b5a2a6173902cef5b2 Mon Sep 17 00:00:00 2001 From: aien-spark Date: Wed, 4 Nov 2026 19:48:30 -0600 Subject: [PATCH 1/2] capreg: state who runs the host-only ARCH-CAPABILITY-REGISTER gate and when (#363) Signed-off-by: aien-spark --- tools/capreg/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/capreg/README.md b/tools/capreg/README.md index e3451aa..07264ad 100644 --- a/tools/capreg/README.md +++ b/tools/capreg/README.md @@ -68,3 +68,21 @@ AIEN_OMC="$omc" ../../tests/gates/run.sh capreg Exit codes: 0 pass; 1 the register (or view) fails a rule, one `FAIL line N: rule` per finding on stderr; 3 NOT_RUN (evidence mode with a missing clone); 64 usage; 65 register unreadable or over 500000 bytes; 100 + code on a trap. Capacities: 1024 records, a 999000-byte view. + +## Who runs the gate, and when + +The gate is host-only: `tests/gates/arch-capability-register.gate` says `requires: - host`. It needs the +pinned AArch64 omc of `../zero-legacy/omega.pin`, which hosted CI does not have. The hosted AIEN +Checks job runs only `crumb verify` and the gates that require only `portable`, so it never runs this +gate. A green hosted run on main says nothing about the register. Without `AIEN_OMC`, +`run.sh capreg` exits 3 (NOT_RUN). + +- **Who:** the author of any PR that changes a gate input (`tools/capreg/`, `docs/capability-register/`, + `tools/zero-legacy/omega.pin`, `tools/zero-legacy/sha256.om` or `tests/gates/`). +- **When:** before the PR leaves draft. The author runs `AIEN_OMC= tests/gates/run.sh capreg` + on the Spark at the PR head and pastes the head sha and the `AIEN-OBS` lines into the PR body, as #345 + did. +- **Missing run:** a PR without that run has this gate NOT_RUN, not PASS. +- **Other runs:** `aien-alpha aien-architecture ` runs every gate, this one included. As of + 2026-11-05 this repository has no `alpha/*` tag. No scheduled run exists, so drift between + `register.tsv` and `REGISTER.md` on main shows up only at the next PR that runs the gate. From ed495d613286d0ad6e09b0c1c1c75bb681bb50c9 Mon Sep 17 00:00:00 2001 From: aien-spark Date: Thu, 5 Nov 2026 11:20:58 -0600 Subject: [PATCH 2/2] ci: run the pinned-omc host gates (capreg, doctrine, zero-legacy, script-tests) on a hosted arm64 runner (#363) Signed-off-by: aien-spark --- .github/workflows/aien-verification.yml | 77 +++++++++++++++++++++-- tests/gates/arch-capability-register.gate | 2 +- tests/gates/arch-script-tests.gate | 2 +- tests/gates/arch-zero-legacy-closure.gate | 2 +- tools/capreg/README.md | 29 +++++---- tools/doctrine/README.md | 10 +-- 6 files changed, 96 insertions(+), 26 deletions(-) diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml index f6d20ea..db05d70 100644 --- a/.github/workflows/aien-verification.yml +++ b/.github/workflows/aien-verification.yml @@ -4,9 +4,16 @@ # qualifies Alpha builds instead: the local pipeline pushes annotated tags alpha/YYYYMMDD.N. # AIEN Checks (pull_request, push to main): advisory. crumb verify, then for enrolled repos # (.aien/verify.pub on origin/main) the portable smoke set named at origin/main. +# AIEN Pinned-omc Gates (pull_request, push to main): advisory. On a hosted AArch64 runner, births +# the omc pinned in tools/zero-legacy/omega.pin from seed-0 and runs the host gates that need only +# that compiler: ARCH-CAPABILITY-REGISTER, ARCH-DOCTRINE, ARCH-ZERO-LEGACY-CLOSURE and +# ARCH-SCRIPT-TESTS (#363). # AIEN Alpha (push of an alpha/* tag): the tagged commit must be on main; its signed Spark bundle # from aien-receipts must verify (--require-full) against the trust anchors on origin/main. -# GitHub-hosted compute builds only the pinned verifier tools, never this repository's code. +# GitHub-hosted compute builds only the pinned verifier tools, never this repository's code, with two +# exceptions that are checkers, not shipped code: the crumb tool, and the seeded .om checkers that the +# pinned omc compiles in the pinned-omc job. That omc is born from seed-0 with no C toolchain, and every +# gate refuses it unless it hashes as omega.pin says. name: AIEN on: @@ -99,9 +106,8 @@ jobs: cd "$GITHUB_WORKSPACE" git status --porcelain --untracked-files=normal - # ARCH-DOCTRINE is `requires: host` since #316 (tools/doctrine/doctrine.om needs the pinned - # AArch64 omc); on this x86 runner its step exits 3 = NOT_RUN. It leaves this set once the - # base ref carries that manifest. + # ARCH-DOCTRINE and the other gates that need the pinned AArch64 omc are `requires: host`, so + # they stay out of this set; the pinned-omc job below runs them on an AArch64 runner. - name: Portable smoke set (gates whose requires is only portable, named at the base ref) if: steps.anchors.outputs.enrolled == 'true' run: | @@ -124,6 +130,69 @@ jobs: done exit $fail + pinned-omc-gates: + name: AIEN Pinned-omc Gates + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' + # The seed chain and omc write AArch64 Linux ELF, so this job needs an arm64 runner. + runs-on: ubuntu-24.04-arm + timeout-minutes: 20 + steps: + - name: Checkout the head under test + uses: actions/checkout@v4 + + # The pin is read from the head under test because the gates check AIEN_OMC against that same + # file; a PR that moves the pin is tested with the compiler it names. + - name: Read the compiler pin (tools/zero-legacy/omega.pin) + id: pin + run: | + pin=tools/zero-legacy/omega.pin + repo=$(sed -n 's|^repo: .*github\.com[:/]\(.*\)\.git$|\1|p' "$pin") + commit=$(sed -n 's/^commit: //p' "$pin") + omc_sha256=$(sed -n 's/^omc_sha256: //p' "$pin") + printf '%s' "$commit" | grep -Eqx '[0-9a-f]{40}' || { echo "::error::$pin: commit is not 40 hex"; exit 1; } + printf '%s' "$omc_sha256" | grep -Eqx '[0-9a-f]{64}' || { echo "::error::$pin: omc_sha256 is not 64 hex"; exit 1; } + [ -n "$repo" ] || { echo "::error::$pin: no github.com repo"; exit 1; } + echo "repo=$repo" >> "$GITHUB_OUTPUT" + echo "commit=$commit" >> "$GITHUB_OUTPUT" + echo "omc_sha256=$omc_sha256" >> "$GITHUB_OUTPUT" + echo "omc pin: $repo@$commit, omc sha256 $omc_sha256" + + - name: Checkout the pinned Omega seed (${{ steps.pin.outputs.repo }} @ ${{ steps.pin.outputs.commit }}) + uses: actions/checkout@v4 + with: + repository: ${{ steps.pin.outputs.repo }} + ref: ${{ steps.pin.outputs.commit }} + path: .omega-seed + + - name: Birth omc from seed-0 outside the candidate tree and check its hash + run: | + mv .omega-seed "$RUNNER_TEMP/omega-seed" + cd "$RUNNER_TEMP/omega-seed" + sh seed/omega-from-seed.sh + have=$(sha256sum seed/out/omc | cut -d' ' -f1) + if [ "$have" != "${{ steps.pin.outputs.omc_sha256 }}" ]; then + echo "::error::seed-born omc hashes $have, omega.pin pins ${{ steps.pin.outputs.omc_sha256 }}" + exit 1 + fi + echo "AIEN_OMC=$RUNNER_TEMP/omega-seed/seed/out/omc" >> "$GITHUB_ENV" + cd "$GITHUB_WORKSPACE" + git status --porcelain --untracked-files=normal + + # Each step is the `run:` of its manifest under tests/gates/. Exit 3 is NOT_RUN and fails + # this job, since the pinned compiler is present here. + - name: Host gates that need only the pinned omc + run: | + fail=0 + for step in capreg doctrine zero-legacy script-tests; do + echo "::group::run.sh $step" + rc=0 + timeout 600 bash tests/gates/run.sh "$step" || rc=$? + echo "::endgroup::" + if [ "$rc" -eq 0 ]; then echo "$step: PASS"; else echo "::error::$step: exit $rc, not PASS"; fail=1; fi + done + git status --porcelain --untracked-files=normal + exit $fail + alpha: name: AIEN Alpha if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/alpha/') diff --git a/tests/gates/arch-capability-register.gate b/tests/gates/arch-capability-register.gate index c6748f8..249519a 100644 --- a/tests/gates/arch-capability-register.gate +++ b/tests/gates/arch-capability-register.gate @@ -1,5 +1,5 @@ # tests/gates/arch-capability-register.gate -# seeded .om checker accepts the CUDA capability register and its view, refuses 22 bad fixtures and a planted row (no hosted job) +# seeded .om checker accepts the CUDA capability register and its view, refuses 22 bad fixtures and a planted row (hosted: AIEN Pinned-omc Gates on ubuntu-24.04-arm) gate: ARCH-CAPABILITY-REGISTER manifest_version: 2 owner: aien-architecture diff --git a/tests/gates/arch-script-tests.gate b/tests/gates/arch-script-tests.gate index 88183d0..0a4dc92 100644 --- a/tests/gates/arch-script-tests.gate +++ b/tests/gates/arch-script-tests.gate @@ -1,6 +1,6 @@ # tests/gates/arch-script-tests.gate # Mirrors hosted: offline tests of scripts/pr-gate.sh, rebase-crumb.sh and the seeded .om candidate checkers -# tools/candidate/check_candidate.om, check_pins.om with their parity corpus (not a hosted job; NOT_RUN without the pinned AIEN_OMC) +# tools/candidate/check_candidate.om, check_pins.om with their parity corpus (hosted: AIEN Pinned-omc Gates on ubuntu-24.04-arm; NOT_RUN without the pinned AIEN_OMC) gate: ARCH-SCRIPT-TESTS manifest_version: 2 owner: aien-architecture diff --git a/tests/gates/arch-zero-legacy-closure.gate b/tests/gates/arch-zero-legacy-closure.gate index 6680cd3..e1f5fc5 100644 --- a/tests/gates/arch-zero-legacy-closure.gate +++ b/tests/gates/arch-zero-legacy-closure.gate @@ -1,5 +1,5 @@ # tests/gates/arch-zero-legacy-closure.gate -# #316: seeded .om closure checker refuses the hostile fixture tree and accepts the clean one (no hosted job) +# #316: seeded .om closure checker refuses the hostile fixture tree and accepts the clean one (hosted: AIEN Pinned-omc Gates on ubuntu-24.04-arm) gate: ARCH-ZERO-LEGACY-CLOSURE manifest_version: 2 owner: aien-architecture diff --git a/tools/capreg/README.md b/tools/capreg/README.md index 07264ad..56ace56 100644 --- a/tools/capreg/README.md +++ b/tools/capreg/README.md @@ -69,20 +69,19 @@ Exit codes: 0 pass; 1 the register (or view) fails a rule, one `FAIL line N: rul stderr; 3 NOT_RUN (evidence mode with a missing clone); 64 usage; 65 register unreadable or over 500000 bytes; 100 + code on a trap. Capacities: 1024 records, a 999000-byte view. -## Who runs the gate, and when +## Where the gate runs -The gate is host-only: `tests/gates/arch-capability-register.gate` says `requires: - host`. It needs the -pinned AArch64 omc of `../zero-legacy/omega.pin`, which hosted CI does not have. The hosted AIEN -Checks job runs only `crumb verify` and the gates that require only `portable`, so it never runs this -gate. A green hosted run on main says nothing about the register. Without `AIEN_OMC`, -`run.sh capreg` exits 3 (NOT_RUN). +`tests/gates/arch-capability-register.gate` says `requires: - host`: it needs the pinned AArch64 omc +of `../zero-legacy/omega.pin`. Without `AIEN_OMC`, `run.sh capreg` exits 3 (NOT_RUN). -- **Who:** the author of any PR that changes a gate input (`tools/capreg/`, `docs/capability-register/`, - `tools/zero-legacy/omega.pin`, `tools/zero-legacy/sha256.om` or `tests/gates/`). -- **When:** before the PR leaves draft. The author runs `AIEN_OMC= tests/gates/run.sh capreg` - on the Spark at the PR head and pastes the head sha and the `AIEN-OBS` lines into the PR body, as #345 - did. -- **Missing run:** a PR without that run has this gate NOT_RUN, not PASS. -- **Other runs:** `aien-alpha aien-architecture ` runs every gate, this one included. As of - 2026-11-05 this repository has no `alpha/*` tag. No scheduled run exists, so drift between - `register.tsv` and `REGISTER.md` on main shows up only at the next PR that runs the gate. +- **Hosted CI, every PR and every push to main:** the `AIEN Pinned-omc Gates` job of + `.github/workflows/aien-verification.yml` runs on an `ubuntu-24.04-arm` runner. It checks out the + omega-mv commit named in `omega.pin`, births omc from seed-0 with `sh seed/omega-from-seed.sh`, + refuses a compiler whose sha256 differs from `omc_sha256`, and runs `tests/gates/run.sh capreg` + (with `doctrine`, `zero-legacy` and `script-tests`). A red or NOT_RUN step fails the job. Like the + rest of that workflow it is advisory: main requires no status check. +- **The hosted AIEN Checks job** (x86) runs only `crumb verify` and the gates that require only + `portable`, so it never runs this gate. +- **On the Spark:** `AIEN_OMC= tests/gates/run.sh capreg`, and `aien-alpha + aien-architecture `, which runs every gate. A hosted run is a run on GitHub's AArch64 runner, + not a signed Spark receipt. diff --git a/tools/doctrine/README.md b/tools/doctrine/README.md index 7de7d02..b19d0d8 100644 --- a/tools/doctrine/README.md +++ b/tools/doctrine/README.md @@ -65,8 +65,9 @@ commands stop on failure rather than falling through to an older gate binary. `gate.om` exits 3 when the compiler's native sha256 differs from `omega.pin`; otherwise its exit is the checker's (0/1/2) and it prints `AIEN-OBS doctrine_sha256 ""` before the run and `AIEN-OBS doctrine_exit N` after it. The gate manifest -`tests/gates/arch-doctrine.gate` is `requires: host` (the compiler is AArch64 only); the hosted -x86 job can no longer run it and sees NOT_RUN until the base ref carries that manifest. +`tests/gates/arch-doctrine.gate` is `requires: host` (the compiler is AArch64 only), so the hosted +x86 AIEN Checks job skips it. The hosted `AIEN Pinned-omc Gates` job runs it on an +`ubuntu-24.04-arm` runner with omc born from seed-0 at the `omega.pin` commit (#363). ## Oracle and corpus @@ -121,8 +122,9 @@ the script's own stderr line, which is identical. - `ROOT` defaults to `.`; the script defaulted to its own parent directory, which a program with no fixed location cannot know. -NOT_RUN: nothing in this directory has been run under the hosted x86 workflow (AArch64 compiler -only); `aien-test run ARCH-DOCTRINE` was not run here, only `tests/gates/run.sh doctrine`. +NOT_RUN: nothing in this directory runs under the hosted x86 workflow (AArch64 compiler only); +`aien-test run ARCH-DOCTRINE` was not run here, only `tests/gates/run.sh doctrine`, which is also +what the hosted AArch64 job runs. ## Bootstrap rejection regression (NOT_RUN)