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 / 0018-substrate-neutral-physical-realization.md

243 lines · 25141 bytes Raw Blame History Source

ADR 0018: Substrate-Neutral Physical Realization

Status: Accepted by operator Drake Stapleton, 2026-09-29. Gate: AR0 satisfied when this ADR is accepted by the operator and merged to main. Supersedes: nothing. Amends: the FORGE responsibility text in doctrine/ARCHITECTURE.md §2.4, one AEGIS inquiry in §2.5, and one framing paragraph in §3 (see "Doctrine reconciliation"). Related: ARCH-0002 (hardware-neutral Machine identities), ARCH-0005 (irreversible effects require a broker), ARCH-0013 / ARCH-0014 (FORGE realizes, AEGIS verifies), ARCH-0015 (Resident Semantic Store), ARCH-0016 (resident reaction architecture, R0–R16), ARCH-0017 (ARGUS; number reserved, not yet on main). Workstream: AR0–AR7, sequenced in CURRENT_EXECUTION_PLAN.md §6 C3 and Lane 6; supporting documents in docs/plans/analog-realization/ (NOT A MASTER PLAN).

Citation note: in this repository "ADR 0018" and ARCH-0018 name the same decision. In other repositories cite it as ARCH-0018.


1. Context

AIEN's first qualified Machine is a DGX Spark: an AArch64 CPU plus a GB10 GPU sharing coherent memory. Every realization qualified so far is digital and runs on one of those two devices. The architecture already says (ARCH-0002) that Machines are hardware-neutral and that vendor/product information is capability metadata, not identity. It does not yet say what happens when the physical device that realizes a computation is not a digital CPU or GPU at all.

Future substrates are not hypothetical categories to be designed around later. Analog in-memory compute, neuromorphic devices, FPGA/CGRA fabrics and optical/photonic accelerators each realize some operations (for example a matrix-vector product) at a very different cost, and each produces results that are not bit-exact. If the semantic layer assumes bit-exact digital arithmetic, every such substrate either cannot be used, or is used by silently weakening what "correct" means. Both outcomes are unacceptable.

This ADR fixes the ownership split and the data model before any physical non-digital device exists in the project, so that the first one (workstream gate AR4) attaches as a capability provider and does not reshape the architecture.

2. Decision

The following statements are locked once this ADR is accepted.

OMEGA OWNS SEMANTIC MEANING.
FORGE OWNS PHYSICAL REALIZATION.
AEGIS VERIFIES ADMISSIBILITY AND INVARIANT PRESERVATION.
AIEN MAY PROPOSE AND SELECT OBJECTIVES; AIEN GAINS NO HARDWARE AUTHORITY.

A SUBSTRATE IS A CAPABILITY PROVIDER, NOT AN ARCHITECTURAL IDENTITY.
DIGITAL DETERMINISM IS ONE NUMERICAL REALIZATION MODEL, NOT THE DEFINITION OF COMPUTATION.
ANALOG UNCERTAINTY MUST BE EXPLICIT DATA.
CALIBRATION IS EVIDENCE.
MEASUREMENT CONDITIONS ARE EVIDENCE.
A HARDWARE RESULT IS ACCEPTED BECAUSE IT SATISFIES THE SEMANTIC RESULT CONTRACT,
NEVER BECAUSE A DEVICE RETURNED IT.

2.1 Permanent rule

SEMANTIC MEANING MUST NOT ENCODE THE PHYSICAL SUBSTRATE THAT HAPPENS TO REALIZE IT.

An Omega program, a capability need, a semantic result contract and a World object never name a device, vendor, product, driver, bus or substrate family. Substrate appears only in FORGE realization records, FORGE substrate descriptors, cost metadata, calibration records and evidence. A program that is correct on a CPU is the same program, with the same identity, when FORGE realizes it on an analog array.

2.2 Substrates covered

This ADR covers every physical realization substrate, present or future. The list below is illustrative, not closed:

Substrate familyTypical numerical modelNotes
Digital CPUexact integer; IEEE float with a declared rounding modelThe current reference/oracle substrate
Digital GPUexact integer; IEEE / reduced-precision float with declared accumulation orderQualified on GB10 (M16–M18, R12–R14); M19 is reopened (doctrine/ROADMAP.md)
Analog compute (e.g. in-memory crossbar)bounded stochastic: quantization, noise, bias, drift, saturation, temperature dependenceFirst non-digital target (AR2 simulated, AR4 physical)
Neuromorphicevent/spike-based; bounded stochastic or measured distributionSame contract model as analog
FPGA / CGRAexact or bounded deterministic, per synthesized designThe synthesized bitstream is part of realization identity
Optical / photonicbounded stochastic; calibration-heavySame contract model as analog
Future substratesdeclared by their FORGE providerAttach without an ADR change if they fit this model

Canonical APIs (Omega semantic types, capability needs, contracts, World objects, Fabric messages, AEGIS verdicts) carry no vendor or product names. Vendor-specific records may exist only inside a FORGE provider, identified to the rest of the system by an opaque content digest.

