interplane.Get Omega
Read in your language

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

GitHub aien-dev/aien-sovereign-core-mv#196 (code only)

closed derived 907cc03762ec7008 #196

Imported from GitHub aien-dev/aien-sovereign-core-mv#196 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base e8204f53629a7421c8f1b050fae0c525382aa3fd · Head d4195c48892f5d69cfccc03da2317916c0b4a092

Apply it

git checkout -b patch-907cc03762ec7008 e8204f53629a7421c8f1b050fae0c525382aa3fd
curl -fsSL https://interplane.io/drakestapleton/aien-sovereign-core-mv/patches/907cc03762ec7008.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-sovereign-core-mv
196
d4195c48892f5d69cfccc03da2317916c0b4a092
{"kind":"github-import","owner":"aien-dev","repo":"aien-sovereign-core-mv","number":196,"url":"https://github.com/aien-dev/aien-sovereign-core-mv/pull/196","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:15Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index 7ab14d6d..cb587e50 100644
--- a/.crumb
+++ b/.crumb
@@ -64,8 +64,8 @@
     "generated": {
       "children": [
         {
-          "digest": "de0f2dbec5082b4c2d0708fb10d51502d7cdf113fe2abcc9ac98b6d43cb70dca",
-          "last_commit": "3c2bb5d",
+          "digest": "e8767d4b3fd08dac77adeaabdeff6a58bca1cc927c7c89db68bd5d2c6b49fead",
+          "last_commit": "8b42fe4",
           "name": "scripts",
           "purpose": ""
         },
@@ -76,15 +76,15 @@
           "purpose": ""
         }
       ],
-      "children_root": "sha256:bf3a85d165c2729e32156e011342777ee2cd1b8c6a3676988ea69296aa3a5b49",
-      "compiled_at": "2026-10-04T16:37:52Z",
+      "children_root": "sha256:dfcfd805db0c30c667bc5682364bd3acb3383d494967dcae39f2420739723d7d",
+      "compiled_at": "2026-10-04T16:48:07Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:1169c59512f131169a93cc42f782c80f9572077e16b78974d3e376521d55cc09",
-      "evidence_files": 19,
-      "evidence_root": "sha256:4fc93bc0533be92440e419df17436410d35e5972b340c3a281f6a1bb86693ee2",
-      "files": 663,
-      "generated_at_commit": "426f6a0f04b225fe719f280578fbbf2937dbc961",
-      "source_tree": "sha256:d0856d88a7183490f65a567981f4c3cea6445074a31421987946b347016493d8"
+      "digest": "sha256:e9f1bee75666a43b4a5bc98f6c05a5a83ce277b29c62aa572768fd03dbc18355",
+      "evidence_files": 20,
+      "evidence_root": "sha256:1ef4526f6fe1ba0cee21a89c3313d37bf2e94e1aa2e9bd1a364225e52882d170",
+      "files": 664,
+      "generated_at_commit": "ef3b4df17102183771e617bb6909dda085a2aba5",
+      "source_tree": "sha256:5b1f4ee964eb3b85f1e361b46c1c281f315fa1972fc2cd92c7399fc01ad7c873"
     }
   },
   "history": [],
