aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / evidence / continuity_qemu_2026-09-25.md
| 1 | # M4 continuity over System Store v1: QEMU qualification (2026-09-25) |
| 2 | |
| 3 | Code commit `3df62b23f3a0441c73bed8bd4b5a89f82d866ccc` (clean tree), branch |
| 4 | `feat/m4-continuity`, base `main` `2276906`. |
| 5 | Design: [ADR 0016](../docs/adr/0016-continuity-objects-over-store-v1.md) |
| 6 | (**Proposed**: continuity encodings are format version 0 on disposable media; |
| 7 | freezing them is an operator decision). |
| 8 | QEMU only, 4096-byte LBA, native NVMe driver, SMMUv3-confined DMA. |
| 9 | `CONTINUITY_NATIVE` is not claimed: Machine 1 waits on TRUST-1. |
| 10 | |
| 11 | Reproduce: `./scripts/qemu_continuity_test.sh` |
| 12 | |
| 13 | ## What is proven |
| 14 | |
| 15 | Every boot is a separate QEMU process (a cold restart); only the NVMe image |
| 16 | carries state between boots. The guest prints one line per boot from |
| 17 | `aienos_kernel::continuity`, including the full 256-bit `LogicalAgentId` and a |
| 18 | digest of every committed Cortex statement. |
| 19 | |
| 20 | | Claim (ADR 0007 / Continuous-Existence Amendment) | Step | |
| 21 | |---|---| |
| 22 | | A normal boot never mints an identity: blank media stops `STOP (store Unformatted)`, a formatted store with data but no agent root stops `UNPROVISIONED`, and the image is byte-identical after both boots | 1 | |
| 23 | | Provisioning happens once, from an explicit request, with an identity drawn from `RNDR`; a second request is refused (`AlreadyProvisioned`) without writing; an independent provisioning draws a different identity | 2 | |
| 24 | | Committed memory and branch lineage survive cold restarts under the same `LogicalAgentId`; each start durably advances the incarnation before acting (commit-before-observation) | 3 | |
| 25 | | A crash (SIGKILL) at every Store checkpoint of a continuity commit leaves the old or the new committed memory, never a third state, and never another identity; the switch happens exactly at the superblock write | 4 | |
| 26 | | A `DegradedRecovery` mount (malformed peer superblock) resumes read-only with the same identity and memory and writes nothing | 5 | |
| 27 | |
| 28 | Conflict (two agent roots), forked or gapped manifest chains, tampered |
| 29 | encodings, broken branch lineage and a power cut before every unit write of a |
| 30 | commit are covered by host tests (`cargo test -p aienos-kernel --lib |
| 31 | continuity`, 9 tests). |
| 32 | |
| 33 | ## Result |
| 34 | |
| 35 | ```text |
| 36 | === 1. Refusals: no boot path mints an identity === |
| 37 | PASS resume on blank media stops (store Unformatted) and writes nothing |
| 38 | PASS resume on a formatted but unprovisioned store stops UNPROVISIONED and writes nothing |
| 39 | === 2. Provisioning happens once === |
| 40 | PASS provisioned agent 1e87cd17709ddce9... (incarnation 1, empty memory, root branch) |
| 41 | PASS a second provisioning request is refused and writes nothing |
| 42 | PASS independent provisioning draws a different identity from RNDR |
| 43 | === 3. Memory and lineage survive cold restarts === |
| 44 | PASS resume + remember: incarnation 2, one Cortex fact and one forked branch committed |
| 45 | PASS cold restart 1: same agent, same memory 93153a653f8f3b39, same lineage, incarnation 3 |
| 46 | PASS cold restart 2: same agent, same memory 93153a653f8f3b39, same lineage, incarnation 4 |
| 47 | === 4. SIGKILL at every Store checkpoint of a continuity commit === |
| 48 | PASS kill at before_first_write: same agent, old memory |
| 49 | PASS kill at after_payloads: same agent, old memory |
| 50 | PASS kill at after_catalog: same agent, old memory |
| 51 | PASS kill at after_commit_record: same agent, old memory |
| 52 | PASS kill at after_first_flush: same agent, old memory |
| 53 | PASS kill at after_superblock_write: same agent, new memory |
| 54 | PASS kill at after_final_flush: same agent, new memory |
| 55 | === 5. Degraded mount resumes read-only === |
| 56 | PASS malformed peer superblock: same agent and memory, read-only, nothing written |
| 57 | |
| 58 | === Summary (commit 3df62b23f3a0441c73bed8bd4b5a89f82d866ccc) === |
| 59 | CONTINUITY_QEMU: PASS |
| 60 | CONTINUITY_NATIVE: NOT CLAIMED (Machine 1 waits on TRUST-1) |
| 61 | ``` |
| 62 | |
| 63 | ## Not claimed |
| 64 | |
| 65 | - Machine 1 behaviour, TRUST-1, encryption at rest (M5). |
| 66 | - Recovery Core operator flows (ADR 0006): the STOP states here are the entry |
| 67 | conditions; the operator-authenticated recovery actions are the next step. |
| 68 | - Catalog compaction: every Class A commit adds a manifest to the append-only |
| 69 | Store v1 catalog (bounded at 4096 entries). |
| 70 | - Whether Machine 1's cores implement FEAT_RNG (`RNDR`); provisioning fails |
| 71 | closed (`NO_ENTROPY`) if not. |