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

branch main Branches Tags History

aien-architecture-mv / docs / adr / 0015-resident-semantic-store.md

518 lines · 43683 bytes Raw Blame History Source

ADR 0015: Resident Semantic Store Boundary, Object Identity, and Reconstruction Contract

Status: Accepted by operator, 2026-09-27 Author: AIEN Architecture Working Group Date: 2026-09-27 Target Repositories: aien-architecture, aienos, omega, physics (FORGE), aegis-runtime, cortex-rs, aien-sovereign-core


Context

AIEN is a sovereign artificial intelligence architecture built on the canonical principle:

"AIEN lives in memory. Hardware visits it. Storage remembers how to bring it back."

In this architecture, the primary running intelligence is an in-memory semantic world (ResidentWorld) materialized in coherent volatile memory. Accelerators (GPUs) and host processors (CPUs) are execution resources that visit this resident world to perform perception, reasoning, and transformation. Persistent storage (NVMe / block devices) is not the runtime medium; storage exists solely for deterministic reconstruction, provenance, durable knowledge, and cold recovery.

Previous milestones established foundational primitives across isolated subsystems:

However, the complete contract connecting live volatile memory to durable block storage across reboots remains unratified. Without an unambiguous architecture contract:

  1. Systems risk conflating semantic meaning (SemanticId) with storage container identity (Store ObjectId).
  2. Implementations risk leaking machine-local, process-local, or chip-specific addresses into persistent records.
  3. Storage engines risk introducing generic relational/key-value databases (SQLite, RocksDB) into formal semantic layers.
  4. Cold recovery lacks a mathematically deterministic protocol to restore the in-memory graph from cold silicon.

This ADR ratifies the Resident Semantic Store boundary, establishing the authoritative rules, memory categories, object models, commit protocols, and cold reconstruction algorithms that every downstream builder must obey.


Normative Specification

1. Authoritative State

  1. Live Operational Authority: While AIEN is actively running, the live resident state in coherent memory (ResidentWorld) is the sole authoritative operational world. Dynamic goals, frontier reasoning, attention context, and evolving semantic relations exist authoritatively in volatile RAM. Accelerators compute directly over projections of this live state.
  2. Persistent Storage Role: Persistent storage is durable recovery material, historical evidence, and the immutable lineage anchor. Disk is not the active working state. Storage does not become authoritative for live operations while the machine is running.
  3. Durability Authority Transition: Persistent storage becomes canonical recovery material for a generation only after Store v1 writes the inactive superblock and its second hardware flush succeeds. The Store validates the complete root before selecting it on recovery.
  4. Crash Authority: Following a crash, power loss, or kernel panic, all volatile memory is considered void. Store v1 classifies both superblocks and validates their referenced graphs and history. Only a completely valid selected root can supply the authoritative recovery material for a new ResidentWorld; degraded selection is read-only inspection.
┌────────────────────────────────────────────────────────────────────────┐
│                        AIEN ResidentWorld                              │
│         (Sole Authoritative Operational World While Running)           │
└───────────────────▲────────────────────────────────▲───────────────────┘
                    │                                │
                    │ realizes / projects            │ semantic references
                    ▼                                ▼
┌──────────────────────────────────────┐  ┌──────────────────────────────┐
│           FORGE Realization          │  │       CORTEX Epistemic       │
│  (Disposable CPU/GPU machine state)  │  │   (Durable fact memory)      │
└──────────────────────────────────────┘  └──────────────────────────────┘
                    ▲                                ▲
                    │ visits                         │ checkpoints
                    ▼                                ▼
┌────────────────────────────────────────────────────────────────────────┐
│                        AIENOS System Store v1                          │
│     (Authoritative Recovery Material & Historical Evidence Anchor)     │
├────────────────────────────────────────────────────────────────────────┤
│ ContinuityManifest ──► OmegaResidentRoot ──► Canonical Semantic Objects │
└────────────────────────────────────────────────────────────────────────┘

