Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/patches/7a7f82dfec2f6e8f # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## Phase 3: the Spark is the only test judge; remove hosted test workflows merged `7a7f82dfec2f6e8f` #427 · opened 2026-10-18 21:10 UTC · closed 2026-10-18 22:07 UTC · merged 2026-10-18 22:07 UTC Imported from GitHub aien-dev/aienux#427, by drakestapleton Labels: ready-to-merge Base `ee34c7d98b9d4fc10103441796c93b2b29413423` · Head `f9123e54a2345e7593662dc4402b2c0be2f1b4e3` Merged on GitHub as `472ed37c3011877844e09c52243dbde28030e70f`; reachable from main `d01b2f19cccf3e173a6bdb3541813d467f537a76` (observed 2026-11-18T16:35:39Z) drakestapleton wrote on 2026-10-18 21:10 UTC ## Why Drake, 2026-10-18: all testing runs on the local network; nothing is tested on GitHub. The only required check on `main` is now AIEN Verification, the thin gate that verifies the signed bundle the Spark publishes to `aien-dev/aien-receipts` (ADR 0033 Decision 11, Phase 3). Branch protection was switched to that single context today. ## What changes - Hosted workflows that built or tested this repository's own code are deleted. The Spark runs those gates (`tests/gates/`). - `aien-verification.yml` (sc and aienos only): the Phase 2 draft is replaced by the same Phase 3 text the other nine enrolled repos already run: a missing bundle is NOT_RUN (the Spark pipeline reruns the check after it publishes), not-enrolled is a failure, and a trust-surface change passes only on a signed PASS bundle from an operator run. - Release, pages and policy guards that do not test code stay. Manual triggers stay. ## How this was judged Pipeline configuration change (rule A4): operator run on the Spark, `aien-local-ci once --operator`, which publishes the PASS bundle this check verifies. No hosted test ran, by design. Desk: Hermes (Drake's MacBook, driving the Spark). Also fixed today on the Spark: `pipeline.sh` crashed under `set -o pipefail` in the rerun backoff code, so no stuck check had been rerun automatically since about 11:45Z; reruns flow again. ### Apply it ``` git checkout -b patch-7a7f82dfec2f6e8f ee34c7d98b9d4fc10103441796c93b2b29413423 curl -fsSL https://interplane.io/drakestapleton/aienux/patches/7a7f82dfec2f6e8f.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/aienux 427 f9123e54a2345e7593662dc4402b2c0be2f1b4e3 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"aienux","number":427,"url":"https://github.com/aien-dev/aienux/pull/427","export_sha256":"222ed873664c8b6770fec92487a3521a4b5f81629ee6399038e519facf854bee","imported_utc":"2026-11-18T16:35:39Z"} ``` ### Changes ``` diff --git a/.crumb b/.crumb index 28e4e4f2..5da58688 100644 --- a/.crumb +++ b/.crumb @@ -34,26 +34,26 @@ }, { "digest": "64cc87f8507bb580e1788d335c5a76039f3e3a016552595526718448ab5aa098", - "last_commit": "6ad9190", + "last_commit": "3037967", "name": "native", "purpose": "Directory native. Purpose not yet described by a human." }, { "digest": "9adb69cc749bc97fa48e268f0397b900da83c84191ab6a9373358e8b9ab57922", - "last_commit": "f635add", + "last_commit": "44cf2dd", "name": "scripts", "purpose": "Directory scripts. Purpose not yet described by a human." } ], "children_root": "sha256:19cc8f21ac13e49018f60836bdaf7c4c23477cf558624048754f1e83c6d88cac", - "compiled_at": "2026-10-18T12:29:38Z", + "compiled_at": "2026-10-18T21:10:17Z", "compiler": "crumb-compile/1", - "digest": "sha256:306082635f09fe7ba90bcf0ecc06b7cf4c24e5f13023479193bb80930d982081", + "digest": "sha256:e3c53fea3dc90728488154999ad4f23369d737f4491ec2c1b2ac721e3302de3f", "evidence_files": 211, "evidence_root": "sha256:3a8f56415109a697e4beb6048c85805c50c9c6c4089629057f4e8b3e76863981", - "files": 3501, - "generated_at_commit": "3d2500e11fb42496dd136e3bb3bf8ee98f94dcd7", - "source_tree": "sha256:0ca10e6b509c0b5b6a0e08ee6b6e32313a45d3910fd2f11d3ac364891c715a3a" + "files": 3491, + "generated_at_commit": "ee34c7d98b9d4fc10103441796c93b2b29413423", + "source_tree": "sha256:a89b1b640013b8553bde989e5afdbaffaf8994194dacb6908b0bd2fab82bb61f" }, "owner_lane": "", "provenance": { diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml index 44460340..54770fcc 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-18, Drake: "all testing on the local network; the Spark is the only test +# judge"). This is the only required check on main. The Spark worker (aien-test worker) runs +# the tests and signs a bundle; ~/.local/lib/aien-local-ci/pipeline.sh on the Spark 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 desk. # # 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 //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/.github/workflows/allen-reflex.yml b/.github/workflows/allen-reflex.yml deleted file mode 100644 index 66847fde..00000000 --- a/.github/workflows/allen-reflex.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: ALLEN REFLEX decision core (allen-reflex) - -# Host checks for the no_std ALLEN REFLEX decision core (PI5-8). Tests train on the -# exam train split and cases-reflex-extra.psv only; held-out is never read. -on: - pull_request: - paths: - - "crates/allen-reflex/**" - - "Cargo.toml" - - "Cargo.lock" - - "docs/native/pi5-8/orchestrator-exam/cases-train.psv" - - "docs/native/pi5-8/orchestrator-exam/cases-dev.psv" - - "docs/native/pi5-8/orchestrator-exam/cases-reflex-extra.psv" - - ".github/workflows/allen-reflex.yml" - push: - branches: [main] - paths: - - "crates/allen-reflex/**" - -permissions: - contents: read - -jobs: - allen-reflex-host: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - targets: aarch64-unknown-none - - name: crate present? - id: present - run: | - if [ -d crates/allen-reflex ]; then echo "yes=true" >> "$GITHUB_OUTPUT"; else echo "crates/allen-reflex absent on this ref; nothing to check"; echo "yes=false" >> "$GITHUB_OUTPUT"; fi - - name: fmt - if: steps.present.outputs.yes == 'true' - run: cargo fmt -p allen-reflex --check - - name: clippy - if: steps.present.outputs.yes == 'true' - run: cargo clippy -p allen-reflex --all-targets -- -D warnings - - name: test - if: steps.present.outputs.yes == 'true' - run: cargo test -p allen-reflex - - name: no_std build (aarch64-unknown-none) - if: steps.present.outputs.yes == 'true' - run: cargo build -p allen-reflex --target aarch64-unknown-none diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8530e492..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - verify: - name: Verify and QEMU Boot Test - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-none, aarch64-unknown-uefi - components: clippy, rustfmt - - - name: Install QEMU and AAVMF firmware - run: | - sudo apt-get update - sudo apt-get install -y qemu-system-arm qemu-efi-aarch64 swtpm swtpm-tools tpm2-tools libtss2-tcti-swtpm0t64 xxd sbsigntool fuse3 gocryptfs - - - name: Build and test native C capability authority - run: make -C native/capability test - - - name: Build and test torn-write-safe Store record (host fault injection) - run: make -C native/store test mutants - - - name: Run verification harness and QEMU boot test - run: bash scripts/verify_all.sh diff --git a/.github/workflows/ck-kernel.yml b/.github/workflows/ck-kernel.yml deleted file mode 100644 index 5d9e051b..00000000 --- a/.github/workflows/ck-kernel.yml +++ /dev/null @@ -1,300 +0,0 @@ -# AIENOS C kernel ("CK") CI: host tests and the QEMU TCG gates. -# -# Runs on ARM64 runners (the runs-on of each job), so the kernel is -# built natively with the distribution gcc/binutils (no cross toolchain). -# The work is split into parallel jobs: host (4 make targets), light checks, -# qemu_checks (3), gates (one job per gate child script, ck_gates.sh --only), -# and the final job ck, which fails unless all of them succeeded and -# scripts/ck_shards_verify.sh finds every gate reported exactly once. -# 1. host unit tests: make test, make sanitize (ASan + UBSan) -# 2. stage host tests: make stage-test, make stage-sanitize -# 3. the gate runner's own self-test: scripts/ck_gates.sh --self-test -# and the gate hold self-test: scripts/gate_hold_selftest.sh -# 4. the QEMU gates: scripts/ck_gates.sh (scripts/qemu_ck_boot_test.sh and -# scripts/qemu_ck_store_test.sh, and the other children; M0_ROLLBACK from -# scripts/qemu_ck_rollback_test.sh also needs cargo and the Rust target -# aarch64-unknown-uefi for its stager/Default mock) with qemu-system-aarch64 and the AAVMF -# UEFI firmware from Ubuntu (packages qemu-system-arm, qemu-efi-aarch64). -# Every gate that has a C implementation must print PASS; a NOT_RUN for -# one of them fails the job (a missing tool or firmware cannot turn into -# a silent green). Gates with no C implementation stay NOT_RUN -# (MISSING_IMPLEMENTATION) exactly as the receipt says; the list of -# required gates below is the set of rows in the ck_gates.sh table whose -# source is not "missing". -# -# Firmware and image: the AAVMF code/vars files come from the Ubuntu package; -# the UEFI boot disk is a host directory exposed by QEMU as a FAT drive -# (fat:rw:), and the NVMe disk is a sparse file the Store script creates, so -# no prebuilt image is needed. QEMU runs single-threaded TCG (-accel -# tcg,thread=single), as on the Spark. -# -# QEMU is an emulator: a PASS here qualifies nothing physical. The receipt -# (uploaded as a build artifact, not committed) says "physical": "NOT_RUN". -name: C kernel (CK) gates - -on: - push: - branches: [main] - paths: - - 'native/**' - - 'scripts/ck_gates.sh' - - 'scripts/qemu_ck_*.sh' - - 'scripts/ck_pi5_build_check.sh' - - 'crates/aienos-fpu-probe/**' - - 'crates/aienos-infer-kernel/**' - - 'scripts/lib_ck_m1_checks.sh' - - 'scripts/lib_gate_hold.sh' - - 'scripts/gate_hold_selftest.sh' - - 'scripts/ck_shards_verify.sh' - - '.github/workflows/ck-kernel.yml' - pull_request: - branches: [main] - paths: - - 'native/**' - - 'scripts/ck_gates.sh' - - 'scripts/qemu_ck_*.sh' - - 'scripts/ck_pi5_build_check.sh' - - 'crates/aienos-fpu-probe/**' - - 'crates/aienos-infer-kernel/**' - - 'scripts/lib_ck_m1_checks.sh' - - 'scripts/lib_gate_hold.sh' - - 'scripts/gate_hold_selftest.sh' - - 'scripts/ck_shards_verify.sh' - - '.github/workflows/ck-kernel.yml' - -permissions: - contents: read - -# A newer push to the same pull request cancels the older, still-running run. -# Pushes to main are never cancelled (each one is a record). -concurrency: - group: ck-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -# Everything below runs in parallel; the last job (ck) is the single result. -# The matrix has no max-parallel cap: it starts as many jobs as runners allow. -jobs: - # Host unit tests, one job per independent make target (make -j; the targets - # write only under their own output directory, checked by running twice). - host: - name: "Host tests (${{ matrix.name }})" - runs-on: ubuntu-24.04-arm - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - { name: plain, targets: "test" } - - { name: ASan + UBSan, targets: "sanitize" } - - { name: stage plain, targets: "stage-test" } - - { name: stage ASan + UBSan, targets: "stage-sanitize" } - steps: - - uses: actions/checkout@v4 - - name: Install toolchain - run: | - sudo apt-get update - sudo apt-get install -y build-essential - - name: Install Rust toolchain (make test runs package-test, which builds the aarch64-unknown-none inference crate) - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-none - - name: Build and run (make -j) - run: make -j"$(nproc)" -C native/kernel ${{ matrix.targets }} - - name: Check the host tests left the tree clean (the gate runner refuses a dirty tree) - run: | - git status --porcelain --untracked-files=normal - test -z "$(git status --porcelain --untracked-files=normal)" - - # Cheap checks that need no QEMU gate: self-tests, builds, refusals. - light: - name: Light checks - runs-on: ubuntu-24.04-arm - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - - name: Install toolchain - run: | - sudo apt-get update - sudo apt-get install -y build-essential qemu-system-arm qemu-efi-aarch64 socat - - name: Install Rust toolchain (make pi5-infer links the aarch64-unknown-none inference crate) - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-none - - name: Vendored Omega Cortex store matches omega.lock (P06 cut 3; shallow fetch of the pinned omega commit) - run: bash scripts/omega_lock_check.sh - - name: "Stage sources compile freestanding (nm -u: ck.h services only)" - run: make -C native/kernel stage-free - - name: Gate runner self-test (includes the --only selector) - run: bash scripts/ck_gates.sh --self-test - - name: Shard verifier self-test - run: bash scripts/ck_shards_verify.sh --self-test - - name: Gate hold self-test (quiet flag read only, QEMU gate lock in quietlock record format, aienos#278) - run: bash scripts/gate_hold_selftest.sh - - name: Hardware staging image refuses TEST keys (build only) - env: - AIENOS_QUIET_FLAG: ${{ runner.temp }}/spark-quiet - AIENOS_GATE_LOCK: ${{ runner.temp }}/qemu-gate-lock - run: bash scripts/ck_owner_keys_check.sh - - name: Hardware inference service image make refusals and the supported line (build only, aienos#34 gate N3) - run: bash scripts/qemu_ck_service_disk_test.sh --build-only - - name: Raspberry Pi 5 kernel image builds, and the default image carries none of its board glue (AIENOS-PI5 step 1, build only) - run: bash scripts/ck_pi5_build_check.sh - - # The three QEMU checks that are not table gates, one job each. - qemu_checks: - name: "QEMU check (${{ matrix.name }})" - runs-on: ubuntu-24.04-arm - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - name: PI5DIAG.EFI - run: | - sudo apt-get install -y mtools - bash scripts/qemu_ck_pi5_diag_test.sh - - name: IMACDIAG.EFI (x86_64) - run: | - sudo apt-get install -y mtools gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu qemu-system-x86 ovmf - bash scripts/qemu_ck_imac_diag_test.sh - - name: IMACKERN.EFI (x86_64 kernel) - run: | - sudo apt-get install -y mtools gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu qemu-system-x86 ovmf - bash scripts/qemu_ck_imac_kernel_test.sh - - name: GICv2 boot - gic: "2" - run: bash scripts/qemu_ck_boot_test.sh - - name: B7b probe - run: | - bash scripts/qemu_ck_b7b_probe_test.sh --self-test - bash scripts/qemu_ck_b7b_probe_test.sh - bash scripts/qemu_ck_b7b_probe_test.sh --positive - steps: - - uses: actions/checkout@v4 - - name: Install toolchain, QEMU and AAVMF firmware - run: | - sudo apt-get update - sudo apt-get install -y build-essential qemu-system-arm qemu-efi-aarch64 socat - - name: Run - env: - AIENOS_QUIET_FLAG: ${{ runner.temp }}/spark-quiet - AIENOS_GATE_LOCK: ${{ runner.temp }}/qemu-gate-lock - AIENOS_QEMU_GIC: ${{ matrix.gic }} - run: ${{ matrix.run }} - - # The QEMU TCG gates, one job per child script (a child script can print - # several gates, so its gates stay together: running it once is the point). - # Each job runs ck_gates.sh --only ; every other gate prints - # NOT_SELECTED. The final job proves every gate was reported exactly once. - gates: - name: "Gates (${{ matrix.name }})" - runs-on: ubuntu-24.04-arm - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - include: - - { name: crash, gates: "M4_STORE_CRASH" } - - { name: slots, gates: "SLOT_LOADER" } - - { name: console, gates: "CONSOLE" } - - { name: allen, gates: "M4_ALLEN" } - - { name: continuity, gates: "M4_CONTINUITY" } - - { name: rollback, gates: "M0_ROLLBACK", rust: true } - - { name: recovery, gates: "M4_RECOVERY" } - - { name: store, gates: "SMMU,NVME_SHUTDOWN,M4_NVME,M4_STORE,ARGUS1_REVOKE" } - - { name: disk, gates: "DISK_LAYOUT" } - - { name: artifact, gates: "P2_ARTIFACT" } - - { name: keyboard, gates: "KEYBOARD" } - - { name: osh_core, gates: "OSH_CORE" } - - { name: net, gates: "NET" } - - { name: screen, gates: "SCREEN" } - - { name: osh_op, gates: "OSH_OP" } - - { name: osc_launch, gates: "OSC_LAUNCH" } - - { name: osc_receipt, gates: "OSC_RECEIPT" } - - { name: osc_unit, gates: "OSC_UNIT" } - - { name: boot, gates: "M1,M3" } - - { name: smp, gates: "SMP" } - - { name: fpu_infer, gates: "FPU,INFER" } - steps: - - uses: actions/checkout@v4 - - name: Install toolchain, QEMU and AAVMF firmware - run: | - sudo apt-get update - sudo apt-get install -y build-essential qemu-system-arm qemu-efi-aarch64 socat - - name: Install Rust toolchain (the M0_ROLLBACK stager and Default are the Rust aienos-rollback-mock) - if: matrix.rust - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-uefi - - name: QEMU TCG gates (${{ matrix.gates }}) - env: - AIENOS_QUIET_FLAG: ${{ runner.temp }}/spark-quiet - # Every child takes the QEMU gate lock (scripts/lib_gate_hold.sh); keep it - # in runner temp rather than ~/workspace. - AIENOS_GATE_LOCK: ${{ runner.temp }}/qemu-gate-lock - run: | - mkdir -p "${RUNNER_TEMP}/ck-receipt" "${RUNNER_TEMP}/out" - set +e - bash scripts/ck_gates.sh --only "${{ matrix.gates }}" --out "${RUNNER_TEMP}/ck-receipt" \ - 2>"${RUNNER_TEMP}/out/${{ matrix.name }}.log" | tee "${RUNNER_TEMP}/out/${{ matrix.name }}.txt" - rc=${PIPESTATUS[0]} - set -e - cat "${RUNNER_TEMP}/out/${{ matrix.name }}.log" - echo "ck_gates.sh exit ${rc}" - mkdir -p "${RUNNER_TEMP}/ck-receipt/logs" - cp -r /tmp/ck-gates-work.*/logs/* "${RUNNER_TEMP}/ck-receipt/logs/" 2>/dev/null || true - [ "${rc}" = 0 ] || exit 1 - # Each gate this job selected must be PASS, except FPU and INFER: they need the Rust target - # aarch64-unknown-none (and INFER the 800 MB model file), which the runner image is not - # known to have, so they print NOT_RUN there (aienos#34 lanes 0, 4 and 5). - fail=0 - for g in $(echo "${{ matrix.gates }}" | tr ',' ' '); do - case "${g}" in FPU|INFER) continue ;; esac - if grep -q "^AIENOS_CK_${g}: PASS" "${RUNNER_TEMP}/out/${{ matrix.name }}.txt"; then - echo "required gate ${g}: PASS" - else - echo "required gate ${g}: not PASS"; fail=1 - fi - done - exit ${fail} - - name: Upload this job's gate lines - if: always() - uses: actions/upload-artifact@v4 - with: - name: ck-shard-${{ matrix.name }} - path: ${{ runner.temp }}/out/ - if-no-files-found: warn - - name: Upload the receipt and logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: ck-gates-receipt-${{ matrix.name }} - path: | - ${{ runner.temp }}/ck-receipt/ - /tmp/ck-gates-work.*/logs/ - if-no-files-found: warn - - # The single result. Its name is the one the merge process looks for. It - # runs even when a job above failed (if: always()) and then fails itself. - ck: - name: C kernel host tests and QEMU gates (ARM64) - needs: [host, light, qemu_checks, gates] - if: always() - runs-on: ubuntu-24.04-arm - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - - name: Every job succeeded - env: - RESULTS: "host=${{ needs.host.result }} light=${{ needs.light.result }} qemu_checks=${{ needs.qemu_checks.result }} gates=${{ needs.gates.result }}" - run: | - echo "${RESULTS}" - case " ${RESULTS} " in *=failure*|*=cancelled*|*=skipped*) exit 1 ;; esac - for r in ${RESULTS}; do [ "${r#*=}" = success ] || exit 1; done - - name: Download every gate job's lines - uses: actions/download-artifact@v4 - with: - pattern: ck-shard-* - path: ${{ runner.temp }}/shards - - name: Every gate reported exactly once across the gate jobs - run: bash scripts/ck_shards_verify.sh 21 "${RUNNER_TEMP}/shards" diff --git a/.github/workflows/crumb.yml b/.github/workflows/crumb.yml deleted file mode 100644 index b205d69b..00000000 --- a/.github/workflows/crumb.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Crumb compiler - -# RFC-0003 (aien-architecture, docs/CRUMB_PROTOCOL_RFC_0003.md): the repository compiles the -# structural part of its own .crumb files (files, children, evidence, one digest per directory). -# This check refuses a change whose committed crumbs are not exactly what the compiler produces. -# The hand-written fields (purpose, invariants, ...) are never touched by the compiler and a -# missing purpose is not an error here. -# To fix a failure: build the tool from the aien-architecture commit pinned in crumb.lock, -# run `crumb compile .` at the repository root and commit the .crumb files it rewrote. -# Directories listed in .crumbignore (one per line) are left alone with their whole subtree. - -on: - pull_request: - push: - branches: [main] - -permissions: - contents: read - -jobs: - crumb: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - name: Read pinned crumb tool commit - id: pins - run: | - sha=$(tr -d '[:space:]' < crumb.lock) - test -n "$sha" - echo "crumb=$sha" >> "$GITHUB_OUTPUT" - - name: Checkout pinned aien-architecture (crumb tool source) - uses: actions/checkout@v4 - with: - repository: aien-spark/aien-architecture - ref: ${{ steps.pins.outputs.crumb }} - 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 - cp .crumb-tool-src/tools/crumb/crumb "$RUNNER_TEMP/crumb" - rm -rf .crumb-tool-src - - name: Crumbs must be exactly what the compiler produces now - run: ${RUNNER_TEMP}/crumb verify . diff --git a/.github/workflows/crypto-boundary.yml b/.github/workflows/crypto-boundary.yml deleted file mode 100644 index 957c286f..00000000 --- a/.github/workflows/crypto-boundary.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Crypto boundary -on: - workflow_dispatch: - pull_request: - paths: - - 'crates/aienos-crypto/**' - - 'crates/aienos-kernel/src/crypto/**' - - '.github/workflows/crypto-boundary.yml' - push: - branches: [main] -permissions: - contents: read -jobs: - crypto: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-none - components: clippy - - run: cargo test --locked --offline -p aienos-crypto - - run: 'cargo test --locked --offline -p aienos-kernel crypto::' - - run: cargo clippy --locked --offline -p aienos-crypto --all-targets -- -D warnings - - run: cargo check --locked --offline -p aienos-kernel --target aarch64-unknown-none --no-default-features diff --git a/.github/workflows/infer-crate.yml b/.github/workflows/infer-crate.yml deleted file mode 100644 index 8cc55121..00000000 --- a/.github/workflows/infer-crate.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Inference crate (aienos-infer) - -# Host checks for the no_std inference crate (aienos#34). The retired "CI" -# workflow (ci.yml) is disabled on GitHub since the move to the C kernel, so -# this is the only automatic check for crates/aienos-infer. Real-model golden -# tests skip when the model file is absent; the ggml fixtures always run. -on: - pull_request: - paths: - - "crates/aienos-infer/**" - - "Cargo.toml" - - "Cargo.lock" - - ".github/workflows/infer-crate.yml" - push: - branches: [main] - paths: - - "crates/aienos-infer/**" - -permissions: - contents: read - -jobs: - infer-host: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - targets: aarch64-unknown-none - - name: crate present? - id: present - run: | - if [ -d crates/aienos-infer ]; then echo "yes=true" >> "$GITHUB_OUTPUT"; else echo "crates/aienos-infer absent on this ref; nothing to check"; echo "yes=false" >> "$GITHUB_OUTPUT"; fi - - name: fmt - if: steps.present.outputs.yes == 'true' - run: cargo fmt -p aienos-infer --check - - name: clippy - if: steps.present.outputs.yes == 'true' - run: cargo clippy -p aienos-infer --all-targets -- -D warnings - - name: test - if: steps.present.outputs.yes == 'true' - run: cargo test -p aienos-infer - - name: no_std build (aarch64-unknown-none) - if: steps.present.outputs.yes == 'true' - run: cargo build -p aienos-infer --target aarch64-unknown-none diff --git a/.github/workflows/native-suites.yml b/.github/workflows/native-suites.yml deleted file mode 100644 index b3edeb1c..00000000 --- a/.github/workflows/native-suites.yml +++ /dev/null @@ -1,191 +0,0 @@ -# Host-side suites for the native C libraries. Before this workflow, GitHub CI -# only compiled these into the kernel image; nothing ran their own tests. -# -# Coverage map (what runs where): -# native/capability test ci.yml (disabled_manually on GitHub) and, since abi-qual, the capability-abi job below -# native/capability mutants this file -# native/capability test + ABI isolation this file (capability-abi job: C rule tests, -# Rust aienos-capability{,-ffi} fmt/clippy/test, and -# scripts/cap_abi_isolation_test.sh) -# native/store test sanitize mutants freestanding store.yml (always on, including Rust cross-check) -# native/kernel test sanitize + gates ck-kernel.yml (owned by another lane) -# native/net test sanitize mutants this file -# native/sig test sanitize mutants this file -# native/crypto test sanitize mutants this file -# native/m5 test sanitize mutants this file -# native/disk test sanitize mutants this file -# native/disk/qemu bare-metal NVMe and SDHCI payloads under QEMU this file -# (QEMU is an emulator: PASS says nothing about a physical controller) -# native/argus test sanitize this file -# -# SKIP list (declared, never green): -# native/argus mutants: the argus Makefile has no mutants target. -# native/argus bench: timing benchmark, not a correctness test. -# -# Each job greps for an explicit pass marker so a suite that silently does -# nothing cannot turn the job green. - -name: Native suites - -on: - push: - branches: [main] - pull_request: - branches: [main] - paths: - - "native/**" - - ".github/workflows/native-suites.yml" - - "scripts/qemu_native_nvme_test.sh" - - "scripts/qemu_native_sdhci_test.sh" - - "scripts/lib_gate_hold.sh" - - "scripts/cap_abi_isolation_test.sh" - - "crates/aienos-capability/**" - - "crates/aienos-capability-ffi/**" - workflow_dispatch: - -permissions: - contents: read - -jobs: - suite: - name: native/${{ matrix.suite }} (${{ matrix.targets }}) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - { suite: net, targets: "test sanitize mutants" } - - { suite: sig, targets: "test sanitize mutants" } - - { suite: crypto, targets: "test sanitize mutants" } - - { suite: m5, targets: "test sanitize mutants" } - - { suite: disk, targets: "test sanitize mutants" } - - { suite: argus, targets: "test sanitize" } - - { suite: capability, targets: "mutants" } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install toolchain - run: | - sudo apt-get update - sudo apt-get install -y build-essential - cc --version | head -1 - - - name: Run make ${{ matrix.targets }} - run: | - set -o pipefail - make -C native/${{ matrix.suite }} ${{ matrix.targets }} 2>&1 | tee suite.log - - - name: Require explicit pass markers - run: | - # make exits nonzero on failure; this also demands each suite's own - # verdict lines so an empty or skipped target cannot pass. - case "${{ matrix.suite }}" in - net) req='AIENOS_NET_SECURE_TESTS: PASS|NET_SANITIZE: PASS|NET_SECURE_MUTANTS: [0-9]+/[0-9]+ killed' ;; - sig) req='AIENOS_SIG_NATIVE: PASS|AIENOS_SIG_MUTANTS: PASS' ;; - crypto) req='AIENOS_CRYPTO_NATIVE: PASS|AIENOS_CRYPTO_MUTANTS: PASS' ;; - m5) req='M5_NATIVE: PASS|M5_NATIVE_MUTANTS: PASS' ;; - disk) req='AIENOS_DISK_NATIVE: PASS|AIENOS_DISK_SANITIZE: PASS|AIENOS_DISK_MUTANTS: PASS' ;; - argus) req='GATE CONTAIN_TEST PASS|GATE CONTAIN_DETERMINISM PASS' ;; - capability) req='AIENOS_CAP_MUTANTS: PASS' ;; - esac - for m in $(echo "$req" | tr '|' '\n' | sed 's/ /@/g'); do - m="${m//@/ }" - grep -qE "$m" suite.log || { echo "missing marker: $m"; exit 1; } - echo "found: $m" - done - if grep -q 'NOT_RUN' suite.log; then echo 'NOT_RUN in log'; exit 1; fi - - capability-abi: - # The native C authority (aienos_cap_*, 64-bit generation) is the - # production ABI; the Rust crates are a separate 32-bit implementation - # exported as aienos_cap32_*. This job keeps them from becoming - # interchangeable by accident and runs both sides' rule tests. - name: native/capability ABI isolation (C test, Rust tests, symbol/link checks) - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install C toolchain - run: | - sudo apt-get update - sudo apt-get install -y build-essential - cc --version | head -1 - - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - - name: C rule tests (make -C native/capability test) - run: | - set -o pipefail - make -C native/capability test 2>&1 | tee cap-test.log - grep -qE 'capability: [0-9]+ checks, 0 failures' cap-test.log - grep -q 'contain-checks PASS' cap-test.log - - - name: Rust fmt - run: cargo fmt -p aienos-capability -p aienos-capability-ffi -- --check - - - name: Rust clippy - run: cargo clippy --locked -p aienos-capability -p aienos-capability-ffi --all-targets -- -D warnings - - - name: Rust tests - run: | - set -o pipefail - cargo test --locked -p aienos-capability -p aienos-capability-ffi 2>&1 | tee rust-test.log - if grep -q 'test result: FAILED' rust-test.log; then exit 1; fi - grep -q 'reclaimed_reference_stays_dead_after_restart ... ok' rust-test.log - grep -q 'layout_matches_the_cap32_contract ... ok' rust-test.log - - - name: ABI isolation (symbols, link probe, layout drift) - run: | - set -o pipefail - bash scripts/cap_abi_isolation_test.sh 2>&1 | tee abi.log - grep -qx 'AIENOS_CAP_ABI_ISOLATION: PASS' abi.log - - disk-qemu: - name: native/disk qemu NVMe and SDHCI payloads - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install cross toolchain and QEMU - run: | - sudo apt-get update - sudo apt-get install -y build-essential gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu qemu-system-arm - qemu-system-aarch64 --version | head -1 - - - name: Run QEMU NVMe gate - env: - AIENOS_QUIET_FLAG: ${{ runner.temp }}/aienos-quiet-flag - AIENOS_GATE_LOCK: ${{ runner.temp }}/aienos-gate-lock - run: | - bash scripts/qemu_native_nvme_test.sh 2>&1 | tee qemu.log - # The script exits 0 on NOT_RUN; only an explicit PASS counts. - grep -qx 'AIENOS_STORE_NVME_QEMU: PASS' qemu.log - - - name: Run QEMU SDHCI gate - env: - AIENOS_QUIET_FLAG: ${{ runner.temp }}/aienos-quiet-flag - AIENOS_GATE_LOCK: ${{ runner.temp }}/aienos-gate-lock - run: | - bash scripts/qemu_native_sdhci_test.sh 2>&1 | tee sdhci.log - # The script exits 0 on NOT_RUN; only an explicit PASS counts. - grep -qx 'AIENOS_DISK_SDHCI_QEMU: PASS' sdhci.log - - argus-mutants: - name: "native/argus mutants (SKIP: no mutants target in argus Makefile)" - if: ${{ false }} - runs-on: ubuntu-latest - steps: - - run: echo skipped - - argus-bench: - name: "native/argus bench (SKIP: timing benchmark, not a correctness test)" - if: ${{ false }} - runs-on: ubuntu-latest - steps: - - run: echo skipped diff --git a/.github/workflows/no-python.yml b/.github/workflows/no-python.yml deleted file mode 100644 index 14be4177..00000000 --- a/.github/workflows/no-python.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: No Python guard - -"on": - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - -permissions: - contents: read - -jobs: - no-python: - name: No Python guard - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Fail if any Python file is tracked - run: sh .github/scripts/check-no-python.sh diff --git a/.github/workflows/store.yml b/.github/workflows/store.yml deleted file mode 100644 index 755b118b..00000000 --- a/.github/workflows/store.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Always reports on PRs so native-store can become a required merge check. -# ci.yml is disabled on GitHub; it cannot enforce Store qualification. -name: Native Store - -on: - pull_request: - push: - branches: [main] - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: store-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -jobs: - store: - name: native-store - runs-on: ubuntu-24.04-arm - timeout-minutes: 20 - steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - with: - persist-credentials: false - - name: Install pinned Rust toolchain for the cross-check - run: | - rustup toolchain install 1.98.1 --profile minimal - rustup override set 1.98.1 - - name: Build the independent Rust Store tool - run: cargo build --locked --release -p aienos-store-tool - - name: Run Store tests, sanitizers, mutation controls and freestanding build - run: | - set -o pipefail - make -C native/store test sanitize mutants freestanding 2>&1 | tee store.log - - name: Require every Store verdict - run: | - for marker in STORE_RUST_CROSSCHECK AIENOS_STORE_NATIVE AIENOS_STORE_SANITIZE TORN_SLOT_MUTANTS AIENOS_STORE_MUTANTS AIENOS_STORE_FREESTANDING; do - grep -qx "$marker: PASS" store.log || { echo "missing PASS for $marker"; exit 1; } - done - if grep -q 'NOT_RUN' store.log; then - echo 'Store gate contains an unexecuted check' - exit 1 - fi - - name: Archive diagnostic logs - if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 - with: - name: native-store-${{ github.sha }} - path: | - store.log - native/store/out/**/*.log - native/store/out/smut_*/msg - if-no-files-found: warn - retention-days: 14 diff --git a/.github/workflows/workflow-files.yml b/.github/workflows/workflow-files.yml deleted file mode 100644 index 00cf3702..00000000 --- a/.github/workflows/workflow-files.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Always-on guard: a workflow file GitHub cannot parse yields a run with zero -# jobs that never shows in the PR checks, so the job it carries silently stops -# running (2026-10-12: ck-kernel.yml, four hours). This job has no path filter -# and is a required check on main, so that silence becomes a red check. -name: Workflow files accepted - -on: - pull_request: - push: - branches: [main] - -permissions: - actions: read - contents: read - -jobs: - accepted: - name: workflow files accepted - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v4 - - name: Every workflow run on this commit has jobs - env: - GH_TOKEN: ${{ github.token }} - SHA: ${{ github.event.pull_request.head.sha || github.sha }} - run: sh scripts/workflow_files_check.sh "$SHA" ```