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
aien-sovereign-core-mv / docs / release / receipts / 2026-10-06-install-upgrade-rollback.md
| 1 | # Receipt: install, execute, upgrade, rollback, 2026-10-06 (NEXT-PHASE-4) |
| 2 | |
| 3 | Machine: NVIDIA DGX Spark (aarch64, Linux 7.0.0-1019-nvidia), host CPU only. No model was loaded and |
| 4 | no GPU work was run (see step 2 for how `--version` was kept off nvidia-smi). Repository: aien-sovereign-core |
| 5 | main at 80e071a (the CAND-3 sovereign-core pin). Nothing was written outside a scratch prefix; `$HOME` for the |
| 6 | installer was an empty temporary directory, no `sudo`, no PATH profile edits (`AIEN_INSTALL_NO_PROFILE=1`). |
| 7 | |
| 8 | ## Candidate (CAND-3 pins, frozen manifest qualification/candidates/CAND-3.toml) |
| 9 | |
| 10 | - sovereign-core 80e071a3ef700dbe31b1b081a957eebdcbf5ffc3 |
| 11 | - omega f816473df391bc4fbcf99df722edd70ed26ebef1 (checked out at that commit, `AIEN_OMEGA_DIR`) |
| 12 | - physics 6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf (equals omega `physics.lock`, `AIEN_PHYSICS_DIR`) |
| 13 | - toolchain: rust-toolchain.toml, 1.98.1; fresh `CARGO_HOME`, `cargo fetch --locked`; `mojo` not on PATH |
| 14 | - manifest digest `aien-cli-native-release` = 3a17ee79a238ad223fd59f4436d98906a0144b8d5ac47809da194a9ac1d493db |
| 15 | |
| 16 | Signing note (limit of this receipt): the private half of the AIEN release key is not available to this job |
| 17 | and none was created or imported. The archives were signed with a throwaway key made inside the scratch prefix |
| 18 | (`ssh-keygen -t ed25519`, comment np4-throwaway) and `AIEN_ALLOWED_SIGNERS` pointed at its public line, the same |
| 19 | mechanism `scripts/test-install-release.sh` uses. So the signature-and-checksum path ran for real, but against a |
| 20 | throwaway key, not the pinned release key. NOT_RUN: verification of a release signed by the pinned key. The |
| 21 | refusal side was run: the same install with no signer override (pinned key from install.sh) printed |
| 22 | "SHA256SUMS.txt signature is NOT valid. Nothing was installed." and created no bin directory. |
| 23 | |
| 24 | ## 1. INSTALL: PASS |
| 25 | |
| 26 | Build (log np4-logs/build1.log): |
| 27 | |
| 28 | ``` |
| 29 | cargo fetch --locked (CARGO_HOME = fresh directory in the prefix) |
| 30 | scripts/repro-build.sh -p aien-cli |
| 31 | scripts/repro-build.sh -p spark-cockpit-rs -p spark-inquisitor -p cortex-encoder-rs -p cortex-rs -p spark-supervisor -p spark-debugger -p aien-cli |
| 32 | scripts/repro-build.sh -p aien-cli (again, last, see finding F1) |
| 33 | scripts/package-release.sh <rel1>/sovereign-linux-aarch64.tar.gz |
| 34 | (sign SHA256SUMS.txt with the throwaway key, namespace aien-release) |
| 35 | AIEN_RELEASE_TAG=v0.0.0-np4 AIEN_RELEASE_BASE_URL=file://<rel1> AIEN_BIN_DIR=... AIEN_CONFIG_DIR=... \ |
| 36 | AIEN_ALLOWED_SIGNERS=... AIEN_INSTALL_NO_PROFILE=1 bash <standalone copy of install.sh> (env -i, empty HOME) |
| 37 | ``` |
| 38 | |
| 39 | Results: |
| 40 | |
| 41 | - install.sh: "Release mode without a source tree", "Signature and checksum verified", 7 binaries installed |
| 42 | (aien, cortex, cortex-encoder-rs, spark-cockpit, spark-debugger, spark-inquisitor, spark-supervisor), config and |
| 43 | EN2 imprint written to the config directory. Empty HOME stayed empty. |
| 44 | - archive sha256 e7411c7f9c0a4147... (archives are not byte-reproducible, tar stores mtimes; the binaries inside are) |
| 45 | - installed `aien` sha256 3a17ee79a238ad223fd59f4436d98906a0144b8d5ac47809da194a9ac1d493db |
| 46 | - Digest comparison to CAND-3 `aien-cli-native-release`: **EQUAL**. |
| 47 | |
| 48 | Finding F1 (measured, cause UNVERIFIED): `repro-build.sh -p aien-cli` alone gives 3a17ee79... (EQUAL to CAND-3). |
| 49 | Building the seven packaged crates in one cargo command and taking that `aien-cli` gives |
| 50 | ccecf9a13ef2c7a17eb54375b1f35efba2782b967635737bd19d34298b406ac9 (same size, 6,399,222 differing bytes). I believe |
| 51 | dependency feature unification or code layout differs when more packages are in one invocation (UNVERIFIED, not |
| 52 | investigated). The CAND-3 recipe is per-package, so the last command above rebuilt `aien-cli` alone before packaging. |
| 53 | Also, `.github/workflows/release.yml` builds `cargo build --locked --release --workspace` (no repro-build, no |
| 54 | `AIEN_OMEGA_DIR`), so a published release binary is not the candidate binary (UNVERIFIED which digest it yields; |
| 55 | not built here). |
| 56 | |
| 57 | ## 2. EXECUTE: PASS |
| 58 | |
| 59 | Run from an empty directory with `env -i`, no source tree. `--version` calls `nvidia-smi` when it is on PATH |
| 60 | (crates/aien-inference-abi `ExecutionSurface::detect`), so it was run with PATH set to an empty directory. |
| 61 | |
| 62 | - `aien --version` -> `AIEN CLI v0.1.0 (Host: Linux CPU (20 Cores, 121 GB RAM))`, exit 0 |
| 63 | - `aien --help` -> slash command list, exit 0 |
| 64 | - `ldd` lists no cuda or nvidia library; `scripts/zero-cuda-gate.sh <installed aien>` -> ZERO_CUDA PASS; `--self-test` -> PASS |
| 65 | (negative control rejected a CUDA probe) |
| 66 | - Not run: `aien doctor` and anything that probes the GB10 or loads a model (NOT_RUN, no-GPU rule). |
| 67 | |
| 68 | ## 3. UPGRADE: PASS (by overwrite; no dedicated upgrade path exists) |
| 69 | |
| 70 | Change (scratch worktree only, not in this PR): one README line and the `--version` string |
| 71 | `v0.1.0` -> `v0.1.0+np4-upgrade` in crates/aien-cli/src/main.rs. Rebuilt `-p aien-cli`, packaged release 2 |
| 72 | (archive sha256 8dec09b3f088fa9b...), signed with the same throwaway key, and ran the same install command over |
| 73 | the first install after appending `# user edit` to operator.toml. |
| 74 | |
| 75 | - installed `aien` sha256 e789c04d55b1963efc5b766d23d9c7693863cc37200dbca51adb44d5fee7db46, changed from step 1 |
| 76 | - `aien --version` -> `AIEN CLI v0.1.0+np4-upgrade (Host: Linux CPU ...)`, exit 0 |
| 77 | - operator.toml kept (log: "Existing configuration found"), the user edit survived |
| 78 | |
| 79 | ## 4. ROLLBACK: PASS as a fallback, MISSING: no native rollback |
| 80 | |
| 81 | install.sh keeps no previous version. Fallback used, labelled as such: run the same install command against the |
| 82 | release 1 assets again. |
| 83 | |
| 84 | - installed `aien` sha256 3a17ee79a238ad223fd59f4436d98906a0144b8d5ac47809da194a9ac1d493db, equal to step 1 and to the |
| 85 | CAND-3 digest; `cmp` against the binary inside the release 1 archive: byte-equal |
| 86 | - `aien --version` back to the step 1 output; zero-CUDA gate PASS; operator.toml unchanged by the rollback |
| 87 | - Only `aien` was compared to a CAND-3 digest. The other six binaries came from the same archive; they were not in the |
| 88 | manifest and were not individually re-hashed after rollback beyond the archive match. |
| 89 | |
| 90 | ## Gaps (the supported procedure lacks these; not implemented here) |
| 91 | |
| 92 | 1. MISSING: no native rollback. No previous-version copy, no `--rollback`, no backup of the replaced binaries. |
| 93 | Rollback needs the old signed assets to still be available. |
| 94 | 2. MISSING: no recorded installed version. Nothing in the bin or config directory says which release is installed; |
| 95 | the same tag with different content installed without complaint (test used one tag for both releases), and there is |
| 96 | no downgrade or same-version guard. |
| 97 | 3. MISSING: no atomic replace. `cp` writes over each binary in place. Replacing a running binary may fail with |
| 98 | "Text file busy" or leave a half-written file on interruption (UNVERIFIED, not tested here). No `install -m` to temp |
| 99 | plus `mv`, and no all-or-nothing across the seven files. |
| 100 | 4. MISSING: no uninstall, and no list of installed files; a binary dropped from a later release (or `spark-cockpit-rs` |
| 101 | renamed `spark-cockpit`) is never removed. Also `cortex-encoder-rs` is installed under its crate name while the |
| 102 | others are renamed. |
| 103 | 5. GAP: EN2 imprint is copied with `cp -r` over the existing imprint every run, so local edits there are overwritten |
| 104 | (read from install.sh, not tested). operator.toml is preserved. |
| 105 | 6. GAP: published releases are not the candidate. release.yml builds `--workspace` without repro-build.sh or the omega pins |
| 106 | (finding F1). Next cut: make the release workflow build per the CAND recipe and publish the CAND digest list. |
| 107 | 7. GAP: no published linux-aarch64 asset has been verified on the Spark (inherited from the 2026-10-04 receipt), and the |
| 108 | pinned release key was never exercised here (NOT_RUN above). |
| 109 | 8. GAP: `package-release.sh` output is not byte-reproducible (tar mtimes, owner); only the binaries inside are. |
| 110 | |
| 111 | Next cut: one script (`scripts/upgrade-release.sh` or a mode of install.sh) that stages the new release, verifies, swaps |
| 112 | atomically, records the installed tag and digests in a manifest file, and keeps one previous version for `--rollback`; |
| 113 | plus the release workflow change in gap 6. |