interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / .github / workflows / aien-verification.yml

235 lines · 10323 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# Verifier source commits are pinned; action tags and stable Rust track upstream.
11# This workflow does not claim immutable execution/toolchain reproducibility.
12name: AIEN
13
14on:
15 pull_request:
16 push:
17 branches: [main]
18 tags: ['alpha/*']
19
20permissions:
21 contents: read
22
23concurrency:
24 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
26
27jobs:
28 checks:
29 name: AIEN Checks
30 if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
31 runs-on: ubuntu-latest
32 timeout-minutes: 30
33 env:
34 REPO_SLUG: aien-dev/omega
35 AIEN_TEST_PIN: a51042b61b87355c0850ef82ba409a46e153a1ff
36 RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
37 steps:
38 - name: Checkout the head under test
39 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40 with:
41 fetch-depth: 0
42
43 - name: Resolve the base ref
44 id: ids
45 run: |
46 git fetch -q origin main
47 echo "base=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
48 echo "base (trust anchors): $(git rev-parse origin/main)"
49
50 - name: "Enrollment from the base ref (never from the head under test)"
51 id: anchors
52 run: |
53 if git cat-file -e "${{ steps.ids.outputs.base }}:.aien/verify.pub" 2>/dev/null; then
54 echo "enrolled=true" >> "$GITHUB_OUTPUT"
55 else
56 echo "enrolled=false" >> "$GITHUB_OUTPUT"
57 echo "not enrolled: no .aien/verify.pub on the base ref; the portable smoke set is skipped"
58 fi
59
60 # #938: the offline DAG evaluator (#936) on x86_64. This host links
61 # tests/dagsim/sha256_host.c (Makefile DS_SHA_SRC); the AArch64 link
62 # through src/omega_om_units.c runs in om-units-arm64.yml.
63 - name: test-dagsim (offline DAG evaluator, x86_64)
64 # shell: bash runs `bash -eo pipefail`, so a failing make fails the step through the tee.
65 shell: bash
66 run: |
67 mkdir -p "$RUNNER_TEMP/dagsim"
68 make test-dagsim 2>&1 | tee "$RUNNER_TEMP/dagsim/test-dagsim-x86_64.log"
69
70 - name: Keep the test-dagsim log
71 if: always()
72 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
73 with:
74 name: test-dagsim-x86_64
75 path: ${{ runner.temp }}/dagsim/
76 if-no-files-found: ignore
77
78 - name: Install Stable Rust Toolchain (for the pinned aien-test build)
79 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master 2026-10-16
80 if: steps.anchors.outputs.enrolled == 'true'
81 with:
82 toolchain: stable
83 components: rustfmt
84
85 - name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
86 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
87 if: steps.anchors.outputs.enrolled == 'true'
88 with:
89 repository: aien-dev/aien-sovereign-core-mv
90 ref: ${{ env.AIEN_TEST_PIN }}
91 path: .aien-test-src
92
93 - name: Move the pinned source outside the candidate Cargo configuration
94 if: steps.anchors.outputs.enrolled == 'true'
95 run: mv .aien-test-src "$RUNNER_TEMP/aien-test-src"
96
97 # Cache dependencies only, never verifier executables or candidate-controlled target output.
98 - name: Cache the pinned aien-test dependencies
99 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
100 if: steps.anchors.outputs.enrolled == 'true'
101 with:
102 path: |
103 ~/.cargo/registry
104 ~/.cargo/git
105 key: aien-test-isolated-v1-${{ runner.os }}-${{ env.AIEN_TEST_PIN }}
106
107 - name: Build aien-test outside the tree under test
108 if: steps.anchors.outputs.enrolled == 'true'
109 run: |
110 cd "$RUNNER_TEMP/aien-test-src"
111 cargo build --release -p aien-test --target-dir "$RUNNER_TEMP/aien-test-target"
112 mkdir -p "$RUNNER_TEMP/bin" && cp "$RUNNER_TEMP/aien-test-target/release/aien-test" "$RUNNER_TEMP/bin/aien-test"
113 echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
114 cd "$GITHUB_WORKSPACE"
115 git status --porcelain --untracked-files=normal
116
117 - name: Portable smoke set (gates whose requires is only portable, named at the base ref)
118 if: steps.anchors.outputs.enrolled == 'true'
119 run: |
120 base="${{ steps.ids.outputs.base }}"
121 names=$(for f in $(git ls-tree -r --name-only "$base" -- tests/gates | grep '\.gate$'); do
122 git show "$base:$f" | awk '
123 /^gate:/ {g=$2}
124 /^requires:/ {inr=1; next}
125 inr && /^ - / { if ($2 != "portable") other=1; next }
126 /^[a-z]/ {inr=0}
127 END { if (g != "" && !other) print g }'
128 done)
129 echo "portable smoke set: $(echo $names)"
130 mkdir -p "$RUNNER_TEMP/evidence"
131 fail=0
132 for g in $names; do
133 echo "::group::$g"
134 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
135 echo "::endgroup::"
136 done
137 exit $fail
138
139 alpha:
140 name: AIEN Alpha
141 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/alpha/')
142 runs-on: ubuntu-latest
143 timeout-minutes: 30
144 env:
145 REPO_SLUG: aien-dev/omega
146 AIEN_TEST_PIN: a51042b61b87355c0850ef82ba409a46e153a1ff
147 RECEIPTS_RAW: https://raw.githubusercontent.com/aien-dev/aien-receipts/main
148 steps:
149 - name: Checkout the tagged commit
150 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
151 with:
152 fetch-depth: 0
153
154 - name: The tagged commit must be on main
155 id: ids
156 run: |
157 sha=$(git rev-parse "${GITHUB_REF}^{commit}")
158 git fetch -q origin main
159 if ! git merge-base --is-ancestor "$sha" origin/main; then
160 echo "::error::${GITHUB_REF#refs/tags/} points at $sha, which is not on main"
161 exit 1
162 fi
163 echo "sha=$sha" >> "$GITHUB_OUTPUT"
164 echo "tag ${GITHUB_REF#refs/tags/} -> $sha (on main)"
165
166 - name: Trust anchors from origin/main
167 run: |
168 mkdir -p "$RUNNER_TEMP/anchors"
169 if ! git show "origin/main:.aien/verify.pub" > "$RUNNER_TEMP/anchors/verify.pub" 2>/dev/null; then
170 echo "::error::.aien/verify.pub is not on origin/main: no trusted key, nothing can be verified."
171 exit 1
172 fi
173 git show "origin/main:.aien/always" > "$RUNNER_TEMP/anchors/always" 2>/dev/null || : > "$RUNNER_TEMP/anchors/always"
174 echo "verify.pub (origin/main): $(cat "$RUNNER_TEMP/anchors/verify.pub")"
175
176 - name: Install Stable Rust Toolchain (for the pinned aien-test build)
177 uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master 2026-10-16
178 with:
179 toolchain: stable
180 components: rustfmt
181
182 - name: Checkout the pinned aien-test source (aien-sovereign-core @ ${{ env.AIEN_TEST_PIN }})
183 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
184 with:
185 repository: aien-dev/aien-sovereign-core-mv
186 ref: ${{ env.AIEN_TEST_PIN }}
187 path: .aien-test-src
188
189 - name: Move the pinned source outside the candidate Cargo configuration
190 run: mv .aien-test-src "$RUNNER_TEMP/aien-test-src"
191
192 # Cache dependencies only, never verifier executables or candidate-controlled target output.
193 - name: Cache the pinned aien-test dependencies
194 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
195 with:
196 path: |
197 ~/.cargo/registry
198 ~/.cargo/git
199 key: aien-test-isolated-v1-${{ runner.os }}-${{ env.AIEN_TEST_PIN }}
200
201 - name: Build aien-test outside the tree under test
202 run: |
203 cd "$RUNNER_TEMP/aien-test-src"
204 cargo build --release -p aien-test --target-dir "$RUNNER_TEMP/aien-test-target"
205 mkdir -p "$RUNNER_TEMP/bin" && cp "$RUNNER_TEMP/aien-test-target/release/aien-test" "$RUNNER_TEMP/bin/aien-test"
206 echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
207 cd "$GITHUB_WORKSPACE"
208 git status --porcelain --untracked-files=normal
209
210 - name: Fetch the signed Spark bundle for the tagged commit
211 run: |
212 url="$RECEIPTS_RAW/omega/${{ steps.ids.outputs.sha }}/bundle.json"
213 echo "bundle url: $url"
214 if ! curl -fsSL "$url" -o "$RUNNER_TEMP/bundle.json"; then
215 echo "::error::no signed Spark bundle for ${{ steps.ids.outputs.sha }} at $url"
216 exit 1
217 fi
218
219 - name: Verify the full bundle with the origin/main public key
220 run: |
221 required=$(grep -v '^#' "$RUNNER_TEMP/anchors/always" | grep -v '^$' | paste -sd, - || true)
222 set +e
223 aien-test verify-bundle "$RUNNER_TEMP/bundle.json" \
224 --repo "github.com/$REPO_SLUG" \
225 --commit "${{ steps.ids.outputs.sha }}" \
226 --pubkey "$RUNNER_TEMP/anchors/verify.pub" \
227 --require-full \
228 ${required:+--require "$required"}
229 rc=$?
230 set -e
231 echo "verify-bundle exit $rc (0 PASS, 1 FAIL, 2 NOT_RUN, 3 REJECTED)"
232 echo "::group::tag message"
233 git tag -l --format='%(contents)' "${GITHUB_REF#refs/tags/}"
234 echo "::endgroup::"
235 exit "$rc"