The ContinuityManifest-to-OmegaResidentRoot binding is a required future extension of proposed AIENOS ADR 0016, not a field in its current durable format.


2. Memory Categories

Every object, buffer, and descriptor within AIEN belongs to exactly one of five canonical memory categories. Mixing categories or persisting disallowed categories is a critical safety violation that causes immediate fail-closed termination.

PropertyDURABLERECONSTRUCTIBLEDERIVEDEPHEMERALDEVICE_LOCAL
OwnerAIENOS Store v1 / ContinuityAIEN ResidentWorldRuntime / Cache ManagerAIEN Reasoning LoopFORGE / Hardware Driver
IdentityStore ObjectId & SemanticIdCanonical SemanticIdDerived Content HashSession-local ID / IndexChip Handle / Hardware VA
LifetimePermanent (survives reboot)Lifespan of GenerationRecomputed or CachedSingle Turn / StepActive Device Session
MutabilityImmutable once committedImmutable view; versionedInvalidate and replaceMutable scratch spaceVolatile register/VRAM state
May be persisted?YES (Mandatory)NO (Rebuilt from Durable)NO (Cached/discarded)NO (Prohibited)NEVER (Strictly Prohibited)
Must be persisted?YESNONONONO
Reconstructed after reboot?Read directly from StoreReconstructed from DurableRe-evaluated on demandDiscarded on rebootRe-initialized on silicon
May contain machine addresses?NEVERNONONOYES (Device-only)
Failure behaviorFail closed to Recovery CoreRe-derive from StoreInvalidate and recomputeDrop current turnReset device context
Recovery behaviorValidated via SHA-256Deterministically rebuiltLazy recomputationFresh initializationFresh allocation & binding

3. Semantic Identity vs Runtime Realization

  1. The Invariance Principle: Permanent semantic identity must never depend on transient process, operating system, or hardware values. A semantic object must have the exact same identity regardless of what CPU, GPU, memory address, or operating system instance executes it.
  2. Transient Realization State: The following entities are explicitly classified as DEVICE_LOCAL or EPHEMERAL realization state and must never appear in persistent storage:
    • Host CPU pointers and virtual addresses (*mut T, uintptr_t, void*)
    • Accelerator / GPU virtual addresses (gpu_va)
    • Driver and resource manager handles (RM_HANDLE, NVRM allocations, channel handles)
    • Hardware queue IDs, ring buffer head/tail pointers, and doorbells
    • Channel generations and synchronization semaphore values
    • Operating system memory map addresses (mmap, page frame numbers)
    • File descriptors (fd), socket descriptors, and IPC pipe handles
    • Temporary allocation IDs and scratchpad addresses
    • Operating system process IDs (PID), thread IDs (TID), or core pinning masks
  3. Reconstruction Law: Cold recovery reconstructs fresh hardware realizations rather than deserializing stale hardware or process identities. If any persistent record is found to contain a physical memory address or driver handle, the verifier MUST reject the record as corrupted.

