interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

GitHub aien-dev/aien-architecture-mv#137 (code only)

closed derived 5d77968b3cb00758 #137

Imported from GitHub aien-dev/aien-architecture-mv#137 (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 d0fe710a7289b7ad025dd73b062835fbb75f659c · Head 68193d4dd979c6e250d3619647b5e5ce433dbebc

Apply it

git checkout -b patch-5d77968b3cb00758 d0fe710a7289b7ad025dd73b062835fbb75f659c
curl -fsSL https://interplane.io/drakestapleton/aien-architecture-mv/patches/5d77968b3cb00758.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-architecture-mv
137
68193d4dd979c6e250d3619647b5e5ce433dbebc
{"kind":"github-import","owner":"aien-dev","repo":"aien-architecture-mv","number":137,"url":"https://github.com/aien-dev/aien-architecture-mv/pull/137","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:46Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index 94ccf63..851e586 100644
--- a/.crumb
+++ b/.crumb
@@ -21,8 +21,8 @@
     "generated": {
       "children": [
         {
-          "digest": "7a274e73dd98c83d87711fb503bf433361846084959462cc56e01a70b11f1871",
-          "last_commit": "9403e34",
+          "digest": "4e1642f63092b7a66dba3b40e8cffe7a748d025a201ed2effb4c37ad1ab81957",
+          "last_commit": "d8bd4d9",
           "name": "docs",
           "purpose": "Directory docs. Purpose not yet described by a human."
         },
@@ -33,8 +33,8 @@
           "purpose": "Directory doctrine. Purpose not yet described by a human."
         },
         {
-          "digest": "fa990e71f6e3b3dbe1ab8072cf5ed51f8a4bcb0759756c60fc09b647bfcc6904",
-          "last_commit": "a44d5da",
+          "digest": "4e4e56f7069b2df5065f7020589175735a5f9fae2c99e75173c843a35b569ec5",
+          "last_commit": "d8bd4d9",
           "name": "scripts",
           "purpose": "Directory scripts. Purpose not yet described by a human."
         },
@@ -45,15 +45,15 @@
           "purpose": "Directory tools. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:e06d2dd2d9c99dd3961b3578b2f5785aae4053595f77dffac35c710525764e0a",
-      "compiled_at": "2026-10-05T14:07:13Z",
+      "children_root": "sha256:efc732facfc8380986a44ccf869d480965f0f4e27af5593e1e27fc66a04bcd1c",
+      "compiled_at": "2026-10-05T17:54:40Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:fa8dac7d8ad92a1f3d2007f6f86fb5434e67010a74d58f23a46932517459cab8",
+      "digest": "sha256:99184c1e6c3d4617d360ec0646c232117365c754ce695c241ee42aad15f94fe8",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 219,
-      "generated_at_commit": "86266343f979875419e3239226bbd9e2a287b9d1",
-      "source_tree": "sha256:2ee849f0678d85a7a1f298d1507e60811097edf46ed4a839d98e0bd69000aca0"
+      "files": 221,
+      "generated_at_commit": "d8bd4d922a556e00af2fb4d4b2dd8059c0740d2f",
+      "source_tree": "sha256:bb8bf90cd7181ccbf21b83017e4a08208c5701d455ee72a5360b6f1f5836be0d"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/.crumb b/docs/.crumb
index dac8c3d..06cab60 100644
--- a/docs/.crumb
+++ b/docs/.crumb
@@ -56,7 +56,7 @@
         },
         {
           "digest": "2812aeb880835afae274e0a164ed976362b191717bd958d54a4c5c5f48ed05af",
-          "last_commit": "d2a49e0",
+          "last_commit": "9403e34",
           "name": "plans",
           "purpose": "Directory docs/plans. Purpose not yet described by a human."
         },
@@ -74,14 +74,14 @@
         }
       ],
       "children_root": "sha256:bde813bd3da2022fdea0b51909fffcaf9185928075df4868d9520f7c42fcff99",
