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

branch main Branches Tags History

aien-sovereign-core-mv / docs / campaigns / whole-system-e2e / REGRESSION-sc408-row8.md

53 lines · 4177 bytes Raw Blame History Rendered
1# Regression evidence, sc#408 audit row 8 (receipt continuity across a restart), 2026-10-17
2
3Row 8 of `RECOVERY-AUDIT-2026-10-11.md` was PARTIAL: the engine's journal continuity across a kill was shown by
4ledger contents, not by a hash check. This change makes it a hash check at the one place a restart reads the journal
5back (the compose home open, `ComposeBridge::open_home_marked`).
6
7## The gap, measured
8
9Each Cortex record digest (omega `cx_digest`) covers only its own record and is unkeyed. omega's open recomputes every
10digest and the running chain, but the chain is rebuilt from the file, not compared with anything. The external record
11mark (`<home>.cortex-mark`) held only the record count and the newest record's digest. So a record before the newest
12one, rewritten with a freshly computed digest, opened as if intact.
13
14## The check
15
16The mark is now version 2 (160 bytes): it also carries the running hash over every record digest #1..#records,
17`sha256(chain || digest)` from 32 zero bytes, the same chain omega keeps in memory (`rx_cortex.c` chain_step). sha2
18only; no new primitive. The open recomputes it from the digests omega verified and refuses a mismatch:
19`E_MARK_CHAIN` (`MarkRefusal::Chain`), "Run RecoverComposeHome". Each later append extends the chain from the last
20verified mark (no full rehash). `RecoverComposeHome` sets a chain-refused mark aside as `.lost-<seq>` with a repair
21record (`why: records before the newest differ`, `old_chain`), as it does for `E_MARK_DIGEST`. A version 1 mark still
22opens (count and digest checked), is rewritten as version 2 and the upgrade is printed once.
23
24## Red then green
25
26`crates/aien-runtime/tests/receipt_continuity_test.rs`, linked omega composition library built from the omega.lock pin
27(`scripts/pins.sh`). Each case rewrites `cortex.cx` with valid digests, so omega's own open check passes; the parser
28first checks its digest against every record omega wrote (a control).
29
30| case | main da84629 (test commit only) | this branch |
31|---|---|---|
32| forged middle receipt (one constraint note's text changed, payload sha and record digest recomputed) | accepted, opened with 22 records | refused `E_MARK_CHAIN` |
33| two receipts reordered (each keeps its slot's logical time) | accepted | refused `E_MARK_CHAIN` |
34| gap with the count restored (one receipt dropped, a later one repeated) | accepted | refused `E_MARK_CHAIN` |
35| foreign receipt spliced in from another home | accepted | refused `E_MARK_CHAIN` |
36| truncated tail | refused `E_MARK_TRUNCATED`; padded back to the count: `E_REPLAY` (J-Space anchor) | same |
37| refusal repairs nothing; recover keeps the old mark | (not reached) | pass |
38| version 1 mark upgraded, then a forged receipt refused | (not reached) | pass |
39| v2 mark claiming zero records with a non-initial chain | accepted on 8b47f25f (this branch before review), opened with 22 records | refused `E_MARK` (damaged mark, blames the mark) |
40
41Other checks on this branch: `scripts/test-linked-compose.sh` (CI's linked gate, `LINKED_REPEAT=1`): PASS, 592 linked
42tests; `cortex_mark` unit tests 13 passed (v1 read, v2 layout, zero-record chain refused, chain formula against a manual sha256 fold, refusal
43text); `crates/aien-cli/tests/recovery_matrix_test.rs` (real SIGKILL restarts of a compose-linked CPU
44`fault-hold` daemon, SmolLM2 on the CPU reference): 12 passed; `cargo clippy --workspace --all-targets -- -D warnings`
45and `cargo fmt --check` clean.
46
47## Limits (not claimed)
48
49The chain is unkeyed: rewriting the journal and the mark together, deleting the mark (adopted and reported), or
50rolling both back together is still not detected (the mark's declared NOT_PROVED limits). Same class: rewriting the mark as version 1 (no chain) skips the chain check, and the next save stamps a fresh version 2 chain over whatever the journal then holds; version 1 acceptance must end once the chain is keyed. Records appended after the
51last mark write (a kill between append and mark update) are taken as read, as before. A refused open still lets omega
52append its start-up records first, as for `E_MARK_DIGEST`. No fault-harness run, no E2E rerun, no GB10: the other
53#408 items stay open.