4. Persistent Object Model

  1. Canonical Semantic Bytes: Omega semantic objects are serialized strictly using the canonical Omega wire encoding (OMG0 wire format):
    • Fixed header: Magic OMG0 (0x4F, 0x4D, 0x47, 0x30), version = 0x01, kind: u8.
    • Lexicographically sorted attributes by key string.
    • Lexicographically sorted relations by (kind, target_id).
    • Lexicographically sorted constraints by (kind, payload).
    • Bounded payload bytes.
  2. Content Identity (SemanticId): SemanticId identifies semantic meaning:
    SemanticId = SHA256(canonical_omega_encoded_bytes)
    
  3. Storage Container Identity (Store ObjectId): AIENOS Store v1 packages canonical semantic objects into storage application objects. Store ObjectId identifies a persistent storage container under AIENOS Store-domain hashing per AIENOS ADR 0015:
    Store ObjectId = SHA256(
      ASCII("AIENOS-STORE-OBJECT-V1\0")
      || kind:u16le || version:u16le || byte_length:u64le
      || semantic_bytes[byte_length]
    )
    
  4. Identity Separation: SemanticId != Store ObjectId. Even when wrapping identical canonical bytes, the Store envelope domain separation guarantees that the digests diverge. An explicit translation mapping connects them.
  5. Store Application Object Kinds: Store v1 core format (ADR 0015) is frozen. New persistent semantic types are allocated within the application kind range:
    • KIND_OMEGA_OBJECT = 24: Holds the canonical Omega object wire bytes.
    • KIND_OMEGA_RESIDENT_ROOT = 25: Holds the resident graph root manifest and index.
  6. Immutability & Deduplication: Once written to the Store append arena, objects are strictly immutable. If an object with an identical ObjectId already exists in the Store catalog, the write path deduplicates it by referencing the existing extent, provided its content digest is independently verified.
  7. Corruption Detection: Every object read from persistent media must undergo two-level cryptographic verification:
    1. The Store envelope must match Store ObjectId = SHA256(domain || header || bytes).
    2. The canonical payload must match SemanticId = SHA256(bytes). Any mismatch constitutes immediate corruption.

5. Canonical Resident Root (OmegaResidentRoot)

The recoverable entry point for an Omega semantic world is the OmegaResidentRoot (Store v1 application kind 25).

1. Fields and Bindings:

An OmegaResidentRoot minimally and normatively binds:

  1. Magic & Version: Magic OMGROOT1, format_version = 1, omega_schema_version: u16.
  2. Generation Context: Monotonic logical generation counter (generation: u64), logical epoch timestamp (epoch: u64).
  3. Agent Binding: logical_agent_id: [u8; 32], binding this graph to the provisioned agent.
  4. Lineage Reference: parent_resident_root_id: Option<ObjectId>, pointing to the prior durable resident root (or zero for genesis).
  5. Semantic Graph Roots: A bounded array of root SemanticIds representing the active entry points into the semantic DAG.
  6. Manifest Mapping Table: A sorted array of tuples (SemanticId: [u8; 32], store_object_id: ObjectId). Sorted in strictly increasing lexicographic order by SemanticId to allow $O(\log N)$ binary search during resolution.
  7. Cortex Checkpoint Reference: cortex_checkpoint_id: Option<ObjectId>, binding the epistemic fact checkpoint.
  8. Capability Policy Root: policy_root_digest: [u8; 32], binding the durable security policy.
  9. Evidence Root: evidence_root_digest: [u8; 32], binding the signed evidence and receipt tree.
  10. Model State Reference: model_state_root_id: Option<ObjectId>, binding the persistent learned weights and optimizer state.

2. Strict Exclusion:

OmegaResidentRoot must never contain accelerator context handles, GPU virtual addresses, runtime queue pointers, or transient allocation identifiers.


6. Generation & Commit Model

Durability is an explicit Store v1 transaction barrier. The Store v1 commit protocol is fixed by accepted AIENOS ADR 0015; this ADR does not define a different storage transaction or ContinuityManifest byte layout.

The Ordered Commit Protocol:

  1. Freeze and preflight in memory: Freeze the candidate ResidentWorld changeset; derive canonical SemanticId and Store ObjectId values; validate deduplication targets. Check all sizes, counts, arithmetic, catalog limits, transaction geometry, and bounded-region capacity before the first persistent write. A failed preflight writes nothing.
  2. Write new application objects: Append every new Store application object contiguously, beginning at the predecessor's committed high-water. This includes canonical Omega objects and OmegaResidentRoot. A ContinuityManifest that binds the root is written here only after the proposed ADR 0016 durable format has been extended and accepted; this ADR does not assign it new binary fields.
  3. Write the complete new Catalog: Append one immutable full Catalog after the application objects, sorted by Store ObjectId. It describes the complete committed application-object set.
  4. Write the CommitRecord: Append the one-unit CommitRecord immediately after the Catalog, binding the catalog, predecessor identities, generation, and exclusive committed high-water.
  5. First hardware flush: Flush the new application objects, complete Catalog, and CommitRecord to durable media.
  6. Write the inactive superblock slot: Write the updated Store v1 superblock to the slot that is inactive for the predecessor generation. Do not rewrite the currently authoritative older superblock as part of this transaction.
  7. Second hardware flush — commit point: Flush the newly written inactive superblock. Successful completion of this second flush is the Store v1 durability commit point.
