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 / state-projection.md

230 lines · 10474 bytes Raw Blame History Rendered
1# Cognitive state projection
2
3Gate `OMEGA_STATE_PROJECTION_PASS`.
4
5## Rule
6
7Cognition does not get "everything the system knows". A cognitive operation states
8what it needs (`CognitiveNeed`). Omega turns that need into the smallest state
9that is enough for the operation (`StateProjection`), using typed queries to
10Cortex. Cortex never hands over its history.
11
12```
13CognitiveNeed { goal, operation_class, required_fact_types[],
14 required_temporal_scope, required_world_scope,
15 uncertainty_requirement, evidence_requirement,
16 memory_scope, resource_budget }
17 ↓ pj_compile (typed Cortex queries)
18StateProjection { canonical_world_refs[], cortex_refs[], derived_features[],
19 temporal_windows[], hypotheses[], uncertainty[],
20 evidence_refs[], excluded_state[], recoverability_manifest }
21```
22
23Nothing here is text or tokens. A projection holds object references,
24typed summaries and derived numbers. "Compile" means selecting and shaping
25state from a declared need. It generates no code. It is not an Omega
26compiler (see the M6 note in the project memory).
27
28## What runs
29
30Code:
31
32- `src/runtime/rx_cortex.{c,h}`: Cortex, the typed append-only store.
33- `src/runtime/rx_projection.{c,h}`: the need, the projection, the
34 compiler, compression, recall, recovery and the audit.
35
36Test: `tests/runtime/rx_state_projection.c` with
37`tests/runtime/rx_sp_workloads.{c,h}`. Run it with `make test-state-projection`.
38The build compiles `rx_cortex.o` and `rx_projection.o` on their own. It fails
39if either one references the world, a faculty or Omega realization code.
40
41### Cortex
42
43Every object is a fixed header plus a payload of 64-bit words:
44
45- class
46- kind
47- subject
48- time
49- generation
50- branch
51- protection bits
52- tag
53- up to four links
54
55It carries a SHA-256 digest of its canonical encoding. The store keeps a
56running hash chain over every digest. Two axes are kept apart:
57
58- **Content class.** What the object is. These are the nine memory classes of
59 doctrine AIEN.md §8.2: entity, claim, observation, execution, failure,
60 evidence, plan, realization, relationship.
61- **Treatment.** How one operation may use the object. It is decided per
62 operation, never stored.
63
64The indexes are kept per subject and in time order. A query costs the objects
65in its range, not the size of the store.
66
67Scope: one in-memory tier. The doctrine's L1/L2/L3 tiers (accelerator memory,
68host memory, NVMe) are not implemented.
69
70### Treatments
71
72| Treatment | Meaning | Form |
73|---|---|---|
74| PINNED | always present; never dropped for budget | full |
75| LIVE | the current value (with LATEST it is canonical world state) | full |
76| DERIVED | replaced by one computed feature (count, sum, sum of squares, min, max); the sources can be recovered | feature |
77| RECALLABLE | reference; the body can be recalled on demand, digest-checked | ref |
78| COMPRESSIBLE | lossy summary of a sample series; the source can be recovered | summary |
79| REFERENCE_ONLY | identity, header and digest only | ref |
80| EPHEMERAL | valid for this operation only; outside the recoverability contract | full |
81| BRANCH_LOCAL | only from the need's hypothetical branch; the main line never sees it | full |
82| PROTECTED_EVIDENCE | evidence and protected state; never summarized | full, or ref with exact digest |
83
84### Protected state
85
86Five kinds of state are protected:
87
88- authority
89- commit receipts
90- verification evidence
91- generation identity
92- effect receipts
93
94These carry protection bits in Cortex. A need that asks to summarize, derive
95or make ephemeral any protected object does not compile. The whole projection
96is refused (`PJ_ERR_PROTECTED`). Nothing is silently weakened. Protected state
97appears in full, or as a reference that keeps its exact digest.
98
99A budget smaller than the pinned and protected state is also refused
100(`PJ_ERR_BUDGET`). The compiler never trims silently.
101
102### Excluded state and recovery
103
104Excluded objects are not copied. The projection records three things:
105
106- the Cortex object count and chain head it was compiled against
107- how many objects it left out, per in-scope subject
108- how many it left out from all other subjects
109
110`pj_audit` goes through Cortex object by object. It gives each excluded object
111exactly one reason (subject, type, time, branch, superseded, derived source).
112It checks that each one is still intact, and that the projection's counts agree.
113
114`pj_recover_all` checks every entry against Cortex:
115
116- the digest of every entry
117- that every summary is what its verified source summarizes to
118- that every derived feature recomputes to the same numbers from verified
119 sources
120
121## Gate
122
123Consumer: an explicit, rule-based reasoner in the style of R11's
124statistical AIEN (part A), and the R11 AIEN faculty itself (part B). **Neither
125is a neural model.** The consumer reads a projection and the whole store with
126the same code, and filters for relevance itself. It therefore pays for every
127object it is handed.
128
129Histories are generated with **planted answers**. The generator decides the
130cause, verdict or choice first, then writes a history in which it is true.
131Both runs are scored against the planted answer, not against each other.
132
133**Part A** has five operations, each run on 24 histories of 64 subsystems
134(about 43,000 Cortex objects and 6.8 MB each):
135
136| Operation | Need (abridged) |
137|---|---|
138| explain a regression | window since the last verified realization; own telemetry COMPRESSIBLE; resource changes PINNED; realizations of self and dependencies; prior regressions REFERENCE_ONLY (all time); hypotheses RECALLABLE; evidence as references |
139| verify a cost claim | the claim (focus, PINNED) with its receipt in full; telemetry since the claim COMPRESSIBLE |
140| plan the next experiment | latest authority grant PINNED; every past plan REFERENCE_ONLY (episodic memory) |
141| what-if on a branch | branch-local changes; recent telemetry COMPRESSIBLE; the goal LIVE |
142| assess a goal with uncertainty | window = current generation; telemetry DERIVED into one feature with second moments; goal LIVE |
143
144Measured in a development run, as medians over 24 tasks. The committed receipt
145is from candidate run `20260928T211355Z`, which has the same deterministic
146columns.
147Correctness, bytes and items touched are deterministic for the fixed seeds.
148Latencies vary from run to run. The committed evidence receipt is the
149authority.
150
151| Operation | Correct (whole / projection) | Bytes | Items the consumer touched | End-to-end |
152|---|---|---|---|---|
153| explain regression | 24/24, 24/24 | 6,816,128 → 18,696 | 86,008 → 276 | 1.90 ms → 35 µs |
154| verify cost claim | 24/24, 24/24 | 6,818,688 → 20,824 | 43,024 → 154 | 1.95 ms → 18 µs |
155| plan next experiment | 24/24, 24/24 | 6,820,928 → 1,024 | 43,038 → 8 | 1.74 ms → 7 µs |
156| branch what-if | 24/24, 24/24 | 6,818,992 → 1,872 | 43,025 → 14 | 1.79 ms → 4 µs |
157| assess goal | 24/24, 24/24 | 6,819,376 → 336 | 86,052 → 3 | 1.84 ms → 19 µs |
158
159End-to-end for the projection includes the compile. For the whole store it
160includes building the whole-store view. The gate also requires the projection
161end-to-end to beat the whole-store *reasoning alone*, so the result does not
162rest on the cost of handing the store over.
163
164**Part B** uses the real R11 faculty (`rx_aien.o`, native Aienux authority).
165Each of 8 histories covers one regime's lifetime (24 records under changing
166placements), interleaved with three other regimes. It ends in a failed
167prediction whose planted cause is a core-class change or drift. The history is
168fed to the faculty twice:
169
170- once whole: 1,217 objects, 703 AIEN activations
171- once as the projection for "why did this prediction fail": 18 objects, 36
172 activations
173
174The projection is the last verified record, its receipt as a reference, the
175demand since the record, and the placement carried in from before the window.
176Both runs produce the planted hypothesis and the same plan in 8 of 8 cases.
177
178**Part C** is scale. For "explain a regression" at 16, 64 and 256 subsystems,
179the whole store grows from 1.7 MB to 27 MB. The projection stays at about
18018 KB. Cortex objects examined stay at about 2,780.
181
182### Definitions
183
184- **Recall precision.** The fraction of provided items that passed the
185 consumer's relevance filters and entered a decision (from its access trace).
186- **Recall.** The fraction of the objects the planted answer rests on that the
187 projection carries. An object counts as carried if it is an entry, or if it
188 is a source of a derived feature.
189- **Unnecessary-state ratio.** One minus recall precision (trace-based).
190 Leave-one-out is also reported: remove each projected item alone and count
191 the ones whose removal changes the answer.
192 - Leave-one-out undercounts necessity for redundant statistical evidence. For
193 example, no single telemetry interval out of 120 changes a mean-based
194 verdict. So it reads high for explain (895 per 1,000) and verify (981 per
195 1,000), while the trace-based ratio is 27 and 0.
196 - Both are in the receipt.
197
198### Controls that must fail
199
200- **Leave-one-out.** Every task has at least one item whose removal changes the
201 answer.
202- **The newest objects in Cortex, at the same byte size as the projection.**
203 0 of 120 tasks correct.
204- **Everything about the subject, all time, in full.** It fails every
205 dependency-caused regression (18 of 24 correct) and every goal assessment
206 (0 of 24: the generation identity is machine state).
207- **Under-specified needs.** Each one fails:
208 - no dependency scope: 18 of 24
209 - receipt as a reference instead of in full: 8 of 24
210 - working memory instead of episodic: 9 of 24
211 - main line instead of the branch: 0 of 24
212 - whole lifetime instead of the current generation: 0 of 24
213- **Protected state.** All 75 requests to summarize, derive or make ephemeral
214 protected state were refused: 5 protections × 3 treatments × 5 operations.
215- **Other refusals.**
216 - A budget below the pinned state is refused.
217 - BRANCH_LOCAL without a branch is refused.
218- **Tampering.** Changing one word of a source the projection summarizes,
219 references or derives from is caught by recovery and by recall, in 120 of
220 120 tasks.
221
222### Not claimed
223
224- Neural cognition.
225- Cortex storage tiers.
226- Energy measurement.
227- Live production histories. The part A histories are generated, and part B
228 replays generated R11 objects.
229- Code generation.
230- Latency on any accelerator. Everything runs on the host processor.