interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / spec / path-semantic-object.md

649 lines · 40645 bytes Raw Blame History Rendered
1# SPECIFICATION: Native Path Semantic Object and Relational Intelligence
2
3```text
4Document ID: SPEC-OMEGA-PATH-M16
5Classification: Sovereign Semantic Specification
6Target Substrate: Native Omega Bare Metal, Content-Addressed Directed Graph, Resident Reactions
7Status: SPECIFICATION FOR PATH-0 / PATH-1
8Domain Tags: "omega.path.v1" (semantic), "omega.path.realization.v1" (realization)
9```
10
11> **Note 2026-10-01: the PATH-1 M1 experiment FAILED.** Result: nDCG +2.5% against a 5% target, and 27 ms latency against 0.38 ms for the baseline. The record is kept on the aien-sovereign-core branch `experiment/pearl-cortex-m1-fixture` (head `c934968557e70aeae375be061d1eb8c098d3bb39`). This specification is not evidence that M1 passed. Torn-write checks wait for the C disk layer.
12
13---
14
15## 1. Executive Principle and Scope
16
17A computational result alone is incomplete evidence. The relational path that produced the result is an inseparable component of the proof.
18
19This specification defines the native Omega Path Semantic Object. It establishes relational path intelligence directly within bare-metal Omega architecture without external dependencies. No Rust service, Python daemon, external graph database (such as Neo4j), relational database, Redis cache, or network RPC layer is permitted.
20
21All temporary C runtime implementations are strictly classified as `BOOTSTRAP`, `REFERENCE`, or `TEST HARNESS` scaffolding, carrying a concrete migration route to native Omega bare metal.
22
23---
24
25## 2. Re-Audit and Architectural Ground Truth
26
27### 2.1 Commit Baseline Inspected
28The following specific repository commits and state lines were inspected to establish ground truth:
29
301. `omega` active worktree (`HEAD`): `6d1ff1dbcb15972dcc5195239ddd4085e6ff6de7` (Merge PR #105 from `feat/est-0-1`).
312. `omega` R16 orchestrator retirement specification: `4350eb9` (`feat/r16-orchestrator-retirement`).
323. `omega` R16 authority review and negative tests: `44d8c06` (`feat/r16-g3-g5-host`, checking G4 authority guards).
334. `omega` R15 performance qualification: `3e9e53b` (merged via PR #67 at `bba3bd3`).
345. `omega` M4 Canonical Encoding: `spec/canonical-encoding.md` (`SPEC-OMEGA-CANON-M4`).
356. `omega` Semantic Object Model: `spec/semantic-object.md` (`SPEC-OMEGA-OBJECT-M4`).
367. `omega` Program Identity v2: `spec/program-identity.md` (`SPEC-OMEGA-PROGRAM-ID-V2`).
378. `omega` Program Realization v0: `spec/program-realization.md`.
389. `omega` Action Graph IR: `spec/action-graph-ir.md`, `src/runtime/rx_graph.{c,h}`.
3910. `omega` Plan Reuse: `spec/plan-reuse.md`, `src/runtime/rx_plan.{c,h}`.
4011. `omega` J-Space Shared State: `spec/branch-state-reuse.md`, `src/runtime/rx_jspace.{c,h}`.
4112. `omega` Cortex Durable Typed Memory: `src/runtime/rx_cortex.{c,h}`.
4213. `omega` ARGUS Live Producer ABI: `src/runtime/rx_argus.{c,h}`.
4314. `omega` Surface Language v0: `spec/omega-language-v0.md`.
4415. `aien-sovereign-core` PR #102: inspected as an experimental PEARL Cortex reference only.
45
46### 2.2 Reused Architecture and Non-Duplication
47The Path Semantic Object reuses existing runtime machinery:
48
49- **Canonical Identity Derivation**: Reuses `SPEC-OMEGA-CANON-M4` and `SPEC-OMEGA-PROGRAM-ID-V2` big-endian, length-prefixed, domain-tagged hashing principles.
50- **Cognitive Branch Isolation**: Reuses `rx_jspace` state-unit chaining, branch-freezing rules, and divergence points.
51- **Memory Classes**: Reuses Cortex (`rx_cortex.h`) memory classes (`CX_ENTITY`, `CX_CLAIM`, `CX_OBSERVATION`, `CX_EXECUTION`, `CX_EVIDENCE`).
52- **Dependency Execution**: Reuses Action Graph IR (`rx_graph.h`) port-indexed data edges and order constraints.
53- **Reaction Dispatch**: Reuses `rx_world.h` readiness indexing, run-token movement, and worker pool execution.
54- **Hardware Observation**: Reuses ARGUS (`rx_argus.h`) ring-buffer event production for authority decisions, hardware cycles, and memory transitions.
55
56---
57
58## 3. Semantic Path vs. Path Realization
59
60Omega enforces an architectural separation between what an operation sequence means and how it physically executed.
61
62```text
63+-------------------------------------------------------------------------------+
64| SEMANTIC PATH |
65| - Meaningful sequence of typed operations and relations |
66| - Abstract, platform-agnostic, mathematical definition |
67| - Invariant under hardware, placement, compiler choice, or execution time |
68| - Bound to canonical content identity: SEMANTIC_PATH_ID |
69+-------------------------------------------------------------------------------+
70 |
71 | realized by (1-to-many)
72 v
73+-------------------------------------------------------------------------------+
74| PATH REALIZATION |
75| - Physical manifestation on concrete hardware (e.g. Grace Blackwell GB10) |
76| - Specific scheduling (SEQUENTIAL vs. PRELOAD), arena placement, memory |
77| - Measured ARGUS telemetry: latency (ns), energy (nJ), memory delta (bytes) |
78| - Bound to physical triple identity: REALIZATION_ID |
79+-------------------------------------------------------------------------------+
80```
81
82### 3.1 The Semantic Path
83A Semantic Path is a content-addressed, immutable sequence of typed semantic steps. It specifies the logical trajectory from a starting semantic state or entity to an ending state or claim. It contains zero references to host memory addresses, process IDs, hardware core indices, compiler optimizations, clock cycles, or energy measurements. Two paths that perform the identical sequence of logical operations on identical semantic entities have identical semantic identities across all machines and processes.
84
85### 3.2 The Path Realization
86A Path Realization describes the physical execution of a Semantic Path on a concrete hardware substrate. It binds the Semantic Path to a target machine graph, a specific scheduler policy, an execution engine profile, physical memory arenas, and observed execution telemetry. Many distinct Path Realizations can correspond to a single Semantic Path.
87
88---
89
90## 4. Typed Semantic Step Vocabulary
91
92A relational path is not a loose collection of untyped graph edges. Each transition along a path is a typed semantic step belonging to an explicit vocabulary family.
93
94```text
95Step Envelope:
96+-------------+-------------+-------------+-------------+-----------------------+
97| step_index | step_family | step_role | input_count | input_semantic_ids |
98| (u16) | (u16) | (u16) | (u16) | [SemanticId; N] |
99+-------------+-------------+-------------+-------------+-----------------------+
100| operator_id | out_count | output_ids | param_len | param_payload_bytes |
101| (SemanticId)| (u16) | [SemId; M] | (u32) | (big-endian bytes) |
102+-------------+-------------+-------------+-------------+-----------------------+
103```
104
105### 4.1 Step Families and Roles
106
1071. **Family 0x0001: Entity Relation Path (`STEP_FAM_RELATION`)**
108 - Captures relational knowledge graphs and verified claims.
109 - Sequence: `ENTITY -> CLAIM -> ENTITY -> EVIDENCE -> ENTITY`.
110 - Roles:
111 - `0x0101 ROLE_REL_ENTITY`: An ontological entity in the semantic universe.
112 - `0x0102 ROLE_REL_CLAIM`: A declared assertion connecting entities.
113 - `0x0103 ROLE_REL_EVIDENCE`: A cryptographic receipt or proof reference supporting the claim.
114 - `0x0104 ROLE_REL_INFERENCE`: A candidate relational link derived via deduction.
115
1162. **Family 0x0002: Execution Path (`STEP_FAM_EXECUTION`)**
117 - Captures deterministic task computation through the action graph.
118 - Sequence: `GOAL -> OPERATION -> OPERATION -> VERIFICATION -> RESULT`.
119 - Roles:
120 - `0x0201 ROLE_EXEC_GOAL`: The target objective object.
121 - `0x0202 ROLE_EXEC_OPERATION`: A discrete computational operation.
122 - `0x0203 ROLE_EXEC_VERIFICATION`: An invariant or contract check over intermediate state.
123 - `0x0204 ROLE_EXEC_RESULT`: The validated terminal value or state.
124
1253. **Family 0x0003: J-Space Trajectory Path (`STEP_FAM_JSPACE`)**
126 - Captures hypothesis space exploration across cognitive branches.
127 - Sequence: `WORLD -> FORK -> PROPOSAL -> ACTION -> OBSERVATION -> VERIFIER -> CANDIDATE`.
128 - Roles:
129 - `0x0301 ROLE_JS_WORLD`: Baseline world root snapshot.
130 - `0x0302 ROLE_JS_FORK`: Creation of an isolated branch workspace.
131 - `0x0303 ROLE_JS_PROPOSAL`: Proposed hypothetical modification.
132 - `0x0304 ROLE_JS_ACTION`: Concrete state manipulation step.
133 - `0x0305 ROLE_JS_OBSERVATION`: Sensor or state readout event.
134 - `0x0306 ROLE_JS_VERIFIER`: Gate verification check on the branch.
135 - `0x0307 ROLE_JS_CANDIDATE`: Validated candidate trajectory unit.
136
1374. **Family 0x0004: Capability Realization Path (`STEP_FAM_CAPABILITY`)**
138 - Captures the path from semantic intent to authorized physical effect.
139 - Sequence: `INTENT -> OPERATION -> CAP_REQUIREMENT -> IMPLEMENTATION -> MACHINE -> AUTH_VERIFY -> EFFECT`.
140 - Roles:
141 - `0x0401 ROLE_CAP_INTENT`: High-level declared purpose.
142 - `0x0402 ROLE_CAP_OPERATION`: Concrete semantic operation requesting resource access.
143 - `0x0403 ROLE_CAP_REQUIREMENT`: Explicit declared capability token demand.
144 - `0x0404 ROLE_CAP_IMPLEMENTATION`: Code or kernel selected to execute operation.
145 - `0x0405 ROLE_CAP_MACHINE`: Target hardware node and execution engine.
146 - `0x0406 ROLE_CAP_AUTH_VERIFY`: Native verification of capability tokens against authority root.
147 - `0x0407 ROLE_CAP_EFFECT`: Authorized effect dispatch.
148
1495. **Family 0x0005: Scientific Discovery Path (`STEP_FAM_DISCOVERY`)**
150 - Captures the empirical discovery cycle.
151 - Sequence: `OBSERVATION -> HYPOTHESIS -> EXPERIMENT -> MEASUREMENT -> UPDATE -> EXPLANATION`.
152 - Roles:
153 - `0x0501 ROLE_DISC_OBSERVATION`: Empirical observation from ARGUS or Cortex.
154 - `0x0502 ROLE_DISC_HYPOTHESIS`: Formal proposition explaining observation.
155 - `0x0503 ROLE_DISC_EXPERIMENT`: Controlled test action graph.
156 - `0x0504 ROLE_DISC_MEASUREMENT`: Observed experimental outcome.
157 - `0x0505 ROLE_DISC_UPDATE`: Epistemic state refinement.
158 - `0x0506 ROLE_DISC_EXPLANATION`: Structural abstraction explaining the phenomenon.
159
160---
161
162## 5. Canonical Identity Derivation
163
164Identity derivation adheres strictly to the canonical identity laws of `spec/canonical-encoding.md` and `spec/program-identity.md`.
165
166### 5.1 Semantic Path Identity Law
167The semantic identity of a path is a SHA-256 cryptographic hash computed exclusively over its domain tag and canonical semantic byte sequence.
168
169$$\text{SEMANTIC\_PATH\_ID} = \text{SHA256}(\text{"omega.path.v1"} \parallel 0x00 \parallel \text{CANONICAL\_SERIALIZATION}(\text{path}))$$
170
171```text
172Preimage Layout:
1731. Domain Tag: "omega.path.v1" (13 bytes)
1742. Tag Terminator: 0x00 (1 byte)
1753. Canonical Serialization: the complete section 6.1 encoding, byte for byte and
176 in section 6.1 field order: magic, version, kind,
177 step_count, start_anchor_id, end_anchor_id,
178 context_id, attributes, constraints,
179 steps_payload_len, ordered_steps
180```
181
182The preimage after the terminator is exactly the wire encoding of section 6.1, as the formula above states and as `spec/canonical-encoding.md` section 1 requires (identity is the hash of the canonical serialization). An earlier draft of this listing named only the anchors, step count, steps, attributes and constraints, in a different order; that listing contradicted the formula and section 6 and is superseded by this one (PATH-1 outside review, 2026-09-30).
183
184### 5.2 Identity Invariants
1851. **Intensional Sequence**: Semantic Path identity is order-dependent. A path executing step A then step B produces a different identity than a path executing step B then step A.
1862. **Platform Invariance**: A path evaluated on AArch64 Grace Blackwell GB10 and the identical path evaluated on an x86_64 host or QEMU target produce the identical `SEMANTIC_PATH_ID`.
1873. **Builder Order Invariance**: Attributes and constraints are sorted canonically before serialization. Internal builder sequence does not alter the identity.
1884. **Pointer Independence**: Host virtual memory addresses, arena offsets, thread IDs, and process handles never enter the preimage.
189
190### 5.3 Path Realization Identity Law
191A Path Realization possesses its own separate identity, binding the semantic path to physical hardware, implementation choices, and execution receipts.
192
193$$\text{REALIZATION\_ID} = \text{SHA256}(\text{"omega.path.realization.v1"} \parallel 0x00 \parallel \text{REALIZATION\_PREIMAGE})$$
194
195```text
196Realization Preimage Layout:
1971. Domain Tag: "omega.path.realization.v1" (25 bytes)
1982. Tag Terminator: 0x00 (1 byte)
1993. Semantic Path ID: semantic_path_id (32 bytes)
2004. Machine ID: machine_id (32 bytes content-addressed machine graph)
2015. Engine Profile ID: engine_profile_id (32 bytes)
2026. Realizer Code Digest: code_digest (32 bytes)
2037. Schedule Kind: schedule_kind (2 bytes u16 big-endian)
2048. Telemetry Summary Digest: argus_observation_digest (32 bytes)
205```
206
207---
208
209## 6. Concrete Canonical Binary Encoding
210
211All multi-byte numeric quantities are encoded in network byte order (big-endian). There is zero internal struct padding.
212
213### 6.1 Encoding Grammar
214
215```text
216Offset Length Field Type / Description
217---------------------------------------------------------------------------------
218+0x00 4 magic 0x4F, 0x4D, 0x47, 0x30 ("OMG0")
219+0x04 1 version 0x01
220+0x05 1 kind 0x0C (KIND_PATH)
221+0x06 2 step_count u16 big-endian, count of steps (0..512)
222+0x08 32 start_anchor_id SemanticId (32 bytes SHA-256)
223+0x28 32 end_anchor_id SemanticId (32 bytes SHA-256)
224+0x48 32 context_id SemanticId (32 bytes SHA-256)
225+0x68 2 attr_count u16 big-endian, count of attributes (0..32)
226+0x6A ... attributes Sorted lexicographically by UTF-8 key
227 [ key_len: u8, key_bytes, val_len: u16, val_bytes ]
228... 2 constraint_count u16 big-endian, count of constraints (0..16)
229... ... constraints Sorted by (constraint_kind: u16, payload)
230... 4 steps_payload_len u32 big-endian, total length of steps data
231... ... ordered_steps Array of step records in sequential order
232```
233
234### 6.2 Step Record Binary Format
235Each step in `ordered_steps` is encoded as follows:
236
237```text
238Offset Length Field Type / Description
239---------------------------------------------------------------------------------
240+0x00 2 step_index u16 big-endian (must match array index)
241+0x02 2 step_family u16 big-endian (0x0001..0x0005)
242+0x04 2 step_role u16 big-endian (specific role tag)
243+0x06 2 input_count u16 big-endian, input reference count (0..8)
244+0x08 32*N input_ids N consecutive 32-byte SemanticIds
245+... 32 operator_id SemanticId of operation, relation, or opcode
246+... 2 output_count u16 big-endian, output reference count (0..8)
247+... 32*M output_ids M consecutive 32-byte SemanticIds
248+... 4 param_len u32 big-endian, parameter payload length (0..1024)
249+... P param_bytes Kind-specific parameter bytes (big-endian)
250```
251
252### 6.3 Architectural Limits
253To guarantee bounded memory usage on bare-metal targets, the encoder and decoder enforce strict static limits:
254
255| Limit Name | Maximum Value | Failure Mode on Exceeding |
256|---|---|---|
257| `PATH_MAX_STEPS` | 512 steps | Fail-closed: `RX_PATH_ERR_STEP_LIMIT` (-80) |
258| `PATH_MAX_INPUTS_PER_STEP` | 8 inputs | Fail-closed: `RX_PATH_ERR_INPUT_LIMIT` (-81) |
259| `PATH_MAX_OUTPUTS_PER_STEP` | 8 outputs | Fail-closed: `RX_PATH_ERR_OUTPUT_LIMIT` (-82) |
260| `PATH_MAX_PARAM_LEN` | 1024 bytes | Fail-closed: `RX_PATH_ERR_PARAM_LIMIT` (-83) |
261| `PATH_MAX_ATTR_COUNT` | 32 attributes | Fail-closed: `RX_PATH_ERR_ATTR_LIMIT` (-84) |
262| `PATH_MAX_CONSTRAINT_COUNT` | 16 constraints | Fail-closed: `RX_PATH_ERR_CONST_LIMIT` (-85) |
263| `PATH_MAX_TOTAL_SERIALIZATION` | 65536 bytes (64 KiB) | Fail-closed: `RX_PATH_ERR_BUFFER_OVERFLOW` (-86) |
264
265`RX_PATH_ERR_BUFFER_OVERFLOW` (-86) is also returned when a caller's output buffer is shorter than the encoding; nothing is written in that case.
266
267### 6.4 Bootstrap Storage Bounds and Additional Refusal Codes
268
269The PATH-1 reference oracle (`src/path/rx_path.h`) reuses `OmegaAttribute` and `OmegaConstraint` from `src/omega_types.h`, the same storage the M4 codec uses. Their fixed buffers bound what the oracle can hold, below what the section 6.1 field widths could express:
270
271| Bound | Value | Source |
272|---|---|---|
273| Attribute key | 1 to 63 bytes | `OMEGA_MAX_KEY_LEN` (64) minus the terminator |
274| Attribute value | 0 to 512 bytes | `OMEGA_MAX_VAL_LEN` |
275| Constraint payload | 0 to 128 bytes | `OmegaConstraint.payload` (as enforced by `omega_codec.c`) |
276| Step arena | 2048 steps per arena | bootstrap storage only; never part of identity |
277| Fork depth | 64 ancestors | bootstrap storage only; never part of identity |
278
279Constraints follow `spec/canonical-encoding.md` section 2 rule 3: sorted by (kind, payload) with equal constraints kept, as in the M4 canonicalizer. Attribute keys follow rule 1: unsigned byte order, duplicates refused.
280
281The oracle adds five refusal codes that section 6.3 does not name:
282
283| Code | Value | Meaning |
284|---|---|---|
285| `RX_PATH_ERR_MALFORMED` | -87 | Non-canonical or structurally invalid input (bad magic, version, kind, role, order, length, trailing bytes, duplicate key) |
286| `RX_PATH_ERR_ID_MISMATCH` | -88 | Recomputed identity differs from the expected id, or an ancestor no longer hashes to the recorded `parent_path_id` |
287| `RX_PATH_ERR_FROZEN` | -89 | Mutation of a fork parent (section 7.1 rule 3) |
288| `RX_PATH_ERR_ARG` | -90 | Null pointer or out-of-range argument, including forking into an ancestor's storage |
289| `RX_PATH_ERR_CAPACITY` | -91 | Bootstrap arena or fork depth exhausted |
290
291---
292
293## 7. Shared-Prefix Branch Tails (Memory Scaling)
294
295Exploration algorithms in J-Space routinely evaluate hundreds or thousands of candidate trajectories that share long common prefixes (for example, steps 0 through 120 are identical across 1000 candidate paths). Duplicating the common prefix across every candidate creates unacceptable memory pressure and cache pollution.
296
297```text
298Path Prefix Tree (Copy-On-Write Merkle DAG):
299
300 [Step 0] -> [Step 1] -> ... -> [Step K-1] (Shared Prefix Path: prefix_id)
301 |
302 +-------------------------+-------------------------+
303 | |
304 v v
305 [Branch Alpha] [Branch Beta]
306 [Step K_a] -> [Step K+1_a] [Step K_b] -> [Step K+1_b]
307 (Tail: private steps K..N-1) (Tail: private steps K..M-1)
308```
309
310### 7.1 Representation Rules
3111. **Prefix Sharing by Content Reference**: When a path forks at divergence step $K$, the child path does not copy steps $0 \dots K-1$. It stores:
312 - `parent_path_id`: The 32-byte `SEMANTIC_PATH_ID` of the common ancestor.
313 - `divergence_step_index`: The 16-bit integer $K$.
314 - `tail_steps`: An array containing only the branch-local steps $K \dots N-1$.
3152. **Deterministic Full Identity**: The `SEMANTIC_PATH_ID` of the branched path is computed over the fully reconstructed logical sequence ($0 \dots N-1$). The sharing of prefixes in physical storage does not alter the mathematical semantic identity.
3163. **Ancestor Immutability**: Aligned with `rx_jspace` branch freezing rules (`spec/branch-state-reuse.md`), once a path serves as a parent prefix for branch forks, its step sequence is frozen and immutable. Further modifications require constructing a new branch tail.
317
318---
319
320## 8. Authority Separation and Fail-Closed Boundary
321
322### 8.1 Priority of R16 Orchestrator Retirement
323R16 orchestrator retirement (`spec/r16-orchestrator-retirement.md`) addresses the G4 authority issue: legacy or non-authoritative callers asserting identity without cryptographic binding to the executing capability root.
324
325Under no circumstances does PATH work weaken, bypass, or postpone R16 authority enforcement.
326
327### 8.2 The Non-Authoritative Principle
328**A PATH IS EVIDENCE, NEVER AUTHORITY.**
329
330```text
331+-------------------------------------------------------------------------------+
332| PATH SPACE |
333| - Relational trajectories |
334| - Candidate operation chains |
335| - Empirical performance predictions |
336| - High Pareto scores |
337+-------------------------------------------------------------------------------+
338 |
339 | Proposes Action
340 v
341=================================================================================
342 FAIL-CLOSED AUTHORITATIVE BOUNDARY (AIENOS Root)
343 Checks: 1. Is caller bound to authentic capability token?
344 2. Is token valid for active generation (64-bit generation check)?
345 3. Does token explicitly permit effect on target physical resource?
346=================================================================================
347 | |
348 | If Valid | If Invalid / Unchecked
349 v v
350+-----------------------------+ +----------------------------+
351| EFFECT DISPATCH GRANTED | | REFUSED: RX_ERR_CAP_DENIED |
352| (Authoritative Receipt) | | (State Untouched, Crumb) |
353+-----------------------------+ +----------------------------+
354```
355
3561. **Zero Authority Granting**: A path that documents the sequence `ACTOR -> CAPABILITY -> OPERATION` grants zero rights. The recording of a capability reference in a path step is descriptive evidence that an access was modeled or previously observed; it provides no authority to execute.
3572. **Candidates Authorize Nothing**: A path step sequence `CANDIDATE -> PROMOTION` authorizes no generation promotion or state modification.
3583. **Fail-Closed Gate**: Any proposal derived from path analysis submitted to the production reaction runtime (`rx_world.h`) must pass through the native Aienux capability verification root (`aienos_cap_validate`). If valid credentials are not presented, the request fails closed immediately with error code `RX_ERR_CAP_DENIED`.
3594. **Sequencing Guard**: No path components are linked into the production authoritative reaction loop until R16 qualification (`R16_ORCHESTRATOR_RETIRED = PASS`) is merged.
360
361---
362
363## 9. Evidence, Observations, and Telemetry Integration
364
365### 9.1 ARGUS as the Sole Observation Plane
366Omega does not invent secondary telemetry protocols for relational paths. The observation plane is ARGUS (`src/runtime/rx_argus.h`).
367
368All physical metrics observed during path execution are produced as ARGUS events:
369- Wall-clock and execution latency (nanoseconds).
370- Hardware energy consumed (nanojoules).
371- Memory allocations, relocations, and cache footprints.
372- Inter-core and inter-socket synchronization overhead.
373- Execution errors, register faults, and retry counts.
374- Temperature and thermal throttle indicators.
375- Hardware capability validation and denial events.
376
377### 9.2 Observation Non-Contamination Rule
378Observations belong strictly to the Path Realization and Evidence layers.
379
380Observations NEVER participate in the computation of `SEMANTIC_PATH_ID`. Telemetry values vary between runs, hardware models, and temperature conditions; folding telemetry into semantic identity would destroy content-addressed equivalence and prevent deterministic replay.
381
382### 9.3 Cortex Typed Storage
383Completed paths, realizations, and receipts are recorded into Cortex durable memory (`rx_cortex.h`):
384- `CX_EXECUTION`: Records the execution receipt of the path.
385- `CX_EVIDENCE`: Stores the cryptographic verification proofs.
386- `CX_OBSERVATION`: Stores ARGUS telemetry summaries linked by `SEMANTIC_PATH_ID`.
387- `CX_RELATIONSHIP`: Stores verified relational abstractions.
388
389Protected Cortex memory classes (`CX_PROT_AUTHORITY`, `CX_PROT_COMMIT_RECEIPT`, `CX_PROT_VERIFY_EVIDENCE`, `CX_PROT_GENERATION_ID`) ensure that path records can never be summarized or evicted under memory pressure.
390
391---
392
393## 10. Invariant Catalog
394
395Every implementation of the Path Semantic Object must maintain eight fundamental architectural invariants:
396
397- **I1: PATH != AUTHORITY**: Recording a path grants no authority. Authority stems exclusively from the Aienux capability root.
398- **I2: PATH != FACT**: A path recording a sequence of claims or hypotheses represents evidence of reasoning, not established fact. Inferred relationships remain candidates until promoted.
399- **I3: PATH != HIDDEN CHAIN OF THOUGHT**: Paths record externally verifiable, typed operations, observations, decisions, and evidence references. Unrecorded scratchpad deliberations or invisible internal states are prohibited.
400- **I4: SEMANTIC PATH != PATH REALIZATION**: Logical sequence identity is completely decoupled from execution medium, placement, scheduling, or runtime duration.
401- **I5: PREDICTION != VERIFICATION**: A predicted path outcome or high model score is not verification. Verification requires empirical evaluation and proof receipts.
402- **I6: HIGH SCORE != PERMISSION**: A candidate path achieving a high score on quality, latency, or energy acquires zero permission to bypass authority checks.
403- **I7: OBSERVATION != INFERENCE**: Raw telemetry recorded by ARGUS represents an empirical observation. An inferred causal relationship is a separate candidate claim requiring independent validation.
404- **I8: CANDIDATE != PROMOTED KNOWLEDGE**: Candidate paths explored in J-Space or Cortex memory remain candidates until passing explicit, frozen, statistical promotion gates.
405
406---
407
408## 11. Multi-Vector Scoring and TURING Epistemic Gain
409
410Path evaluation rejects scalar score collapse. A single scalar score obscures trade-offs between accuracy, verification confidence, resource cost, and authority risk.
411
412### 11.1 The Multi-Vector Score
413A path score is an explicit vector of thirteen measurable quantities:
414
415$$\mathbf{S}(\text{path}) = \begin{bmatrix}
416q_{\text{task}} \\
417e_{\text{strength}} \\
418c_{\text{verify}} \\
419s_{\text{simplicity}} \\
420u_{\text{budget}} \\
421t_{\text{latency}} \\
422e_{\text{energy}} \\
423m_{\text{memory}} \\
424x_{\text{movement}} \\
425y_{\text{sync}} \\
426r_{\text{risk}} \\
427a_{\text{auth}} \\
428g_{\text{turing}}
429\end{bmatrix} = \begin{array}{l}
430\text{Task Quality (ppm)} \\
431\text{Evidence Strength (ppm)} \\
432\text{Verification Confidence (ppm)} \\
433\text{Structural Simplicity / MDL (bytes)} \\
434\text{Uncertainty Bound (ppm)} \\
435\text{Execution Latency (ns)} \\
436\text{Energy Consumption (nJ)} \\
437\text{Peak Memory Frame Footprint (bytes)} \\
438\text{Data Movement Cost (bytes transferred)} \\
439\text{Synchronization Wait Cycles (cycles)} \\
440\text{Authority Risk Factor (ppm)} \\
441\text{Authority Validity Status (boolean / enum)} \\
442\text{Turing Epistemic Information Gain (bits)}
443\end{array}$$
444
445### 11.2 Scoring Principles
4461. **Deterministic Interpretable Rules First**: Initial path ranking employs explicit, interpretable Pareto frontiers over the score vector. No black-box learned neural ranking model may evaluate paths on the authoritative path.
4472. **Context-Specific Pareto Selection**: An operation operating under extreme power constraints selects paths on the energy-latency Pareto frontier; an operation requiring provable safety selects on the verification-authority frontier.
4483. **Score Separation from Identity**: The score vector is an evaluation metadata record attached to a realization in Cortex; it never alters `SEMANTIC_PATH_ID`.
449
450### 11.3 TURING Epistemic Integration
451TURING evaluates whether a discovered path represents genuine epistemic gain using the Minimum Description Length (MDL) principle:
452
453$$\text{Gain}_{\text{TURING}} = L(\mathcal{D}) - [L(\mathcal{D} \mid \text{path}) + L(\text{path})]$$
454
455Where:
456- $L(\mathcal{D})$ is the description length of the observed empirical evidence under the current model.
457- $L(\mathcal{D} \mid \text{path})$ is the residual description length using the path abstraction.
458- $L(\text{path})$ is the canonical binary description length of the path itself.
459
460A path is eligible for consideration as general knowledge only when $\text{Gain}_{\text{TURING}} > 0$ across frozen, held-out validation sets.
461
462### 11.4 Recursive Self-Improvement (RSI) Discipline
463RSI never mutates production runtime structures based on a single successful execution. The promotion pipeline requires:
464
465$$\text{Candidate Path} \longrightarrow \text{Isolated Branch Run} \longrightarrow \text{ARGUS Measurement} \longrightarrow \text{Formal Verification} \longrightarrow \text{Held-Out Evaluation} \longrightarrow \text{Statistical Gate Approval}$$
466
467Failed paths are preserved in Cortex memory to prevent recursive re-exploration of known defective trajectories.
468
469---
470
471## 12. Resident-Reaction Fit (No Central Orchestrator)
472
473Omega operates through resident reactions, not a central control loop. The Path Semantic Object is engineered specifically to execute within this reaction paradigm (`src/runtime/rx_world.h`).
474
475```text
476Reaction Flow:
477+-------------------+ +---------------------+ +-----------------------+
478| Path Cell (Step K)| --> | Reaction Evaluator | --> | Path Cell (Step K+1) |
479| Published Token | | Matches Readiness | | Emits New State Token |
480+-------------------+ +---------------------+ +-----------------------+
481 ^ ^ |
482 | | v
483+-------------------+ +---------------------+ +-----------------------+
484| Dependency Index | | Checks Capabilities | | Triggers Next Step |
485| (World Cell State)| | & Resource Budget | | Reaction Worker |
486+-------------------+ +---------------------+ +-----------------------+
487```
488
489### 12.1 Execution Mechanics
4901. **No Central Thread**: No central path sequencer loop advances paths. Paths advance through cell state changes.
4912. **State Cells**: A path under active traversal is represented as an Omega World Cell holding the current step token, head pointer, and branch context.
4923. **Reaction Triggers**: Reactions declare input dependencies on specific path step completions. When step $K$ finishes and publishes its outcome, the reaction engine updates its readiness index.
4934. **Worker Pool Execution**: Any available resident worker thread executes the newly eligible reaction for step $K+1$.
4945. **Decoupled Concurrency**: Independent branches of a path graph execute concurrently across available worker threads without central coordination.
495
496---
497
498## 13. Surface Language Construct Investigation
499
500An investigation was conducted into exposing paths as first-class syntax constructs within the Omega Surface Language (`spec/omega-language-v0.md`).
501
502### 13.1 Evaluated Syntax Proposal
503The following syntax was evaluated for potential inclusion:
504
505```text
506// Speculative syntax sketch:
507path verify_trajectory(start: State, goal: Target) -> Result {
508 step fork_branch = fork(start);
509 step propose_op = action(fork_branch, OP_APPLY);
510 step verify_post = verify(propose_op, contract);
511 yield verify_post;
512}
513```
514
515### 13.2 Linguistic and Architectural Evaluation
5161. **Grammar Mismatch**: Surface Language V0 is strictly a line-oriented expression language designed for the Visor interactive console (`let`, `fn`, binary operations mod $2^W$). Introducing multi-line block structures and stateful step keywords directly violates Language V0 simplicity.
5172. **Existing Lowering Substrate**: The Action Graph IR (`rx_graph.h`) already models typed nodes, dependency ordering, and verification gates. Introducing duplicate language keywords adds syntax noise without expanding semantic capability.
5183. **Investigation Verdict**:
519 - **Do not adopt specialized path syntax in Language V0.**
520 - Instead, paths are constructed in the Visor console by referencing existing Action Graph builder functions.
521 - Any eventual dedicated language syntax must be deferred to Language V1 and formalized in a dedicated ADR after PATH-4 qualification.
522
523---
524
525## 14. Promotion Ladder and Lifecycle Status
526
527Paths and their associated knowledge progress through a strict qualification ladder:
528
529```text
530TARGET ===> EXPERIMENTAL ===> MEASURED ===> QUALIFIED ===> PRODUCTION
531```
532
533### 14.1 Status Definitions
534
535| Status Level | Criteria and Verification Requirement |
536|---|---|
537| `TARGET` | Design phase. Defined in specification (`spec/path-semantic-object.md`). Zero runtime code. |
538| `EXPERIMENTAL` | Initial implementation. Isolated unit tests in sandbox. No production exposure. |
539| `MEASURED` | Quantitative profiling. Evaluated across benchmark workloads with ARGUS telemetry receipts. |
540| `QUALIFIED` | Differential testing passed. Proved to match oracle baselines; verified against statistical gates. |
541| `PRODUCTION` | Active in production runtime. Approved by Drake and ratified in architecture doctrine. |
542
543### 14.2 Per-Object Lifecycle States
544Individual path objects in memory carry an operational status:
545- `PATH_STATUS_PENDING`: Constructed, awaiting dependency readiness.
546- `PATH_STATUS_ACTIVE`: Currently executing across resident reaction workers.
547- `PATH_STATUS_COMPLETED`: Traversal reached terminal anchor; verification passed.
548- `PATH_STATUS_REFUSED`: Refused at the capability boundary due to missing authority.
549- `PATH_STATUS_FAILED`: Invariant violated or intermediate operation failed.
550
551---
552
553## 15. Milestone Gates: PATH-1 through PATH-7
554
555Path capability bring-up follows seven rigorous, pre-registered milestone gates:
556
557### PATH-1: Native Identity and Construction
558- **Objective**: Implement canonical identity derivation and in-memory construction.
559- **Verification Suite**: `tests/path/test_path_identity.c`.
560- **Pass Criteria**:
561 - Determinism: 1,000 randomized paths produce identical `SEMANTIC_PATH_ID` across repeated runs.
562 - Order Sensitivity: Swapping any two non-identical steps changes `SEMANTIC_PATH_ID`.
563 - Cross-Realization Invariance: Changing machine profile or schedule leaves `SEMANTIC_PATH_ID` unchanged while altering `REALIZATION_ID`.
564 - Canonical Serialization: Binary round-trip `decode(encode(path)) == path`.
565 - Tamper Refusal: Bit-flip in serialized stream causes hash mismatch and refusal.
566 - Bounded Memory: Attempting to add 513 steps fails closed with `RX_PATH_ERR_STEP_LIMIT`.
567
568### PATH-2: Execution Observation (No Ranking Control)
569- **Objective**: Wire ARGUS telemetry producer into path step execution.
570- **Pass Criteria**:
571 - ARGUS ring buffer captures latency, memory delta, and authority verification events for every step.
572 - Zero observation bytes participate in `SEMANTIC_PATH_ID`.
573 - Observation receipts written to `evidence/PATH/` with content-addressed hashes.
574
575### PATH-3: J-Space Trajectory Experiment
576- **Objective**: Compare endpoint-only search versus trajectory-aware search in J-Space.
577- **Pass Criteria**:
578 - Sealed benchmark comparing exploration efficiency across 500 tasks.
579 - Shared-prefix branch tails demonstrate $\ge 60\%$ memory reduction over full copy.
580 - Zero state leakage between sibling branches.
581
582### PATH-4: Cortex Path-Context Experiment
583- **Objective**: Evaluate bounded path-context retrieval in Cortex durable memory.
584- **Pass Criteria**:
585 - Query retrieval over historical paths by subject and semantic category.
586 - Strict preservation of protected memory classes (`CX_PROT_ALL`).
587 - Retrieval latency scales with path length, not total Cortex store size.
588
589### PATH-5: Capability-Path Experiment
590- **Objective**: Implement pre-flight trajectory capability validation.
591- **Pass Criteria**:
592 - Invalid paths (requesting missing capabilities or unavailable hardware) are rejected before execution.
593 - Hostile test: Injected path claiming fabricated authority fails closed at the Aienux boundary.
594
595### PATH-6: TURING Epistemic Integration
596- **Objective**: Integrate Minimum Description Length scoring for path abstractions.
597- **Pass Criteria**:
598 - Automated calculation of Turing gain across held-out benchmark datasets.
599 - Path compression accepted only when description length reduces monotonically.
600
601### PATH-7: Adaptive Exploration
602- **Objective**: Enable empirical-evidence-driven search depth and width adjustment.
603- **Pass Criteria**:
604 - Exploration bounds dynamically adjust based on measured uncertainty vectors.
605 - Qualification on Grace Blackwell GB10 hardware.
606
607---
608
609## 16. Architectural Decision Record (ADR) Candidates
610
611Before production integration, the following formal ADRs must be drafted and submitted to `docs/adr/`:
612
6131. **ADR-0021: Native Relational Path Semantic Object Model**
614 - Formalizes `KIND_PATH` (0x0C) in the core semantic ontology.
615 - Ratifies the separation between Semantic Path Identity and Path Realization Identity.
6162. **ADR-0022: Shared-Prefix Branch Tail Representation for J-Space**
617 - Standardizes the Merkle DAG prefix-sharing specification across memory arenas.
618 - Establishes immutable parent freezing rules for divergent cognitive trajectories.
6193. **ADR-0023: Fail-Closed Authority Boundary for Relational Path Proposals**
620 - Mandates that all path-derived execution plans pass through the native Aienux capability verification root.
621 - Enforces the absolute invariant: Path is evidence, never authority.
6224. **ADR-0024: Pareto Multi-Vector Path Scoring and TURING Integration**
623 - Replaces scalar optimization with explicit 13-dimensional score vectors.
624 - Ratifies the Minimum Description Length criterion for path knowledge promotion.
625
626---
627
628## 17. Bootstrap / Reference Classification and Native Replacement Route
629
630To ensure long-term architectural sovereignty, all software artifacts created during the PATH initiative are classified under an explicit substrate lifecycle.
631
632```text
633Migration Route:
634[C Scaffolding (Bootstrap)] ===> [Verified Reference Oracle] ===> [Native Bare-Metal Omega]
635```
636
637### 17.1 Substrate Classification Table
638
639| Component | Initial Implementation | Classification | Target Substrate | Migration Strategy |
640|---|---|---|---|---|
641| `rx_path.h` / `rx_path.c` | Host C99 | `BOOTSTRAP` | Bare-Metal Omega | Lower struct definitions to native Omega memory frame declarations. |
642| Canonical Path Encoder | Host C99 / SHA-256 | `REFERENCE` | Native ASM | Verify byte-for-byte equivalence against host reference oracle. |
643| Prefix Branch Allocator | Host C99 Arena | `BOOTSTRAP` | Resident Reaction Memory | Transition from POSIX memory arenas to native Omega frame buffers. |
644| Test Harnesses | C / Shell (`make test-path`) | `TEST HARNESS` | Self-Hosting Verifier | Run within Visor qualification suite without host Linux dependencies. |
645
646### 17.2 Native Omega Replacement Route
6471. **Zero External Library Dependence**: C bootstrap implementations must use only standard integer types and strict memory bounds. No POSIX threads, dynamic libc heap (`malloc`/`free`), or Linux system calls are permitted on the core path; memory is provided via caller-allocated buffers.
6482. **Lowering to Bare-Metal Reactions**: Once PATH-1 and PATH-2 pass qualification, path serialization and step validation will be lowered to native AArch64 instruction sequences generated by `aarch64_encoder.c`.
6493. **Elimination of Host Tooling**: The final stage removes Linux host harness wrappers, compiling path reactions directly into the standalone Omega kernel image running on Grace Blackwell GB10 bare metal.