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/aien-sovereign-core-mv/blob/main/docs/release/BUILD_RECIPE.md # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / docs / release / BUILD_RECIPE.md` 107 lines ยท 8992 bytes Raw Blame History Source # 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-debugger` - `scripts/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 ` runs the release gate itself and writes the candidate id and `[model]` table from `release/candidate.toml` into `release.toml`. A failing gate means no package (`AIEN_DRY_RUN=1` only labels it `NOT-RELEASABLE`, which the checks reject). - `scripts/check-release-candidate.sh` (tree): candidate named, `omega.lock` equals `omega-commit`, `Cargo.lock` holds 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-sha256` equals the digest of `bin/aien`, every listed file, no unlisted file; `--native` is required (linux aarch64, omega linked): the digest must equal `[executables] aien-cli-native-release`, and each helper binary must equal its `sc-` entry. A package without `--native` is refused (no candidate digest for that kind); the release matrix builds only the native target. - `scripts/verify-release-assets.sh `: signature on `SHA256SUMS.txt` valid for the pinned signer, every listed file matches, every `sovereign-*` archive is covered. - `scripts/release-publish-gate.sh `: the stage-3 publish decision (see `RELEASE_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, write `SHA256SUMS.txt` and 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 with `dry_run` false does the same, and only from a `v*` tag. - Stage 2, the operator, offline: sign `SHA256SUMS.txt` with the public-release key (`scripts/key-ceremony.sh sign`) and attach `SHA256SUMS.txt.sig` to the draft. - Stage 3, `release-publish.yml` (manual, input `tag`): checks out the tag, downloads the draft, runs `scripts/release-publish-gate.sh` against that commit's `docs/release/allowed_signers` and publishes only if it passes. It refuses unsigned, mismatched, dry-run, internal-test-key and placeholder-key releases. - Manual run (`workflow_dispatch`): input `dry_run`, default true. Builds, packages with the manifest labelled `dry-run = true`, checks, writes `DRY-RUN-NOT-A-RELEASE.txt` into the signed checksum list, signs with a throwaway key generated in the job (public half uploaded as `dry-run-signers`, private half deleted), verifies, shows that the publish gate refuses it, uploads workflow artifacts only. Gate or package-check failures are recorded in `DRY-RUN-STATUS-.txt` instead of stopping the run. It never creates a release. Installed with `AIEN_DRY_RUN_SIGNERS=dry-run-signers`, it is recorded as `signature_check: dry-run-key`. - Pull requests (`release-dry-run.yml`): the publish guard, `scripts/test-release-gate-wiring.sh` and 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 " 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, and `test-release-gate-wiring.sh` fails if that step ever becomes non-blocking (only the manual dry run may continue past it).