-      "compiled_at": "2026-10-05T12:34:11Z",
+      "compiled_at": "2026-10-05T17:52:10Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:7a274e73dd98c83d87711fb503bf433361846084959462cc56e01a70b11f1871",
+      "digest": "sha256:4e1642f63092b7a66dba3b40e8cffe7a748d025a201ed2effb4c37ad1ab81957",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 121,
-      "generated_at_commit": "d2a49e0fb4dac777271bf7c184ff048d5c63b4ba",
-      "source_tree": "sha256:11300a4e990a14754138c6d4a38cb2c2288a6b90136d405792df12cf49089d6b"
+      "generated_at_commit": "d0fe710a7289b7ad025dd73b062835fbb75f659c",
+      "source_tree": "sha256:2efff52ac67b33d36a95ee3da2dc3c342a8d91edd802a07f126658db46efb08e"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/qualification/CANDIDATE.md b/docs/qualification/CANDIDATE.md
index 8b73076..7aab384 100644
--- a/docs/qualification/CANDIDATE.md
+++ b/docs/qualification/CANDIDATE.md
@@ -58,3 +58,5 @@ Promotion checks (for example `evidence-immutable`) are mandatory. A bypass need
 ## Checker
 
 `scripts/check_candidate.sh <manifest.toml>` verifies that all required fields are present, that each pinned commit (`[commits]` and `[contracts]`) is 40 hex digits and exists in its repo (checked with `gh api`), that executable digests are 64 hex and not all zero, that a `#` inside a quoted value is kept (only a trailing comment is dropped), and that a non-draft manifest has real executable digests. Test: `scripts/test_check_candidate.sh` (the 2026-10-01 draft is kept as `scripts/testdata/cand-draft-fixture.toml`; offline: a fake `gh` on PATH exercises the real `gh` code path, and mutant copies of the checker prove each check bites). Wiring into CI is not done and needs Drake's approval.
+
+`scripts/check_candidate_pins.sh <manifest.toml>` verifies that the pins agree with what the pinned code consumes: the sovereign-core `omega.lock` equals `[commits] omega`; the sovereign-core `Cargo.lock` git revisions of aien-protocols, crumb-spec and spark-crumbs equal `[commits] aien-protocols` and the two `[contracts]`; the omega `physics.lock` and `aienos.lock` equal `[commits] physics` and `aienos`; each known `[consumed_pins]` entry equals the value read. Lock files are read from GitHub at the pinned commits. A repo with two revisions in `Cargo.lock`, or an unreadable lock file, fails. Test: `scripts/test_check_candidate_pins.sh` (offline, lock files served by a stub). Results on the frozen manifests (2026-10-05): CAND-0 disagrees on aienos (its recorded gap G1); CAND-1 disagrees on both contracts: it pins the crumb-spec and spark-crumbs heads (`10b8251`, `98bb7cb`), while its sovereign-core `Cargo.lock` consumes `24194d1` and `9355a92`, the values CAND-0 pins. Frozen manifests are not edited; CAND-1.gates.md and later candidates record it.
diff --git a/qualification/candidates/CAND-1.gates.md b/qualification/candidates/CAND-1.gates.md
index 725ae47..8e2ef6f 100644
--- a/qualification/candidates/CAND-1.gates.md
+++ b/qualification/candidates/CAND-1.gates.md
@@ -75,6 +75,11 @@ omega #290 (the R15 sampler no longer leaves a 24 h `sleep` holding the quiet fl
 - **TRUST-1 M5:** 11 gates need attended hardware boots or operator ceremonies; 5 have no implementation; the
   Gate 7 preflight refuses because Secure Boot is off on this machine (operator setting). Not qualified.
 - **Physical machine:** every AIENOS result is QEMU. Nothing here qualifies the Spark booting AIENOS.