new application objects → complete new Catalog → CommitRecord → hardware flush
    → write INACTIVE superblock slot → hardware flush → COMMIT / DURABILITY POINT

Crash Semantics Around the Commit Point:


7. Storage Crash Consistency & Fault Tolerance

  1. Store unit and device geometry: A Store v1 unit is 4096 bytes; supported physical logical-block sizes are 512 and 4096 bytes. A 4096-byte superblock write is not assumed physically atomic on either device. The Store uses two superblock slots, CRC32C, CommitRecord and Catalog SHA-256, application ObjectId checks, full graph validation, and generation/history validation to select a root after a crash.
  2. Ordered publication: New application objects, the complete Catalog, and the CommitRecord are appended and flushed before the inactive superblock is written. The older authoritative slot is never rewritten by that transaction. The second flush is the commit point.
  3. Failure classification: A torn slot, malformed root, corrupt object, inconsistent history, and I/O error have distinct Store v1 outcomes. Fallback to a valid peer is read-only DegradedRecovery where ADR 0015 requires it; a checksum-valid but graph-invalid root never becomes authoritative. The mount path neither repairs nor formats media implicitly.
  4. Replay boundary: Store generations and predecessor links establish crash-consistent history. Store v1 alone does not detect a malicious full-device replay; the M5 off-disk AntiRollbackSource provides that freshness authority.
  5. Capacity failure: Insufficient space for the whole transaction is a preflight failure with zero persistent writes. Volatile dirty state remains uncommitted.

8. Deterministic Cold Recovery Algorithm

When AIENOS boots on physical silicon or within a virtual machine, cold recovery executes strictly as follows:

1. Open the bounded Store v1 region without writing or repairing it
   ↓
2. Read both superblock slots; any referenced-object or slot read error is MountError::Io
   ↓
3. Validate each candidate root in the frozen Store v1 trust order:
   Bounded Region → Superblock CRC32C → CommitRecord SHA-256 → Catalog SHA-256
   → sorted/bounded/non-overlapping descriptors → application ObjectIds
   → generation/history relationship
   ↓
4. Apply Store v1 root classification; only a completely valid root may be selected
   ↓
5. Count AgentRoot objects (0 = Stop/Unprovisioned, >1 = Stop/Conflict, 1 = Continue)
   ↓
6. Trace the supported ContinuityManifest chain to its unique tip (verify sequence, links, and ObjectIds)
   ↓
7. Resolve the OmegaResidentRoot ObjectId through the accepted future ADR 0016
   Continuity-format extension; without that extension, resident recovery is blocked
   ↓
8. Read & verify OmegaResidentRoot (Check magic, format_version, agent binding)
   ↓
9. Verify Object Closure:
   For each SemanticId reachable from root_semantic_ids:
     a. Lookup SemanticId in mapping_table to obtain Store ObjectId
     b. Read Store v1 object from media
     c. Verify Store envelope: SHA256 == ObjectId
     d. Decode OmegaObject from canonical bytes
     e. Verify recomputed SemanticId == expected SemanticId
     f. Enumerate relation SemanticIds; verify presence in mapping_table
   ↓
10. Reconstruct in-memory ResidentWorld graph (allocate fresh volatile nodes)
   ↓
11. Restore Cortex references: Bind EpistemicRef handles to Cortex database
   ↓
12. Rebuild transient CPU state: Allocators, task rings, scheduler queues
   ↓
13. Rebuild transient GPU realizations: FORGE compiles fresh pushbuffers/QMDs; allocates new GPU VAs
   ↓
14. Re-establish capabilities: Evaluate durable policy against physical hardware ID; mint runtime tokens
   ↓
