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

branch main Branches Tags History

aienux / .github / workflows / aien-verification.yml

216 lines · 9605 bytes Raw Blame History
1# AIEN: GitHub-hosted checks and Alpha verification (ADR 0033 Decision 11, inventory contract C5).
2#
3# Drake 2026-10-24: nothing on GitHub gates a merge; main requires no status check. The Spark
4# qualifies Alpha builds instead: the local pipeline pushes annotated tags alpha/YYYYMMDD.N.
5# AIEN Checks (pull_request, push to main): advisory. For enrolled repos (.aien/verify.pub on
6# origin/main) the portable smoke set named at origin/main. No crumb step: Crumbs are retired
7# from the active workflow (DRA-97, 2026-11-07).
8# AIEN Alpha (push of an alpha/* tag): the tagged commit must be on main; its signed Spark bundle
9# from aien-receipts must verify (--require-full) against the trust anchors on origin/main.
10# GitHub-hosted compute builds only the pinned verifier tools, never this repository's code.
11name: AIEN
12
13on:
14 pull_request:
15 push:
16 branches: [main]
17 tags: ['alpha/*']
18
19permissions:
20 contents: read
21
22jobs:
23 checks:
24 name: AIEN Checks
25 if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
26 runs-on: ubuntu-latest
27 timeout-minutes: 30
28 env:
29 REPO_SLUG: aien-dev/aienux
30 AIEN_TEST_PIN: a51042b61b87355c0850ef82ba409a46e153a1ff
31 RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
32 steps:
33 - name: Checkout the head under test
34 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35 with:
36 fetch-depth: 0
37
38 - name: Resolve the base ref
39 id: ids
40 run: |
41 git fetch -q origin main
42 echo "base=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
43 echo "base (trust anchors): $(git rev-parse origin/main)"
44
45 - name: "Enrollment from the base ref (never from the head under test)"
46 id: anchors
47 run: |
48 if git cat-file -e "${{ steps.ids.outputs.base }}:.aien/verify.pub" 2>/dev/null; then
49 echo "enrolled=true" >> "$GITHUB_OUTPUT"
50 else
51 echo "enrolled=false" >> "$GITHUB_OUTPUT"
52 echo "not enrolled: no .aien/verify.pub on the base ref; the portable smoke set is skipped"
53 fi
54
55 - name: Install Stable Rust Toolchain (for the pinned aien-test build)
56 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master 2026-10-16
57 if: steps.anchors.outputs.enrolled == 'true'
58 with:
59 toolchain: stable
60 components: rustfmt
61
62 - name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
63 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64 if: steps.anchors.outputs.enrolled == 'true'
65 with:
66 repository: aien-dev/aien-sovereign-core-mv
67 ref: ${{ env.AIEN_TEST_PIN }}
68 path: .aien-test-src
69
70 - name: Move the pinned source out of the tree under test
71 if: steps.anchors.outputs.enrolled == 'true'
72 # cargo reads .cargo/config.toml from the working directory upward. This repository's
73 # config replaces crates-io with vendor/, which does not carry aien-test's dependencies,
74 # and a tree under test must never configure the build of its own verifier.
75 run: mv .aien-test-src "$RUNNER_TEMP/aien-test-src"
76
77 - name: Cache the pinned aien-test build
78 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
79 if: steps.anchors.outputs.enrolled == 'true'
80 with:
81 path: |
82 ~/.cargo/registry
83 ~/.cargo/git
84 ${{ runner.temp }}/aien-test-src/target
85 key: aien-test-${{ runner.os }}-${{ env.AIEN_TEST_PIN }}
86
87 - name: Build aien-test from the pin outside the tree under test
88 if: steps.anchors.outputs.enrolled == 'true'
89 run: |
90 cd "$RUNNER_TEMP/aien-test-src" && cargo build --release -p aien-test
91 mkdir -p "$RUNNER_TEMP/bin" && cp "$RUNNER_TEMP/aien-test-src/target/release/aien-test" "$RUNNER_TEMP/bin/aien-test"
92 echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
93 cd "$GITHUB_WORKSPACE"
94 git status --porcelain --untracked-files=normal
95
96 - name: Portable smoke set (gates whose requires is only portable, named at the base ref)
97 if: steps.anchors.outputs.enrolled == 'true'
98 run: |
99 base="${{ steps.ids.outputs.base }}"
100 names=$(for f in $(git ls-tree -r --name-only "$base" -- tests/gates | grep '\.gate$'); do
101 git show "$base:$f" | awk '
102 /^gate:/ {g=$2}
103 /^requires:/ {inr=1; next}
104 inr && /^ - / { if ($2 != "portable") other=1; next }
105 /^[a-z]/ {inr=0}
106 END { if (g != "" && !other) print g }'
107 done)
108 echo "portable smoke set: $(echo $names)"
109 mkdir -p "$RUNNER_TEMP/evidence"
110 fail=0
111 for g in $names; do
112 echo "::group::$g"
113 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
114 echo "::endgroup::"
115 done
116 exit $fail
117
118 alpha:
119 name: AIEN Alpha
120 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/alpha/')
121 runs-on: ubuntu-latest
122 timeout-minutes: 30
123 env:
124 REPO_SLUG: aien-dev/aienux
125 AIEN_TEST_PIN: a51042b61b87355c0850ef82ba409a46e153a1ff
126 RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
127 steps:
128 - name: Checkout the tagged commit
129 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
130 with:
131 fetch-depth: 0
132
133 - name: The tagged commit must be on main
134 id: ids
135 run: |
136 sha=$(git rev-parse "${GITHUB_REF}^{commit}")
137 git fetch -q origin main
138 if ! git merge-base --is-ancestor "$sha" origin/main; then
139 echo "::error::${GITHUB_REF#refs/tags/} points at $sha, which is not on main"
140 exit 1
141 fi
142 echo "sha=$sha" >> "$GITHUB_OUTPUT"
143 echo "tag ${GITHUB_REF#refs/tags/} -> $sha (on main)"
144
145 - name: Trust anchors from origin/main
146 run: |
147 mkdir -p "$RUNNER_TEMP/anchors"
148 if ! git show "origin/main:.aien/verify.pub" > "$RUNNER_TEMP/anchors/verify.pub" 2>/dev/null; then
149 echo "::error::.aien/verify.pub is not on origin/main: no trusted key, nothing can be verified."
150 exit 1
151 fi
152 git show "origin/main:.aien/always" > "$RUNNER_TEMP/anchors/always" 2>/dev/null || : > "$RUNNER_TEMP/anchors/always"
153 echo "verify.pub (origin/main): $(cat "$RUNNER_TEMP/anchors/verify.pub")"
154
155 - name: Install Stable Rust Toolchain (for the pinned aien-test build)
156 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master 2026-10-16
157 with:
158 toolchain: stable
159 components: rustfmt
160
161 - name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
162 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
163 with:
164 repository: aien-dev/aien-sovereign-core-mv
165 ref: ${{ env.AIEN_TEST_PIN }}
166 path: .aien-test-src
167
168 - name: Move the pinned source out of the tree under test
169 # cargo reads .cargo/config.toml from the working directory upward. This repository's
170 # config replaces crates-io with vendor/, which does not carry aien-test's dependencies,
171 # and a tree under test must never configure the build of its own verifier.
172 run: mv .aien-test-src "$RUNNER_TEMP/aien-test-src"
173
174 - name: Cache the pinned aien-test build
175 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
176 with:
177 path: |
178 ~/.cargo/registry
179 ~/.cargo/git
180 ${{ runner.temp }}/aien-test-src/target
181 key: aien-test-${{ runner.os }}-${{ env.AIEN_TEST_PIN }}
182
183 - name: Build aien-test from the pin outside the tree under test
184 run: |
185 cd "$RUNNER_TEMP/aien-test-src" && cargo build --release -p aien-test
186 mkdir -p "$RUNNER_TEMP/bin" && cp "$RUNNER_TEMP/aien-test-src/target/release/aien-test" "$RUNNER_TEMP/bin/aien-test"
187 echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
188 cd "$GITHUB_WORKSPACE"
189 git status --porcelain --untracked-files=normal
190
191 - name: Fetch the signed Spark bundle for the tagged commit
192 run: |
193 url="$RECEIPTS_RAW/aienux/${{ steps.ids.outputs.sha }}/bundle.json"
194 echo "bundle url: $url"
195 if ! curl -fsSL "$url" -o "$RUNNER_TEMP/bundle.json"; then
196 echo "::error::no signed Spark bundle for ${{ steps.ids.outputs.sha }} at $url"
197 exit 1
198 fi
199
200 - name: Verify the full bundle with the origin/main public key
201 run: |
202 required=$(grep -v '^#' "$RUNNER_TEMP/anchors/always" | grep -v '^$' | paste -sd, - || true)
203 set +e
204 aien-test verify-bundle "$RUNNER_TEMP/bundle.json" \
205 --repo "github.com/$REPO_SLUG" \
206 --commit "${{ steps.ids.outputs.sha }}" \
207 --pubkey "$RUNNER_TEMP/anchors/verify.pub" \
208 --require-full \
209 ${required:+--require "$required"}
210 rc=$?
211 set -e
212 echo "verify-bundle exit $rc (0 PASS, 1 FAIL, 2 NOT_RUN, 3 REJECTED)"
213 echo "::group::tag message"
214 git tag -l --format='%(contents)' "${GITHUB_REF#refs/tags/}"
215 echo "::endgroup::"
216 exit "$rc"