+- **Contract pins in the manifest are wrong** (found 2026-10-05 by `scripts/check_candidate_pins.sh`). `CAND-1.toml`
+  `[contracts]` pins the crumb-spec and spark-crumbs heads (`10b8251`, `98bb7cb`); the sovereign-core `Cargo.lock` at
+  `2eec75b` consumes `24194d1` and `9355a92` (two commits behind each head, the revisions CAND-0 pins). The built
+  executables used the consumed revisions, so the digests are unaffected; the manifest line is wrong. A frozen
+  manifest is not edited; CAND-2 pins the consumed revisions.
 - **Path independence** tested 2026-10-05 by a build at a second checkout path (`CAND1-PATH2-2eec75b`): 8 of 9
   executables reproduce the CAND-1 digests, including aien-cli. omegatool (`omega-runtime`) does not: it embeds the
   physics checkout path in three strings (control: the second-path omega checkout built with the physics path set
diff --git a/scripts/.crumb b/scripts/.crumb
index dc606b8..c58a43d 100644
--- a/scripts/.crumb
+++ b/scripts/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-05T03:32:07Z",
+      "compiled_at": "2026-10-05T17:54:40Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:fa990e71f6e3b3dbe1ab8072cf5ed51f8a4bcb0759756c60fc09b647bfcc6904",
+      "digest": "sha256:4e4e56f7069b2df5065f7020589175735a5f9fae2c99e75173c843a35b569ec5",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 5,
-      "generated_at_commit": "c5d80978c7a22cc039e67def9745cede5010f388",
-      "source_tree": "sha256:9fcc43ef8155c0c5705c20333999b2a919de931f6d160ea822e13bfb6894f6cc"
+      "files": 7,
+      "generated_at_commit": "d8bd4d922a556e00af2fb4d4b2dd8059c0740d2f",
+      "source_tree": "sha256:ccbda5ed9f36d4c23fb42dc0955b4e51ff4f1cd1f23c15432948c9267acff73f"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/scripts/check_candidate_pins.sh b/scripts/check_candidate_pins.sh
new file mode 100755
index 0000000..a07fb00
--- /dev/null
+++ b/scripts/check_candidate_pins.sh
@@ -0,0 +1,114 @@
+#!/usr/bin/env bash
+# check_candidate_pins.sh: do the pins of a candidate manifest equal what the pinned code consumes?
+# Usage: scripts/check_candidate_pins.sh <manifest.toml>
+# check_candidate.sh proves each pinned commit exists; this script proves the pins agree with each other.
+# It reads the lock files of the pinned commits from GitHub and compares:
+#   sovereign-core omega.lock                        = [commits] omega
+#   sovereign-core Cargo.lock aien-protocols rev     = [commits] aien-protocols
+#   sovereign-core Cargo.lock crumb-spec rev         = [contracts] crumb-spec
+#   sovereign-core Cargo.lock spark-crumbs rev       = [contracts] spark-crumbs
+#   omega physics.lock                               = [commits] physics (when pinned)
+#   omega aienos.lock                                = [commits] aienos
+#   every [consumed_pins] key below                  = the value read from its lock file
+# A Cargo.lock package with more than one git revision, or a lock file that cannot be read, fails.
+# Exit 0 = every pin agrees, 1 = any mismatch or read failure. Pure bash plus `gh api`.
+# Override the reader with CAND_FILE_AT (a command run as: $CAND_FILE_AT <repo> <sha> <path>, printing the
+# file) for offline tests.
+set -u
+f="${1:-}"
+[ -f "$f" ] || { echo "usage: $0 <manifest.toml>" >&2; exit 1; }
+fail=0
+ok() { echo "OK: $*"; }
+err() { echo "FAIL: $*" >&2; fail=1; }
+
+file_at() {
+  if [ -n "${CAND_FILE_AT:-}" ]; then $CAND_FILE_AT "$1" "$2" "$3"
+  else gh api -H "Accept: application/vnd.github.raw" "repos/aien-dev/$1/contents/$3?ref=$2"; fi
+}
+
+# Same parser as check_candidate.sh: "section.key" -> value, for lines `key = "value"`.
+declare -A kv
+sec=""
+while IFS= read -r line; do
+  if [[ "$line" =~ ^[[:space:]]*([A-Za-z0-9_.-]+)[[:space:]]*=[[:space:]]*\"([^\"]*)\"[[:space:]]*(#.*)?$ ]]; then
+    kv["${sec}${BASH_REMATCH[1]}"]="${BASH_REMATCH[2]}"; continue
+  fi
+  line="$(echo "$line" | sed -e 's/^[[:space:]]*#.*//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
+  [ -z "$line" ] && continue
+  if [[ "$line" =~ ^\[([A-Za-z0-9_.-]+)\][[:space:]]*(#.*)?$ ]]; then sec="${BASH_REMATCH[1]}."; continue; fi
+done < "$f"
+
+# The pin of a lock file: its first line that is not blank and not a comment must be exactly 40 lowercase hex
+# (comment lines after it are allowed). Anything else, or a failed read, prints nothing and fails. The read is
+# captured with its exit status before parsing: on a missing commit `gh api` prints an error body that itself
+# contains the 40-hex ref, which must never be taken for the file.
+read_lock() { # read_lock <repo> <sha> <path>
+  local text line
+  text=$(file_at "$1" "$2" "$3") || return 1
+  line=$(printf '%s\n' "$text" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | grep -v -m1 -e '^$' -e '^#')
+  [[ "$line" =~ ^[0-9a-f]{40}$ ]] || return 1
+  echo "$line"
+}
+
+# git revision of the aien-dev repo $2 in Cargo.lock text $1: every package whose source is that repo (a repo
+# that ships several crates, such as aien-protocols, counts once); fails on zero or several revisions
+cargo_rev() {
+  local revs
+  revs=$(printf '%s\n' "$1" | grep -E "^source = \"git\+https://github\.com/aien-dev/$2(\.git)?[?#]" \
+    | grep -oE '#[0-9a-f]{40}"' | cut -c2-41 | sort -u)
+  [ -n "$revs" ] || { echo "none"; return 1; }
+  [ "$(printf '%s\n' "$revs" | wc -l)" -eq 1 ] || { echo "several:$(echo $revs)"; return 1; }
+  echo "$revs"
+}
+
+same() { # same <label> <pinned> <consumed>
+  if [ -z "$2" ]; then err "$1: not pinned in the manifest"
+  elif [ "$2" = "$3" ]; then ok "$1 = $3"
+  else err "$1: manifest pins $2, the code consumes $3"; fi
+}
+
+sc="${kv[commits.aien-sovereign-core]:-}"; om="${kv[commits.omega]:-}"
+[ -n "$sc" ] && [ -n "$om" ] || { err "manifest lacks commits.aien-sovereign-core or commits.omega"; exit 1; }
+
+if sc_omega=$(read_lock aien-sovereign-core "$sc" omega.lock); then
+  same "sovereign-core omega.lock -> commits.omega" "$om" "$sc_omega"
+else err "cannot read omega.lock at aien-sovereign-core $sc"; sc_omega=""; fi
+
+if cargo_lock=$(file_at aien-sovereign-core "$sc" Cargo.lock) && [ -n "$cargo_lock" ]; then
+  for pair in aien-protocols:commits.aien-protocols crumb-spec:contracts.crumb-spec spark-crumbs:contracts.spark-crumbs; do
+    pkg="${pair%%:*}"; key="${pair#*:}"
+    if rev=$(cargo_rev "$cargo_lock" "$pkg"); then same "sovereign-core Cargo.lock $pkg -> $key" "${kv[$key]:-}" "$rev"
+    else err "sovereign-core Cargo.lock $pkg: git revision $rev"; fi
+  done
+  prot=$(cargo_rev "$cargo_lock" aien-protocols) || prot=""
+else err "cannot read Cargo.lock at aien-sovereign-core $sc"; prot=""; fi
+
+om_physics=$(read_lock omega "$om" physics.lock) || om_physics=""
+om_aienos=$(read_lock omega "$om" aienos.lock) || om_aienos=""
+om_argus=$(read_lock omega "$om" argus.lock) || om_argus=""
+[ -n "$om_aienos" ] && same "omega aienos.lock -> commits.aienos" "${kv[commits.aienos]:-}" "$om_aienos" \
+  || err "cannot read aienos.lock at omega $om"
+if [ -n "${kv[commits.physics]:-}" ]; then
+  [ -n "$om_physics" ] && same "omega physics.lock -> commits.physics" "${kv[commits.physics]}" "$om_physics" \
+    || err "cannot read physics.lock at omega $om"
+fi
+
+# [consumed_pins] are informational in check_candidate.sh; here each known key must equal what was read.
+for k in "${!kv[@]}"; do
+  [[ "$k" == consumed_pins.* ]] || continue
+  name="${k#consumed_pins.}"
+  case "$name" in
+    sovereign-core-omega-lock) got="$sc_omega" ;;
+    sovereign-core-cargo-lock-aien-protocols) got="$prot" ;;
+    omega-physics-lock) got="$om_physics" ;;
+    omega-aienos-lock) got="$om_aienos" ;;
+    omega-argus-lock) got="$om_argus" ;;
+    *) echo "SKIP: consumed_pins.$name (not read by this script)"; continue ;;
+  esac
+  [ -n "$got" ] || { err "consumed_pins.$name: its lock file could not be read"; continue; }
+  same "consumed_pins.$name" "${kv[$k]}" "$got"
+done
+
+[ "$fail" -eq 0 ] && echo "PINS AGREE: $f" && exit 0
+echo "PINS DISAGREE: $f" >&2
+exit 1
diff --git a/scripts/test_check_candidate_pins.sh b/scripts/test_check_candidate_pins.sh
new file mode 100755
index 0000000..de66613
--- /dev/null
+++ b/scripts/test_check_candidate_pins.sh
@@ -0,0 +1,116 @@
+#!/usr/bin/env bash
+# Test for check_candidate_pins.sh. Offline: lock files are served from a temp tree by a CAND_FILE_AT stub.
+set -u
+here="$(cd "$(dirname "$0")" && pwd)"
+chk="$here/check_candidate_pins.sh"
+tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
+OM=1111111111111111111111111111111111111111; SC=2222222222222222222222222222222222222222
+AO=3333333333333333333333333333333333333333; PH=4444444444444444444444444444444444444444
+PR=5555555555555555555555555555555555555555; CS=6666666666666666666666666666666666666666
+SP=7777777777777777777777777777777777777777; AR=8888888888888888888888888888888888888888
+OTHER=9999999999999999999999999999999999999999
+cat > "$tmp/stub.sh" <<S
+#!/usr/bin/env bash
+# like gh api on a missing file or commit: an error body that contains the requested ref, and exit 1
+cat "$tmp/files/\$1/\$2/\$3" 2>/dev/null || { echo "{\"message\":\"No commit found for the ref \$2\"}"; exit 1; }
+S
+chmod +x "$tmp/stub.sh"; export CAND_FILE_AT="$tmp/stub.sh"
+
+serve() { mkdir -p "$(dirname "$tmp/files/$1")"; cat > "$tmp/files/$1"; }
+tree() { # tree : the consistent lock files
+  rm -rf "$tmp/files"
+  echo "$OM" | serve "aien-sovereign-core/$SC/omega.lock"
+  serve "aien-sovereign-core/$SC/Cargo.lock" <<L
+[[package]]
+name = "aien-protocol-types"
+source = "git+https://github.com/aien-dev/aien-protocols?rev=$PR#$PR"
+
+[[package]]
+name = "aien-probe"
+source = "git+https://github.com/aien-dev/aien-protocols?rev=$PR#$PR"
+
+[[package]]
+name = "crumb-spec"
+source = "git+https://github.com/aien-dev/crumb-spec?rev=$CS#$CS"
+
+[[package]]
+name = "spark-crumbs"
+source = "git+https://github.com/aien-dev/spark-crumbs?rev=$SP#$SP"
+
+[[package]]
+name = "serde"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+L
+  echo "$PH" | serve "omega/$OM/physics.lock"
+  echo "$AO" | serve "omega/$OM/aienos.lock"
+  printf '%s\n# argus pin, comment with no hex\n' "$AR" | serve "omega/$OM/argus.lock"
+}
+manifest() { # manifest <out> : manifest that agrees with tree
+  cat > "$1" <<M
+schema = "CandidateManifestV1"
+id = "CAND-T"
+[commits]
+omega = "$OM"
+aienos = "$AO"
+aien-sovereign-core = "$SC"
+aien-protocols = "$PR"
+physics = "$PH"
+[contracts]
+crumb-spec = "$CS"
+spark-crumbs = "$SP"
+[consumed_pins]
+sovereign-core-omega-lock = "$OM"
+sovereign-core-cargo-lock-aien-protocols = "$PR"
+omega-physics-lock = "$PH"
+omega-aienos-lock = "$AO"
+omega-argus-lock = "$AR"
+something-else = "not read"
+M
+}
+pass=0; bad=0
+expect() { # expect <0|1> <label> <file> [grep pattern that the output must contain]
+  out=$("$chk" "$3" 2>&1); rc=$?
+  if [ "$rc" = "$1" ] && { [ -z "${4:-}" ] || grep -q -- "$4" <<<"$out"; }; then pass=$((pass+1))
+  else bad=$((bad+1)); echo "TEST FAIL: $2 (rc=$rc)"; echo "$out" | sed 's/^/    /'; fi
+}
+tree; manifest "$tmp/m.toml"
+expect 0 "consistent pins agree" "$tmp/m.toml" "PINS AGREE"
+sed "s/^crumb-spec = .*/crumb-spec = \"$OTHER\"/" "$tmp/m.toml" > "$tmp/a.toml"
+expect 1 "contract pinned to a revision the code does not consume" "$tmp/a.toml" "contracts.crumb-spec: manifest pins $OTHER"
+sed "s/^aien-protocols = .*/aien-protocols = \"$OTHER\"/" "$tmp/m.toml" > "$tmp/b.toml"
+expect 1 "aien-protocols pin differs from Cargo.lock" "$tmp/b.toml" "aien-protocols -> commits.aien-protocols"
+sed "s/^aienos = .*/aienos = \"$OTHER\"/" "$tmp/m.toml" > "$tmp/c.toml"
+expect 1 "aienos pin differs from omega aienos.lock" "$tmp/c.toml" "omega aienos.lock"
+sed "s/^physics = .*/physics = \"$OTHER\"/" "$tmp/m.toml" > "$tmp/d.toml"
+expect 1 "physics pin differs from omega physics.lock" "$tmp/d.toml" "omega physics.lock"
+sed "s/^omega-argus-lock = .*/omega-argus-lock = \"$OTHER\"/" "$tmp/m.toml" > "$tmp/e.toml"
+expect 1 "consumed_pins entry differs" "$tmp/e.toml" "consumed_pins.omega-argus-lock"
+sed '/^physics = /d;/^omega-physics-lock/d' "$tmp/m.toml" > "$tmp/f.toml"
+expect 0 "physics unpinned is allowed" "$tmp/f.toml"
+sed '/^spark-crumbs = /d' "$tmp/m.toml" > "$tmp/g.toml"
+expect 1 "contract missing from the manifest" "$tmp/g.toml" "not pinned"
+# lock-file side
+echo "$OTHER" | serve "aien-sovereign-core/$SC/omega.lock"
+expect 1 "sovereign-core omega.lock points elsewhere" "$tmp/m.toml" "omega.lock -> commits.omega"
+tree; rm "$tmp/files/aien-sovereign-core/$SC/Cargo.lock"
+expect 1 "unreadable Cargo.lock" "$tmp/m.toml" "cannot read Cargo.lock"
+tree; rm "$tmp/files/omega/$OM/aienos.lock"
+expect 1 "unreadable aienos.lock" "$tmp/m.toml" "cannot read aienos.lock"
+tree; printf '\n[[package]]\nname = "crumb-spec-extra"\nsource = "git+https://github.com/aien-dev/crumb-spec?rev=%s#%s"\n' "$OTHER" "$OTHER" \
+  >> "$tmp/files/aien-sovereign-core/$SC/Cargo.lock"
+expect 1 "two revisions of one repo in Cargo.lock" "$tmp/m.toml" "several"
+tree; sed -i "s/crumb-spec?rev=$CS#$CS/crumb-spec-fork?rev=$CS#$CS/" "$tmp/files/aien-sovereign-core/$SC/Cargo.lock"
+expect 1 "a repo whose name only starts with the contract name does not count" "$tmp/m.toml" "crumb-spec: git revision none"
+tree
+# a missing lock whose error body carries the omega ref must not read as "argus.lock pins omega"
+tree; rm "$tmp/files/omega/$OM/argus.lock"; sed "s/^omega-argus-lock = .*/omega-argus-lock = \"$OM\"/" "$tmp/m.toml" > "$tmp/i.toml"
+expect 1 "error body with the ref is not a lock file" "$tmp/i.toml" "consumed_pins.omega-argus-lock: its lock file could not be read"
+tree; printf '# pinned after %s\n%s\n' "$OTHER" "$AO" | serve "omega/$OM/aienos.lock"
+expect 0 "a leading comment with a sha is skipped" "$tmp/m.toml"
+tree; printf '%s %s\n' "$AO" "trailing words" | serve "omega/$OM/aienos.lock"
+expect 1 "first line must be exactly the sha" "$tmp/m.toml" "cannot read aienos.lock"
+tree
+sed '/^aien-sovereign-core = /d' "$tmp/m.toml" > "$tmp/h.toml"
+expect 1 "manifest without sovereign-core" "$tmp/h.toml" "lacks"
+echo "check_candidate_pins tests: $pass passed, $bad failed"
+[ "$bad" -eq 0 ]