15. On a normal writable mount, commit a new incarnation manifest before observation;
    a DegradedRecovery mount permits read-only inspection only
   ↓
16. Resume AIEN sovereign execution loop

Store v1 preserves these distinct classifications: Unformatted, ForeignOrUnknown, UnsupportedVersion, Corrupt/RecoveryRequired, DegradedRecovery, ConflictingRoots, and InconsistentHistory. Both all-zero slots mean Unformatted; foreign nonzero slots without Store magic mean ForeignOrUnknown; a CRC-valid unsupported version or feature means UnsupportedVersion without fallback. Two fully valid equivalent roots at the same generation are redundant; non-equivalent roots at that generation are ConflictingRoots. Fully valid adjacent roots require matching Store UUID and region geometry and an exact predecessor generation, CommitRecord ID, and Catalog ID relationship; otherwise they are InconsistentHistory. Nonadjacent valid generations are also InconsistentHistory.

If one root is fully valid and its peer is invalid, apply ADR 0015's exact cases: a newer graph-invalid peer or a structurally invalid peer yields read-only DegradedRecovery; a fully valid newer root may be selected over a graph-invalid older peer; an all-zero peer with one valid root is a valid Store. A graph-invalid peer at the same generation does not silently become a writable fallback. CRC-valid unsupported format does not fall back. MountError::Io remains an I/O error, not corruption. No checksum-only generation ranking is permitted.

Anomaly Resolution Rules:


9. Rollback Architecture

  1. Automatic crash fallback and degraded inspection: Before the second Store v1 flush succeeds, recovery may select the prior completely valid committed root under ADR 0015. A damaged peer may instead yield read-only DegradedRecovery. Neither event is an operator-requested historical rollback, and degraded inspection cannot make new in-band commits.
  2. Operator-authorized historical rollback: Selecting an earlier committed semantic state after a later generation was committed is an exceptional Recovery Core action. ADR 0006 requires local, offline operator authentication. Store v1 structural validity and M5 freshness/authentication checks still apply; a malicious disk replay is not authorized by a high or low generation number alone.
  3. Forward-only history rule: An authorized historical selection does not rewrite or truncate generations $K..N$. After validating the selected historical state and authorization, the system must produce a new forward Store generation after $N$ whose resident semantic root represents the selected state, preserving the intervening history for audit. The normal running world resumes only after this forward generation and its required security/freshness commitments are durable.
  4. Continuity-format prerequisite: Proposed ADR 0016 has no rollback_parent_id field and its durable format is not frozen. Before implementation, ADR 0016 / the Continuity format MUST be extended and accepted to bind the selected historical root, its source generation, authorization evidence, and new forward continuity view. This ADR sets the semantic requirement without assigning on-disk offsets, field names, or binary encoding.

10. Cortex Epistemic Memory Boundary

  1. Separation of Concerns:
    • Resident Semantic Store (ResidentWorld): Active, operational semantic state, reasoning graphs, goals, and transient attention context.
    • Cortex: Durable epistemic memory containing settled facts, world knowledge, dense vector embeddings, full-text indexes, and empirical evidence.
  2. Prohibition of Database Replacement: Cortex durable memory must not become the live runtime scheduler database, and Omega must not embed Cortex's SQLite/vector database internals.
  3. Cross-Boundary References: Active semantic objects reference Cortex knowledge exclusively through immutable, typed reference handles:
    struct EpistemicRef {
        fact_id: [u8; 32],        // Unique immutable fact identifier in Cortex
        evidence_hash: [u8; 32],  // Cryptographic digest of supporting evidence
        schema_epoch: u32,        // Epistemic schema generation
    }
    
  4. Promotion Lifecycle: Knowledge moves strictly forward through a verified lifecycle:
    Ephemeral Reasoning (RAM)
        ↓ evaluated and supported by empirical evidence
    Candidate Knowledge (J-Space)
        ↓ verified by AEGIS contract checker
    Cortex Admission (Signed Admission Receipt)
        ↓ committed to Cortex WAL / Checkpoint
    Durable Epistemic Fact (Referenced by ResidentWorld via EpistemicRef)
    
  5. Cold Recovery Parity: On cold restart, resolving an EpistemicRef from the reconstructed ResidentWorld retrieves the identical committed Cortex fact and evidence receipt.