2.3 End-state flow

AIEN proposes an objective (no hardware authority)
        ↓
OMEGA defines semantic meaning + SemanticResultContract
        ↓
OMEGA / FORGE enumerate eligible realizations
   ┌──────────┬──────────┬──────────┬──────────────┬──────────┬──────────┐
   │ digital  │ digital  │ analog   │ neuromorphic │ FPGA /   │ future   │
   │ CPU      │ GPU      │          │              │ CGRA     │          │
   └──────────┴──────────┴──────────┴──────────────┴──────────┴──────────┘
        ↓   (each candidate: substrate descriptor digest, calibration digest,
        ↓    declared error model, cost metadata)
AEGIS verifies admissibility, authority and invariant preservation
        ↓
FORGE realizes on the selected substrate
        ↓
HARDWARE acts
        ↓
EVIDENCE measures (result, error vs contract, calibration, measurement conditions)
        ↓
OMEGA / AIEN learn (cost and error models; promotion only at generation barriers)

As in ARCH-0016, this diagram shows dependency structure, not a runtime turn order. Each arrow is a readiness dependency in the shared World (§6).

3. Semantic result contracts

3.1 SemanticResultContract

Every realizable numerical operation carries a SemanticResultContract, owned by OMEGA and part of the semantic identity of the operation. It states what a result must satisfy to be accepted, independent of which substrate produced it. It contains at least:

A realization is admissible only if its declared error model is within the contract. A result is accepted only if its evidence shows it satisfied the contract. The device that returned it confers nothing.

3.2 Numeric contract kinds

KindMeaningAcceptance
EXACTBit-exact against the reference.Output digest equals the reference digest.
BOUNDED_DETERMINISTICDeterministic, within a declared bound of the reference (e.g. float with declared rounding/accumulation order).Same inputs give the same output; error ≤ bound on every element.
BOUNDED_STOCHASTICOutput varies run to run; every run must fall within a declared bound with declared probability.Error ≤ bound at the declared confidence over the declared sample count; repeatability within a declared spread.
MEASURED_DISTRIBUTIONThe result is a distribution (e.g. a sampled or physical measurement).The measured distribution's declared statistics fall within the contract; the raw sample set is evidence.

EXACT is the default and is today's only implemented kind. An operation whose contract is EXACT can never be realized on a substrate whose declared model is weaker, so no existing exact computation can be silently degraded by this ADR.

3.3 Uncertainty is data

Uncertainty is never implicit. A realization declares its error model as data (bias, noise, quantization step, saturation range, drift rate, temperature coefficient, or a measured distribution), bound into the realization record. A realization with no declared error model is eligible only for EXACT contracts and must meet them exactly.

4. Calibration

5. Evidence

5.1 Measurement conditions are evidence

A physical result's evidence records at least: substrate descriptor digest, calibration digest, contract digest, measured error against the oracle, sample count, and measurement conditions (temperature, supply/clock state where applicable, calibration age, device load, latency).

5.2 Evidence v2 is additive

The evidence record gains new fields additively. Existing receipts (evidence/<AREA>/<sha256>.json) and their schemas are not rewritten. New records carry:

5.3 Cross-machine references carry no process pointers

Any reference that crosses a process, Machine or Fabric boundary is a content digest or a typed identifier, never a memory address. The FORGE v1 ir_payload pointer is an in-process detail: its value is never hashed and it must not appear in any evidence, realization identity or cross-machine message (audit fact: forge_realize.c hashes only the bytes it points to).

6. Authority and the resident reaction system

7. Fabric

A substrate reached over a link (another Machine, an external instrument) is still a capability provider. Transport is cost metadata, not semantic identity. Latency, bandwidth and link reliability enter the cost model and evidence; they never enter program identity, contract identity or result identity.

8. ARGUS (deferred)

ARGUS (ARCH-0017, reserved) detects; it does not decide. AEGIS verifies; FORGE realizes. This ADR makes no ARGUS ABI change. Future analog telemetry (substrate attach/detach, calibration change/expiry, drift, device fault, provider substitution, out-of-envelope operation, repeated result anomalies, device identity change, transport fault) is listed as documentation-only requirements in ANALOG_ARGUS_TELEMETRY_REQUIREMENTS.md, to be queued onto the ARGUS ABI v2 discussion.

9. Physics Zero is separate

Physics Zero (M27–M35, CURRENT_EXECUTION_PLAN.md §13) is scientific discovery. This ADR is about realizing computation on physical substrates. Neither depends on the other, and nothing here advances or reorders Physics Zero.

10. What this ADR does NOT decide

11. Audit basis at ADR drafting time (2026-09-29)

These facts record the frozen audit basis at the time this ADR was drafted (2026-09-29). While Omega #60, Physics #13, and Physics #16 were open or companion drafts when this audit was captured, all three have since merged to main (Omega #60 as c0edef0, Physics #13 as 5969159, and Physics #16 as 1f7c321). Omega file:line references are at aien-spark/omega 8e7a445 (audit basis). Physics references are at aien-spark/physics#13 head 5781222 unless marked main.

