Release build recipe and checks
One recipe builds the release and one script checks it. The workflow, a person reproducing a digest and the checks all use the same commands.
Build
One command materializes every pin a native build needs (sovereign-core #92, "clean checkout plus one command"):
scripts/pins.sh --gpu # omega at omega.lock, physics and aienos at omega's locks, under target/pins
. target/pins/env.sh # AIEN_OMEGA_DIR, AIEN_OMEGA_COMPOSE_DIR, AIEN_PHYSICS_DIR, AIEN_AIENOS_LOCK_REPO, AIEN_REQUIRE_NATIVE_LIBS=1
Without --gpu only the composition library is linked (the CI gate shape). scripts/pins.sh --check verifies the
three checkouts are at their pins without touching the network. AIEN_REQUIRE_NATIVE_LIBS=1 makes a build that
would silently fall back to a CPU stub fail instead; scripts/golden_path.sh sources target/pins/env.sh when
present. scripts/test-pins.sh is the offline self-test (throwaway repositories, no network).
scripts/release-build.sh (needs the pinned toolchain from rust-toolchain.toml, cargo fetch --locked into the
CARGO_HOME in use, and for the native engine AIEN_OMEGA_DIR at omega.lock and AIEN_PHYSICS_DIR at omega's
physics.lock; AIEN_DEV_FALLBACK and AIEN_FORCE_CPU_STUB unset, no mojo on PATH):
scripts/repro-build.sh -p spark-cockpit-rs -p spark-inquisitor -p cortex-encoder-rs -p cortex-rs -p spark-supervisor -p spark-debuggerscripts/repro-build.sh -p aien-cli
repro-build.sh is cargo build --release --locked with --remap-path-prefix for CARGO_HOME and the repo root.
Cargo unifies features across all -p packages in one command, so a binary's digest depends on its group
(F1-binary-digest-difference.md: one seven-package command gives a different aien-cli). Packages are therefore built
in fixed groups and aien-cli alone and last. That aien-cli digest equals CAND-3's aien-cli-native-release
(F1, build A). The CAND-3 manifest [build] line lists -p aien-cli -p aien-proof -p aien-test in one command;
whether that group gives the same aien-cli digest as -p aien-cli alone is UNVERIFIED here, and the release does not
package aien-proof or aien-test.
Serving engine, built in a container (DRA-43)
scripts/repro-container-build.sh [--plain] WORK builds aien-serve-http the way the SI installer ships it:
libomega_gpu.a from omega's Makefile at OMEGA_REV (physics at that commit's physics.lock), linked through
AIEN_OMEGA_GPU_LIB and AIEN_OMEGA_GPU_LIB_SHA256, then scripts/repro-build.sh -p aien-serve-http from the core
tree at CORE_REV. It runs in the release/repro/Dockerfile image (ubuntu 24.04 by digest, every Ubuntu package by
exact .deb sha256, rustup-init by sha256, Rust from rust-toolchain.toml; CPU only, no device) with WORK mounted
at the same path, and keeps CARGO_HOME, CARGO_TARGET_DIR and HOME under WORK. Two runs from two WORK paths
therefore differ only in their paths, and their WORK/out/BUILD-INFO.txt digests must be equal. --plain is the
negative control: the same build with plain cargo build --release --locked (no --remap-path-prefix), whose
digests differ between paths.
For SI alpha-20261029.1 (core 59b05a71, omega 6de999da, physics 6d7cf0d4), runs from two paths gave
libomega_gpu.a 110295ef23dc7561eea371636347c005835f37b82c22f92401aa8a887a3ca990 (the shipped library) and
aien-serve-http b6e971976e2fb7d2ae8a6b07d8a015a1f09b4192d4e6fcaa4154ad2a5187575f both times; the --plain runs
gave 9555c030... and 7781ae77.... The remapped engine is not the shipped 19173f9e...: that binary carries
241 /home/.../.cargo/registry/src paths, which the remap replaces with /cargo/registry/src.
Ubuntu packages (DRA-108): release/repro/apt-packages.in names the eight packages the image needs.
release/repro/apt-lock.sh SNAPSHOT resolves them, with every dependency apt pulls in, against one
snapshot.ubuntu.com timestamp (which carries arm64) and writes apt-packages.lock (package, version, architecture,
sha256, size and pool path of each .deb, each sha256 checked against the signed snapshot index) and
dpkg-manifest.tsv (the whole image's dpkg-query listing). The image build reads no apt index:
apt-install.sh fetches each file from that snapshot, else ports.ubuntu.com, else Launchpad's archive file store,
accepts it only at the locked sha256, and fails unless the image's package listing equals dpkg-manifest.tsv.
The image tag in repro-container-build.sh hashes the Dockerfile and these three files. To move the toolchain,
rerun apt-lock.sh with a newer snapshot and rebuild; the engine sha256 then has to be re-established. The lock is at
snapshot 20261031T120000Z (64 packages, the versions of the 2026-10-31 build); two clean rebuilds from it on
2026-11-04 gave aien-serve-http 6fb04197... both times (RECHECK.md, recheck-transcripts/2026-11-04-pinned-*.txt).
REPRO_MEMORY (for example 3g) caps the container's memory and swap. release/repro/RECHECK.md
is the outsider recheck kit for the engine SI pins (core d3dec0eb, aien-serve-http 6fb04197...): every receipt
field the Crumb Doctrine requires, and the exact commands, with public URLs only.
Package and check
scripts/package-release.sh <out.tar.gz>runs the release gate itself and writes the candidate id and[model]table fromrelease/candidate.tomlintorelease.toml. A failing gate means no package (AIEN_DRY_RUN=1only labels itNOT-RELEASABLE, which the checks reject).scripts/check-release-candidate.sh(tree): candidate named,omega.lockequalsomega-commit,Cargo.lockholds exactly the[pins]revisions (aien-protocols, crumb-spec, spark-crumbs),[model]complete.scripts/check-release-candidate.sh --package A.tar.gz --native: candidate id,[model]table (model id, safetensors, tokenizer, config, oracle fixture digests),aien-cli-sha256equals the digest ofbin/aien, every listed file, no unlisted file;--nativeis required (linux aarch64, omega linked): the digest must equal[executables] aien-cli-native-release, and each helper binary must equal itssc-<name>entry. A package without--nativeis refused (no candidate digest for that kind); the release matrix builds only the native target.scripts/verify-release-assets.sh <dir> <allowed_signers>: signature onSHA256SUMS.txtvalid for the pinned signer, every listed file matches, everysovereign-*archive is covered.scripts/release-publish-gate.sh <dir> <allowed_signers>: the stage-3 publish decision (seeRELEASE_SIGNING.md).scripts/test-release-checks.sh(also in CI) proves each of these rejects: wrong omega.lock or Cargo.lock pins, executable digest mismatch, model input mismatch, missing, corrupt or foreign signature, tampered files.
Release workflow modes
- Tag push
v*(stage 1 of the offline-signing handoff,RELEASE_SIGNING.md): build, check, writeSHA256SUMS.txtand create a DRAFT release holding the archives and checksums. No signature is made in CI and no key is in CI or a secret. The draft is not public. A manual run withdry_runfalse does the same, and only from av*tag. - Stage 2, the operator, offline: sign
SHA256SUMS.txtwith the public-release key (scripts/key-ceremony.sh sign) and attachSHA256SUMS.txt.sigto the draft. - Stage 3,
release-publish.yml(manual, inputtag): checks out the tag, downloads the draft, runsscripts/release-publish-gate.shagainst that commit'sdocs/release/allowed_signersand publishes only if it passes. It refuses unsigned, mismatched, dry-run, internal-test-key and placeholder-key releases. - Manual run (
workflow_dispatch): inputdry_run, default true. Builds, packages with the manifest labelleddry-run = true, checks, writesDRY-RUN-NOT-A-RELEASE.txtinto the signed checksum list, signs with a throwaway key generated in the job (public half uploaded asdry-run-signers, private half deleted), verifies, shows that the publish gate refuses it, uploads workflow artifacts only. Gate or package-check failures are recorded inDRY-RUN-STATUS-<target>.txtinstead of stopping the run. It never creates a release. Installed withAIEN_DRY_RUN_SIGNERS=dry-run-signers, it is recorded assignature_check: dry-run-key. - Pull requests (
release-dry-run.yml): the publish guard,scripts/test-release-gate-wiring.shand the refusal suite (scripts/test-release-real-tree.sh, run on a fixture tree pinned to the candidate) block. The tree gate on the PR's own revision only reports "IS / is NOT releasable as <candidate>" in the step summary: main may move ahead of the candidate's omega-commit. A release must be cut from a commit whose tree passes the gate; the tag-push path enforces it, andtest-release-gate-wiring.shfails if that step ever becomes non-blocking (only the manual dry run may continue past it).