11. Model & Learned State

  1. Structured Semantic Representation: Learned weights, model architectures, optimizer states, training steps, and RNG states must be represented as structured, content-addressed semantic objects, not opaque third-party binary blobs (e.g. PyTorch pickles or unverified binary dumps).
  2. Deconstruction into Semantic Objects:
    • Weights: Chunked into immutable, content-addressed memory blocks (KIND_MEMORY = 0x06 or KIND_VALUE = 0x01), indexed by tensor descriptor metadata.
    • Model Architecture: Formal Omega operation DAG (KIND_OPERATION = 0x03, KIND_TYPE = 0x02).
    • Execution Context: Checkpoint metadata binding current training step (u64), learning rate schedule, and cryptographic RNG seed ([u8; 32]).
  3. Portability: Model state represented in this manner can be reconstructed onto any supported accelerator (Blackwell, Grace CPU, or generic AArch64) without format conversion.

12. GPU & FORGE Machine Reconstruction (The Reboot Theorem)

The Reboot Theorem: Semantic identity survives reboot; physical hardware realizations do not.

  1. Disposable Projections: All GPU memory allocations, command buffers, page tables, and hardware queues are disposable projections of the underlying ResidentWorld.
  2. Reconstruction Pipeline: After cold recovery restores the logical ResidentWorld, the accelerator state is reconstructed through a four-stage lowering chain:
    Persistent Semantic Object (Durable)
        ↓
    Omega Realization Request (Hardware-neutral intent)
        ↓
    FORGE Target Realization (Physical machine lowering: compiles kernels, plans VRAM layout)
        ↓
    AEGIS Verification (Validates alignment, bounds, and security invariants)
        ↓
    New Accelerator-Resident State (Fresh GPU VAs, new RM channels, new doorbell bindings)
    
  3. Zero Address Leakage: The newly assigned GPU virtual addresses, NVRM channel handles, and doorbell addresses are completely independent of the addresses used prior to the reboot. The logical SemanticId remains bit-for-bit identical.

13. Capability & Security State Reconstruction

  1. Persistent ownership:
    • AgentRoot (Continuity kind 16) carries persistent logical agent continuity identity. It does not contain secret key material or reusable authorization state.
    • KeySlotManifest (M5 kind 21) carries wrapped K_vol for boot and recovery keyslots. Persistent storage may hold this wrapped key material according to the M5 security contract, never plaintext live K_vol in AgentRoot.
    • SecurityManifest (M5 kind 22) authenticates the logical commit roots under the M5 key hierarchy.
    • AntiRollbackSource is the off-disk or hardware freshness authority. Store v1 generations alone do not provide malicious replay protection.
  2. Boot validation order: First validate the Store v1 structure and history; then apply M5 keyslot unwrap and authenticated security-root checks; then compare the off-disk freshness anchor. A failed security or freshness check halts in Recovery Core before resident execution.
  3. Fresh runtime authority: FORGE observes current physical hardware; AEGIS evaluates durable policy against that verified hardware. Runtime capabilities and slot generations are freshly derived and minted after boot. Persistent records must never contain reusable live capability handles, authorization booleans such as is_authorized = true, or hardware addresses.

14. Evidence & Provenance Lifecycle

Every state transition must generate machine-readable, verifiable evidence. Evidence records must distinguish five distinct lifecycle states:

PROPOSED ──► WRITTEN ──► DURABLE ──► RECOVERED (or REJECTED)
  1. PROPOSED: Candidate generation constructed in RAM; contains list of modified SemanticIds.
  2. WRITTEN: Objects written to Store append arena; contains Store extent descriptors and calculated ObjectIds.
  3. DURABLE: Generation committed via Superblock flush; contains CommitRecord hash, Superblock index (A or B), and monotonic generation number.
  4. RECOVERED: Cold recovery successfully completed; contains reconstructed graph digest, execution timestamp, and new incarnation number.
  5. REJECTED: Validation failure receipt; contains exact failing offset, mismatched cryptographic hash, missing object ID, and reason for fail-closed termination.

15. Comprehensive Failure Matrix

Failure EventDetection MechanismSafe StateFallback ActionOperator Evidence
Crash before inactive-slot writeFull Store v1 root validation finds the older rootPrior committed generation intactIgnore uncommitted append tail beyond its high-waterRECOVERY_PRIOR_GENERATION_RESUMED
Crash during inactive-slot write or second flushDual-slot CRC32C, object graph, and history validationOnly a fully valid root may be selectedApply ADR 0015 normal or read-only degraded classification; never trust a torn slotRECOVERY_SUPERBLOCK_TORN_FALLBACK
Power loss after successful second flushNew root passes full graph and history validationNew committed generation is selectableResume only after Continuity and M5 checks also passRECOVERY_NEW_GENERATION_RESUMED
Truncated objectStore envelope length != read lengthFail closed to Recovery CoreHalt; require operator inspectionRECOVERY_OBJECT_TRUNCATED_REFUSED
Corrupted object bytesSHA256(bytes) != ObjectIdFail closed to Recovery CoreHalt; refuse dirty stateRECOVERY_OBJECT_CHECKSUM_MISMATCH
Missing root objectOmegaResidentRoot not in catalogFail closed to Recovery CoreHalt; never guess rootRECOVERY_ROOT_OBJECT_MISSING
Missing child objectTraversal encounters missing IDFail closed to Recovery CoreHalt; reject partial graphRECOVERY_GRAPH_CLOSURE_INCOMPLETE
SemanticId mismatchCanonical decode digest != SemanticIdFail closed to Recovery CoreHalt; refuse invalid semanticsRECOVERY_SEMANTIC_ID_DIVERGENCE
Conflicting or inconsistent Store rootsSame-generation non-equivalence or invalid predecessor/history relationshipConflictingRoots or InconsistentHistoryHalt normal resume; require Recovery Core inspectionRECOVERY_ROOT_HISTORY_REFUSED
Degraded Store rootOne fully valid root and a peer matching ADR 0015 degraded casesRead-only DegradedRecoveryPermit inspection; prohibit in-band commits and normal resident executionRECOVERY_DEGRADED_READ_ONLY
Unsupported Store formatCRC-valid unsupported version or featuresUnsupportedVersionHalt; do not fall back to another rootRECOVERY_UNSUPPORTED_FORMAT
Invalid capability statePolicy validation fails during bootRecovery Core minimal privilegeRefuse execution grantsSECURITY_CAPABILITY_REISSUANCE_FAILED
GPU reconstruction failureFORGE kernel compilation errorDegraded CPU-only resident stateAlert operator; no GPU opsFORGE_REALIZATION_GPU_FAILED
Cortex unavailable/corruptCortex database integrity check failEpistemic read-only recoveryHalt learning; allow inspectionCORTEX_CHECKPOINT_INTEGRITY_FAILED
Storage fullPre-write arena capacity checkPrior committed generation intactAbort commit; keep live stateSTORAGE_APPEND_ARENA_EXHAUSTED
Hardware I/O errorNVMe driver returns error codeReport MountError::IoNever treat I/O error as corruptSTORAGE_HARDWARE_IO_FAULT

16. Subsystem Boundaries (Owner / Boundary / Failure / Evidence)

1. AIEN ResidentWorld

2. Omega Semantic Calculus

3. AIENOS System Store v1

4. AIENOS Continuity Subsystem

5. FORGE Machine Realizer

6. AEGIS Invariant Verifier

7. Cortex Durable Memory


17. Implementation Ownership Across Repositories

Future implementation work is strictly partitioned across existing repositories without introducing new repositories:

Stage / ComponentRepositoryPrimary Deliverables
Architecture Contractaien-architectureADR 0015 (this document) and master plan alignment.
Semantic Persistence APIomegaPure C API for canonical object validation, reachability traversal, and determinism tests.
Store Bridge & KindsaienosImplementation of Store v1 kinds 24 & 25, write/read paths, and deduplication.
Continuity IntegrationaienosExtension of ContinuityManifest to bind OmegaResidentRoot, cold boot restore in kernel.
Independent Verifieraegis-runtimeImplementation of verify_resident_generation and refusal receipts.
Physical Realizationphysics (FORGE)Verification of disposable GPU projections and hardware address non-persistence.
Epistemic Integrationcortex-rsEpistemicRef handle definitions and fact promotion lifecycle.
Runtime Residencyaien-sovereign-coreResidentWorld continuous execution lifecycle and checkpoint barriers.
Store CompactionaienosTwo-region live-set migration implementation for long-lived continuous execution.
Destructive Qualificationaien-harness / spark-inquisitor20-step fault injection qualification suite (AIEN_RESIDENT_CONTINUITY).

18. No-Premature-Implementation Rule

Normative Restriction: No downstream Resident Semantic Store implementation begins in any repository until ADR 0015 is formally ratified and merged into aien-architecture.

Downstream builders (Builders 2 through 10) must implement strictly against the boundaries, types, and invariants frozen by this document. No builder may invent ad-hoc storage formats, alter frozen Store v1 bytes, or introduce external database dependencies.


19. Acceptance Gates for ADR 0015

This accepted architecture boundary answers 15 core questions; proposed Continuity-format additions remain prerequisites for implementation:

  1. What lives only in RAM? Dynamic goals, active reasoning state, scratchpad buffers, compiled kernel caches, and physical hardware addresses.
  2. What can survive reboot? Immutable DURABLE Store v1 objects (AgentRoot, ContinuityManifest, OmegaResidentRoot, canonical semantic objects, Cortex checkpoints, and M5 security objects). The Continuity binding to OmegaResidentRoot awaits an accepted ADR 0016 format extension.
  3. What is immutable? All committed Store v1 objects, historical generations, and canonical semantic bytes.
  4. What is mutable? Active ResidentWorld working memory in volatile RAM (prior to commit freeze).
  5. What identifies a semantic object? SemanticId = SHA-256 of canonical Omega wire encoding (OMG0).
  6. What identifies a durable generation? A fully validated Store v1 CommitRecord ObjectId and generation, with matching Catalog and superblock fields; the ContinuityManifest identifies the agent continuity view within that generation.
  7. What is the single durability commit point? Successful completion of the second hardware flush after writing the inactive superblock slot.
  8. What happens on power loss at every stage? Sections 6, 8, and 15 define full validation, read-only degraded cases, and fail-closed errors; a torn 4096-byte write is never presumed atomic.
  9. How is a root selected? Both slots pass through bounded-region, CRC32C, CommitRecord, Catalog, descriptor, application-object, and generation/history validation. ADR 0015 classifications determine normal, degraded, or refused recovery.
  10. What is reconstructed rather than restored? Graph adjacency indexes, lookup tables, runtime task queues, memory allocators, GPU VAs, and device channels.
  11. What authority must be re-derived after reboot? All runtime capabilities, hardware access rights, and execution tokens are re-issued by AEGIS from durable policy.
  12. How does Cortex relate to resident state? Distinct epistemic store referenced via immutable, typed EpistemicRef handles.
  13. How does GPU state get reconstructed? Freshly compiled and allocated by FORGE as disposable projections with new hardware addresses.
  14. What evidence proves successful recovery? Bit-for-bit SemanticId recalculation across all reachable objects and valid CONTINUITY: RESUMED log receipt.
  15. Can any stale pointer/handle cross reboot? NO. Strictly prohibited without exception.

Consequences

Positive Consequences

Negative Consequences / Tradeoffs

Downstream Builders Blocked on Ratification