Omega: already substrate-neutral:

Omega: the seams this ADR must eventually touch (after R16):

FORGE v1 (aien-spark/physics#13, merged as 5969159; open at drafting audit):

12. Workstream gates AR0–AR7

These are workstream gates, not roadmap milestones. They carry no M-number. Sequencing and blockers live in CURRENT_EXECUTION_PLAN.md §6 C3; test detail in ANALOG_REALIZATION_TEST_PLAN.md.

GateDefinition
AR0This ADR accepted by the operator and merged.
AR1FORGE substrate-neutral descriptor contract: V2 descriptor and evidence encodings with KATs; v1 KAT digest wrapped and reproduced; strict decode; stale calibration refused; v1 generation refused; SIMULATED_DEVELOPMENT provenance explicit.
AR2Analog simulation provider with digital oracle parity: a software analog model realizes matvec; results checked against the exact and tolerance oracles under injected non-idealities; every receipt says SIMULATED_DEVELOPMENT.
AR3Calibration, uncertainty and evidence qualification: staleness ⇒ ineligible; declared uncertainty propagates into the contract check; evidence records are complete.
AR4First physical analog operation: matvec, digital oracle vs physical analog, same contract. PASS requires: bounded error within contract; repeatability within declared spread; calibration bound into identity and fresh; no authority bypass; complete evidence; no vendor identity in the semantic program; clean fallback to the digital realization; a faulted device cannot corrupt the World.
AR5Omega multi-substrate empirical selection (after omega#60 lands and R16 closes).
AR6Fabric-connected analog Machine (after Fabric F5).
AR7J-Space / RSI multi-substrate optimization (after H3).

13. Doctrine reconciliation

14. Final review questions (answered at proposal time)

These are the thirteen questions the workstream brief requires before any implementation PR. A YES to any of the last three is a design failure. Answers are as of 2026-09-29, from the audits in §11.

#QuestionAnswer
1Does GB10 v1 remain reproducible?Yes. The frozen v1 KAT digest 10d63d05…09fd is embedded as a literal 208-byte stream in physics#16 and re-hashed on every run. The live GB10 digest is boot-volatile and is not used as identity.
2Did any historical realization identity change?No. No v1 file, receipt, milestone name or evidence was edited; V2 wraps the v1 digest and never re-serializes v1 bytes.
3Can Omega express the same semantic operation without naming CPU/GPU/analog?Partly. At the capability-query layer yes: CqNeed / CqCandidate carry no device field. At the cognitive-routing layer not yet: RxCogDeclaration.hardware_requirements uses the RX_COG_HW_CPU_P/CPU_E/GPU bitmask (rx_route.h:61) and that bitmask is hashed into the registry digest. Closed by AR5, after R16.
4Can FORGE describe an analog substrate without making analog a special architectural layer?Yes. ForgeSubstrateDescriptor is one typed record per attached substrate; ANALOG_IN_MEMORY is one class value beside DIGITAL_CPU, DIGITAL_GPU, NEUROMORPHIC_SPIKING, FPGA_CGRA_DATAFLOW, OPTICAL_PHOTONIC. No new layer, service or authority.
5Can AEGIS verify a bounded stochastic result without pretending it is exact?Yes by contract (§3.1–3.3), not yet in code. SemanticResultContract carries BOUNDED_STOCHASTIC and MEASURED_DISTRIBUTION kinds with confidence and sample requirements; omega's rx_contract is exact-only today and gains these kinds in AR3.
6Can calibration become stale without silently remaining authoritative?Yes. Calibration epoch + validity window is checked against execution conditions; stale ⇒ not eligible, refused by the V2 validator (KAT stale_calibration_refused). Calibration is evidence, never authority.
7Can the digital implementation always remain a known-good fallback?Yes, as an eligible-set rule. Admission of a realization plan requires a digital realization for the same contract somewhere in the eligible set (it may live on another Machine). A Machine whose only substrate is analog is a valid descriptor.
8Can an unavailable analog device be excluded without changing semantic code?Yes. Availability and fault state are substrate evidence; an unavailable or faulted substrate leaves the eligible set. The semantic program and its digest are untouched.
9Can this later become a remote Fabric Machine?Yes. Transport (PCIe, USB, Ethernet, RoCE, board-to-board, remote Machine) is cost metadata in the machine descriptor and evidence, not semantic identity; cross-machine references carry digests, offsets, generation and rights, never pointers. Placement is Fabric's decision (AR6, after F5).
10Did we add any new central orchestrator?NO. No loop, scheduler, service, callback path or second World.
11Did we disturb R16?NO. No omega src/runtime/ edit; no R16-owned file touched; new physics C code passes the R16 loop-inventory heuristics as a gate in physics#16.
12Did we expand ARGUS before its current performance gate passed?NO. ARGUS ABI v1.1 untouched; future observations are documentation only.
13Did we create another master plan?NO. Sequencing lives in CURRENT_EXECUTION_PLAN.md; the workstream documents are marked NOT A MASTER PLAN.

15. Consequences