diff --git a/docs/release/receipts/2026-10-04-spark-offline-install.md b/docs/release/receipts/2026-10-04-spark-offline-install.md
new file mode 100644
index 00000000..0c9db6f1
--- /dev/null
+++ b/docs/release/receipts/2026-10-04-spark-offline-install.md
@@ -0,0 +1,60 @@
+# Receipt: offline release install, DGX Spark, 2026-10-04
+
+Machine: NVIDIA DGX Spark (GB10, aarch64, Linux). Repository: fresh clone of
+aien-sovereign-core, main at 58f7c34 (after #192) plus this branch. Every
+install step below ran with the release assets on local disk (file:// base URL),
+so no network was needed for verification or install.
+
+## 1. Published release v0.1.1: signature and checksum chain
+
+Commands (run on the Spark):
+
+```
+gh release download v0.1.1 -R aien-dev/aien-sovereign-core -p 'SHA256SUMS.txt*' -p 'sovereign-linux-x86_64.tar.gz'
+ssh-keygen -Y verify -f docs/release/allowed_signers -I aien-release -n aien-release -s SHA256SUMS.txt.sig < SHA256SUMS.txt
+sha256sum -c SHA256SUMS.txt --ignore-missing
+tar -tzf sovereign-linux-x86_64.tar.gz | head
+```
+
+Results:
+
+- Good "aien-release" signature for aien-release with ED25519 key SHA256:H0BmJOBKGKioiB/PZjf4Yo3c+4KrDgtArDi/+AECj1Y
+- sovereign-linux-x86_64.tar.gz: OK
+- The archive carries bin/, imprints/en2-trinity/, install.sh, README.md, CONSTITUTION.md.
+
+Not run to completion: `AIEN_RELEASE_TAG=v0.1.1 bash install.sh` on this machine.
+v0.1.1 has no linux-aarch64 asset; the release workflow gained that target in
+#192, so the next tag will carry it. UNVERIFIED: a published aarch64 binary
+installing on the Spark. No x86_64 emulation is available here (docker
+--platform linux/amd64 fails with exec format error) and the Mac was not
+reachable, so the x86_64 and macos-arm64 assets could not be installed either.
+
+## 2. Standalone offline install into a clean HOME (fixture release)
+
+Command: `bash scripts/test-install-release.sh` on this branch, cases 5 and 6.
+
+What it proves: a copy of install.sh on its own (no checkout, no Cargo.toml, no
+git clone), HOME set to an empty temporary directory, release assets served
+over file://, installs the signed fixture release (bin/aien, bin/cortex and the
+EN2 imprint from the archive) and writes nothing into HOME. With no signer
+override, the key pinned inside install.sh (AIEN_PINNED_SIGNER, checked equal
+to docs/release/allowed_signers) refuses the fixture because it is signed by a
+throwaway key; nothing is installed.
+
+Result: PASS, 2026-10-04, Spark aarch64. The same test runs in CI (ci.yml, step
+"Verify Signed Release Install") on x86_64.
+
+## 3. What a fresh machine needs
+
+- install.sh, plus either network access to the GitHub release or the three
+  assets on disk (SHA256SUMS.txt, SHA256SUMS.txt.sig, the archive) with
+  `AIEN_RELEASE_BASE_URL=file:///path/to/assets`.
+- ssh-keygen, curl, tar, and sha256sum or shasum. No git, no cargo, no Python.
+- Command: `AIEN_RELEASE_TAG=v0.1.1 bash install.sh`
+
+## Next
+
+Cut the next release after #192 so the linux-aarch64 asset exists, sign
+SHA256SUMS.txt by hand per docs/release/RELEASE_SIGNING.md, then rerun section 1
+for that tag and perform the real install on the Spark in a clean HOME. Append
+the result to this file.
diff --git a/install.sh b/install.sh
index c31e30a4..b60af49c 100755
--- a/install.sh
+++ b/install.sh
@@ -11,22 +11,39 @@ echo "=================================================================="
 echo "      ⚡ AIEN Sovereign Stack: Universal Developer Installer       "
 echo "=================================================================="
 
-# Run from a checkout or bootstrap one when the script is piped to Bash.
+# Release mode (AIEN_RELEASE_TAG=vX.Y.Z) installs a published, signed release and
+# needs no source tree and no network beyond the three release assets.
+RELEASE_TAG="${AIEN_RELEASE_TAG:-}"
+
+# Release signing key, pinned here so a release can be verified with nothing but
+# this file and the assets (offline). Must equal docs/release/allowed_signers;
+# scripts/test-install-release.sh checks that they match.
+AIEN_PINNED_SIGNER='aien-release ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID6WDVy2x8aV80ag10iPonS4J8k4seWrgsi5cuq8AIZJ'
+
+# Run from a checkout, or bootstrap one when the script is piped to Bash for a
+# source build. Release mode runs without a checkout.
 INSTALL_WORKSPACE=""
+SOURCE_ROOT=""
 if [[ -n "${AIEN_SOURCE_DIR:-}" ]]; then
     SOURCE_ROOT="$(cd "$AIEN_SOURCE_DIR" && pwd)"
 elif [[ -f "${BASH_SOURCE[0]:-}" && -f "$(dirname "${BASH_SOURCE[0]}")/Cargo.toml" ]]; then
     SOURCE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-else
+elif [[ -z "$RELEASE_TAG" ]]; then
     INSTALL_WORKSPACE="$(mktemp -d "${TMPDIR:-/tmp}/aien-install.XXXXXX")"
     trap 'rm -rf "$INSTALL_WORKSPACE"' EXIT
     git clone --quiet https://github.com/aien-dev/aien-sovereign-core.git "$INSTALL_WORKSPACE/core"
-    git -C "$INSTALL_WORKSPACE/core" checkout --quiet "${AIEN_REV:-${AIEN_RELEASE_TAG:-main}}"
+    git -C "$INSTALL_WORKSPACE/core" checkout --quiet "${AIEN_REV:-main}"
     SOURCE_ROOT="$INSTALL_WORKSPACE/core"
 fi
-[[ -f "$SOURCE_ROOT/Cargo.toml" ]] || { echo "AIEN source manifest is missing" >&2; exit 1; }
-cd "$SOURCE_ROOT"
-echo "[*] Source commit: $(git rev-parse HEAD)"
+if [[ -n "$SOURCE_ROOT" ]]; then
+    [[ -f "$SOURCE_ROOT/Cargo.toml" ]] || { echo "AIEN source manifest is missing" >&2; exit 1; }
+    cd "$SOURCE_ROOT"
+    echo "[*] Source commit: $(git rev-parse HEAD 2>/dev/null || echo unknown)"
+else
+    echo "[*] Release mode without a source tree: $RELEASE_TAG"
+fi
+# Where the EN2 imprint comes from: the checkout, or the release archive (set below).
+IMPRINT_SRC="${SOURCE_ROOT:+$SOURCE_ROOT/imprints/en2-trinity}"
 
 OS="$(uname -s | tr "[:upper:]" "[:lower:]")"
 ARCH="$(uname -m)"
@@ -62,13 +79,21 @@ install_release() {
     local tag="$1"
     command -v ssh-keygen >/dev/null 2>&1 || { echo "Error: ssh-keygen is required to verify the release signature" >&2; exit 1; }
     command -v curl >/dev/null 2>&1 || { echo "Error: curl is required to download the release" >&2; exit 1; }
-    local signers="${AIEN_ALLOWED_SIGNERS:-$SOURCE_ROOT/docs/release/allowed_signers}"
-    [[ -f "$signers" ]] || { echo "Error: pinned signer file not found: $signers" >&2; exit 1; }
     local base="${AIEN_RELEASE_BASE_URL:-https://github.com/aien-dev/aien-sovereign-core/releases/download/$tag}"
     local asset="sovereign-${TARGET_OS}-${RELEASE_ARCH}.tar.gz"
     DL_DIR=""
     DL_DIR="$(mktemp -d "${TMPDIR:-/tmp}/aien-release.XXXXXX")"
     trap 'rm -rf "$DL_DIR"; [[ -z "$INSTALL_WORKSPACE" ]] || rm -rf "$INSTALL_WORKSPACE"' EXIT
+    # Signer file: explicit override, else the checkout's copy, else the key pinned above.
+    local signers="${AIEN_ALLOWED_SIGNERS:-}"
+    if [[ -z "$signers" && -n "$SOURCE_ROOT" && -f "$SOURCE_ROOT/docs/release/allowed_signers" ]]; then
+        signers="$SOURCE_ROOT/docs/release/allowed_signers"
+    fi
+    if [[ -z "$signers" ]]; then
+        signers="$DL_DIR/allowed_signers"
+        printf '%s\n' "$AIEN_PINNED_SIGNER" > "$signers"
+    fi
+    [[ -f "$signers" ]] || { echo "Error: pinned signer file not found: $signers" >&2; exit 1; }
     echo "[*] Downloading $tag: $asset, SHA256SUMS.txt, SHA256SUMS.txt.sig"
     local f
     for f in SHA256SUMS.txt SHA256SUMS.txt.sig "$asset"; do
@@ -90,6 +115,7 @@ install_release() {
     mkdir -p "$DL_DIR/x" "$BIN_DIR"
     tar -xzf "$DL_DIR/$asset" -C "$DL_DIR/x"
     [[ -d "$DL_DIR/x/bin" ]] || { echo "Error: archive has no bin/ directory" >&2; exit 1; }
+    [[ ! -d "$DL_DIR/x/imprints/en2-trinity" ]] || IMPRINT_SRC="$DL_DIR/x/imprints/en2-trinity"
     local b name
     for b in "$DL_DIR/x/bin/"*; do
         name="$(basename "$b")"
@@ -103,9 +129,6 @@ install_release() {
     done
 }
 
-
-RELEASE_TAG="${AIEN_RELEASE_TAG:-}"
-
 # Verify Rust Toolchain (source builds only)
 if [[ -z "$RELEASE_TAG" ]] && ! command -v cargo >/dev/null 2>&1; then
     echo "[!] Cargo not found. Installing Rust toolchain via rustup..."
@@ -198,8 +221,8 @@ else
 fi
 
 echo "[*] Installing Free EN2 Trinity Imprint..."
-if [ -d "imprints/en2-trinity" ]; then
-    cp -r imprints/en2-trinity/* "$IMPRINT_DIR/"
+if [[ -n "$IMPRINT_SRC" && -d "$IMPRINT_SRC" ]]; then
+    cp -r "$IMPRINT_SRC"/* "$IMPRINT_DIR/"
     echo "[+] EN2 Trinity Imprint installed locally to $IMPRINT_DIR"
 fi
 
diff --git a/scripts/.crumb b/scripts/.crumb
index 8ecedc05..6853f5bc 100644
--- a/scripts/.crumb
+++ b/scripts/.crumb
@@ -4,14 +4,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-04T16:20:07Z",
+      "compiled_at": "2026-10-04T16:48:07Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:de0f2dbec5082b4c2d0708fb10d51502d7cdf113fe2abcc9ac98b6d43cb70dca",
+      "digest": "sha256:e8767d4b3fd08dac77adeaabdeff6a58bca1cc927c7c89db68bd5d2c6b49fead",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 15,
-      "generated_at_commit": "f93f8f5246881c097f4fdfd1fc14acc4b1f0cf75",
-      "source_tree": "sha256:39e8e539eb93f627a55368a5bc91b17f56975a213724948f8b72a5d335dbc59a"
+      "generated_at_commit": "ef3b4df17102183771e617bb6909dda085a2aba5",
+      "source_tree": "sha256:4e4dcf41a2c344a181ad77b414640814a4bf27e8231e327ba3f125e312700ef0"
     }
   },
   "parent": {
diff --git a/scripts/test-install-release.sh b/scripts/test-install-release.sh
index 2080e23b..65875e59 100755
--- a/scripts/test-install-release.sh
+++ b/scripts/test-install-release.sh
@@ -1,7 +1,14 @@
 #!/usr/bin/env bash
-# Exercise install.sh release mode offline: a fixture release is signed with a
-# throwaway key and served over file://. Checks that a valid release installs
-# and that a tampered archive or a signature from another key installs nothing.
+# Exercise install.sh release mode offline. A fixture release is signed with a
+# throwaway key and served over file://. Checks:
+#   1. the key pinned inside install.sh equals docs/release/allowed_signers
+#   2. a valid signed release installs from a checkout
+#   3. a tampered archive installs nothing (checksum)
+#   4. a release signed by another key installs nothing (signature)
+#   5. a standalone copy of install.sh (no source tree, clean HOME) installs the
+#      valid release offline when the signer file is given, imprint included
+#   6. the same standalone copy with no signer override falls back to the key
+#      pinned in install.sh, so the fixture (throwaway key) is refused
 set -euo pipefail
 
 ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -14,41 +21,80 @@ case "$(uname -m)" in x86_64|amd64) ARCH=x86_64 ;; aarch64|arm64) ARCH=aarch64 ;
 [[ "$OS-$ARCH" != macos-aarch64 ]] || ARCH=arm64
 ASSET="sovereign-$OS-$ARCH.tar.gz"
 
+# 1. pinned key consistency
+PINNED="$(sed -n "s/^AIEN_PINNED_SIGNER='\(.*\)'\$/\1/p" "$ROOT/install.sh")"
+[[ -n "$PINNED" ]] || fail "install.sh has no AIEN_PINNED_SIGNER line"
+grep -qxF "$PINNED" "$ROOT/docs/release/allowed_signers" \
+    || fail "AIEN_PINNED_SIGNER in install.sh is not a line of docs/release/allowed_signers"
+
 ssh-keygen -q -t ed25519 -N '' -C test -f "$WORK/key"
 ssh-keygen -q -t ed25519 -N '' -C other -f "$WORK/other"
 printf 'aien-release %s\n' "$(cut -d' ' -f1,2 "$WORK/key.pub")" > "$WORK/allowed_signers"
 
 make_release() { # dir signing-key
     local d="$1" k="$2"
-    mkdir -p "$d" "$WORK/pkg/bin"
+    rm -rf "$WORK/pkg"
+    mkdir -p "$d" "$WORK/pkg/bin" "$WORK/pkg/imprints/en2-trinity"
     printf '#!/bin/sh\nexit 0\n' > "$WORK/pkg/bin/aien"
     printf '#!/bin/sh\nexit 0\n' > "$WORK/pkg/bin/cortex-rs"
+    printf 'fixture imprint\n' > "$WORK/pkg/imprints/en2-trinity/soul.md"
     chmod 755 "$WORK/pkg/bin/"*
     tar -czf "$d/$ASSET" -C "$WORK/pkg" .
     (cd "$d" && sha256sum "$ASSET" 2>/dev/null > SHA256SUMS.txt || shasum -a 256 "$ASSET" > SHA256SUMS.txt)
     ssh-keygen -q -Y sign -f "$k" -n aien-release "$d/SHA256SUMS.txt"
 }
 
-run_install() { # release-dir bin-dir
-    AIEN_SOURCE_DIR="$ROOT" AIEN_RELEASE_TAG=v0.0.0-test \
-    AIEN_RELEASE_BASE_URL="file://$1" AIEN_ALLOWED_SIGNERS="$WORK/allowed_signers" \
-    AIEN_BIN_DIR="$2" AIEN_CONFIG_DIR="$WORK/config" AIEN_INSTALL_NO_PROFILE=1 \
-        bash "$ROOT/install.sh" > "$WORK/log" 2>&1
+run_install() { # release-dir bin-dir config-dir installer [VAR=value ...]
+    local rel="$1" bin="$2" cfg="$3" installer="$4"
+    shift 4
+    env AIEN_RELEASE_TAG=v0.0.0-test AIEN_RELEASE_BASE_URL="file://$rel" \
+        AIEN_BIN_DIR="$bin" AIEN_CONFIG_DIR="$cfg" AIEN_INSTALL_NO_PROFILE=1 "$@" \
+        bash "$installer" > "$WORK/log" 2>&1
 }
 
+# 2. valid release, from the checkout
 make_release "$WORK/good" "$WORK/key"
-run_install "$WORK/good" "$WORK/bin-good" || { cat "$WORK/log" >&2; fail "valid signed release did not install"; }
+run_install "$WORK/good" "$WORK/bin-good" "$WORK/cfg-good" "$ROOT/install.sh" \
+    AIEN_SOURCE_DIR="$ROOT" AIEN_ALLOWED_SIGNERS="$WORK/allowed_signers" \
+    || { cat "$WORK/log" >&2; fail "valid signed release did not install"; }
 [[ -x "$WORK/bin-good/aien" && -x "$WORK/bin-good/cortex" ]] || fail "binaries missing after valid install"
 
+# 3. tampered archive
 make_release "$WORK/tamper" "$WORK/key"
 printf 'x' >> "$WORK/tamper/$ASSET"
-if run_install "$WORK/tamper" "$WORK/bin-tamper"; then fail "tampered archive was installed"; fi
+if run_install "$WORK/tamper" "$WORK/bin-tamper" "$WORK/cfg-tamper" "$ROOT/install.sh" \
+    AIEN_SOURCE_DIR="$ROOT" AIEN_ALLOWED_SIGNERS="$WORK/allowed_signers"; then
+    fail "tampered archive was installed"
+fi
 grep -q "checksum mismatch" "$WORK/log" || fail "tampered archive not rejected for checksum"
 [[ ! -e "$WORK/bin-tamper/aien" ]] || fail "tampered install left a binary"
 
+# 4. signature from another key
 make_release "$WORK/forged" "$WORK/other"
-if run_install "$WORK/forged" "$WORK/bin-forged"; then fail "release signed by another key was installed"; fi
+if run_install "$WORK/forged" "$WORK/bin-forged" "$WORK/cfg-forged" "$ROOT/install.sh" \
+    AIEN_SOURCE_DIR="$ROOT" AIEN_ALLOWED_SIGNERS="$WORK/allowed_signers"; then
+    fail "release signed by another key was installed"
+fi
 grep -q "signature is NOT valid" "$WORK/log" || fail "forged signature not rejected"
 [[ ! -e "$WORK/bin-forged/aien" ]] || fail "forged install left a binary"
 
-echo "PASS: release install verifies signature and checksum, rejects tampered and forged releases"
+# 5. standalone installer, no source tree, clean HOME, offline, signer file given
+mkdir -p "$WORK/standalone" "$WORK/home"
+cp "$ROOT/install.sh" "$WORK/standalone/install.sh"
+run_install "$WORK/good" "$WORK/bin-alone" "$WORK/cfg-alone" "$WORK/standalone/install.sh" \
+    HOME="$WORK/home" AIEN_ALLOWED_SIGNERS="$WORK/allowed_signers" \
+    || { cat "$WORK/log" >&2; fail "standalone offline install did not install"; }
+grep -q "Release mode without a source tree" "$WORK/log" || fail "standalone install used a source tree"
+[[ -x "$WORK/bin-alone/aien" && -x "$WORK/bin-alone/cortex" ]] || fail "binaries missing after standalone install"
+[[ -f "$WORK/cfg-alone/imprints/en2/soul.md" ]] || fail "imprint from the release archive was not installed"
+[[ -z "$(ls -A "$WORK/home")" ]] || fail "standalone install wrote into HOME: $(ls -A "$WORK/home")"
+
+# 6. standalone installer, no signer override: the pinned key refuses the fixture
+if run_install "$WORK/good" "$WORK/bin-pinned" "$WORK/cfg-pinned" "$WORK/standalone/install.sh" \
+    HOME="$WORK/home"; then
+    fail "fixture signed by a throwaway key was accepted by the pinned signer"
+fi
+grep -q "signature is NOT valid" "$WORK/log" || fail "pinned-signer fallback did not reject the fixture"
+[[ ! -e "$WORK/bin-pinned/aien" ]] || fail "pinned-signer refusal left a binary"
+
+echo "PASS: release install verifies signature and checksum, rejects tampered and forged releases, installs standalone offline, pinned key matches allowed_signers"