|
| 1 | +# Unified SoA — the Rubikon-model integration (v1) |
| 2 | + |
| 3 | +> **One integrated SoA.** The golden image proved the stack composes; this plan |
| 4 | +> is how the pieces become ONE struct-of-arrays that the **planner**, the |
| 5 | +> **kanban** lifecycle, the **SurrealQL membrane**, and **thinking styles** all |
| 6 | +> consume — landing in `lance-graph-planner` + `lance-graph-contract`, consuming |
| 7 | +> **Ontology** + **OGAR inheritance**, with **ractor as the dummy ownership |
| 8 | +> guarantee**. |
| 9 | +> |
| 10 | +> **Status legend:** ✅ SHIPPED (verified file:line this session) · ◐ PARTIAL · |
| 11 | +> ☐ PROPOSED (named target located; not yet wired) · 2026-06-20. |
| 12 | +> |
| 13 | +> Per CLAUDE.md "AGI IS the struct-of-arrays": new capability lands as a planner |
| 14 | +> **operation over the one SoA**, never a new layer. |
| 15 | +
|
| 16 | +--- |
| 17 | + |
| 18 | +## 0. The thesis |
| 19 | + |
| 20 | +The 16,384-board SoA — `NodeRow = key(16) | edges(16) | value(480)`, 8 MiB total |
| 21 | +(CANON, `canonical_node.rs`) — is ONE struct-of-arrays. Everything below is a |
| 22 | +**read or a write over that one SoA**: the planner queries it, the kanban |
| 23 | +lifecycle advances it, SurrealQL projects it, thinking styles dispatch over it. |
| 24 | +No copies, no per-subsystem mirror (R1 "one SoA never transformed"). |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 1. What's SHIPPED — the golden-image foundation (verified this session) |
| 29 | + |
| 30 | +- ✅ **Golden image** links the full stack in one binary, lockstep lance-7 |
| 31 | + (`crates/symbiont`, D0). |
| 32 | +- ✅ **Each node = one SoA `NodeRow`; external f64 → a typed `ValueTenant`** |
| 33 | + (`canonical_node.rs:394` `ValueTenant`; D1 = perturbation `node_field` → the |
| 34 | + `Energy` F32 tenant). 16k boards = 8 MiB zero-copy (E2). |
| 35 | +- ✅ **BF16 4×4-Morton-tile Domino** via `ndarray::simd::bf16_tile_gemm_16x16` |
| 36 | + (AMX `TDPBF16PS` dispatch; AVX-512 fallback on AMX-denied guests) — D3. |
| 37 | +- ✅ **NaN-detection projection surface = the demoted singleton BindSpace** |
| 38 | + (`lance_graph_contract::nan_projection`): a read-only fixed-offset/stride sweep, |
| 39 | + NaN/Inf by one integer exponent mask. |
| 40 | +- ✅ **Kanban loop, synchronous writer-fires-kanban** (D2, `symbiont/kanban_loop.rs`): |
| 41 | + `version-tick → VersionScheduler::on_version → try_advance_phase`, Domino sweep |
| 42 | + as the `CognitiveWork` phase. `on_version` is a SYNC pure function |
| 43 | + (`contract/scheduler.rs`); `scheduler_seam.rs` drives the whole Rubicon arc with |
| 44 | + plain `#[test]`s; `mailbox_soa.rs:700` "no surreal / ractor message bus needed". |
| 45 | +- ✅ **The live trigger** `LanceVersionScheduler::{drive_once,drive_at_latest}` |
| 46 | + over `VersionedGraph::versions()` (`lance-graph/src/graph/scheduler.rs`, 5 |
| 47 | + `#[tokio::test]`s) — async ONLY because a *subscriber* reads a version it didn't |
| 48 | + write; the *writer* fires the kanban update synchronously. |
| 49 | +- ✅ **ractor = ownership guarantee, not a message bus** (E-CE64-MB-4 / #477): |
| 50 | + `SymbiontBoard`'s single `&mut self` owner IS the mailbox-as-owner compile-time |
| 51 | + proof. No tokio, no messages — a structural/dummy wrapper. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## 2. The four superpowers of the planner over the ONE SoA |
| 56 | + |
| 57 | +The SoA is column-major (`MailboxSoaView`: `energy() -> &[f32]`, |
| 58 | +`meta_raw() -> &[u32]`, `edges_raw() -> &[u64]`, `entity_type() -> &[u16]`, |
| 59 | +`soa_view.rs:57-64`). That layout is what makes these O(1)-ish sweeps: |
| 60 | + |
| 61 | +1. ☐ **Tenant → fingerprint META QUERY (meta-awareness over the standing wave).** |
| 62 | + Project ONE tenant column across all 16k boards into a SINGLE fingerprint — |
| 63 | + the planner reduces e.g. `energy()` (or any tenant) over the whole SoA into one |
| 64 | + `Fingerprint<256>`/`Vsa16kF32`, then queries THAT (cosine / CAM) as the |
| 65 | + mailbox-set's *standing wave*. "One tenant over 16k rows → one fingerprint → |
| 66 | + one meta-query" = self-awareness as a read, never a new struct. |
| 67 | +2. ☐ **Temporal implicit Markov chain.** Chain the SoA via |
| 68 | + `lance-graph-planner` `temporal` (referenced `lib.rs` / `prediction/mod.rs`) |
| 69 | + as an IMPLICIT Markov chain — guaranteed Chapman-Kolmogorov by construction |
| 70 | + (I-SUBSTRATE-MARKOV: VSA bundle is the semigroup). No transition matrix. |
| 71 | +3. ☐ **Project ANY tenant with the same trick.** `witness` (EpisodicWitness64), |
| 72 | + `CausalEdge64` (`edges_raw()` raw u64 → `CausalEdge64(raw)`), qualia, plasticity |
| 73 | + — superposed/reduced over the SoA the same way as (1). The tenant catalogue |
| 74 | + (`VALUE_TENANTS`) is the column set; the projection is generic. |
| 75 | +4. ☐ **Key-only neo4j-grade render — ZERO value decode.** Read all 16k boards |
| 76 | + touching ONLY the 32-byte head: the 128-bit `NodeGuid` (node) + the 128-bit |
| 77 | + `EdgeBlock` (12 in-family + 4 inherited out-of-family edges). `key(16)+edges(16)`, |
| 78 | + never the 480-byte value slab — a Neo4j-like graph view at memory-scan speed |
| 79 | + (`hhtl_path_at`/`edge_block_at` accessors are declared on `MailboxSoaView` for |
| 80 | + exactly this, defaulting to `None` until the owner materialises the head). |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## 3. The Rubikon / Heckhausen + Libet lifecycle |
| 85 | + |
| 86 | +The kanban columns ARE the Heckhausen Rubicon action phases, Libet-anchored |
| 87 | +(`kanban.rs:25-49`): |
| 88 | + |
| 89 | +| Heckhausen phase | Kanban column | Libet anchor | |
| 90 | +|---|---|---| |
| 91 | +| Predecisional (weighing) | `Planning` | spawn | |
| 92 | +| **Rubicon crossing** (Σ-commit) | `Planning → CognitiveWork` | **−550 000 µs** ✅ (`kanban.rs:124`) | |
| 93 | +| Preactional + actional | `CognitiveWork` → `Evaluation` | 0 | |
| 94 | +| Postactional (evaluation) | `Evaluation → {Commit \| Plan \| Prune}` | 0 | |
| 95 | +| **Libet veto** ("free won't", last phase) | `Planning → Prune` (pre-Rubicon) | ☐ **−200 000 µs** (PROPOSED) | |
| 96 | + |
| 97 | +- ✅ The −550 ms readiness-potential anchor is already stamped on the Σ-commit |
| 98 | + crossing. |
| 99 | +- ☐ **PROPOSED contract enrichment:** the Libet veto window is **−550 ms .. −200 ms**; |
| 100 | + stamp **−200 000 µs** on the `Planning → Prune` veto edge (today it stamps 0). |
| 101 | + The veto IS the Rubikon model's last phase — the abort before the act. |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## 4. The integration — where it lands, what consumes what |
| 106 | + |
| 107 | +**Home:** `lance-graph-planner` + `lance-graph-contract` (the planner consumes the |
| 108 | +SoA; the contract owns the trait airgap). The path is: *it entered the golden |
| 109 | +image* (✅, symbiont links planner+surrealdb+OGAR+ractor) → now wire the planner |
| 110 | +to drive the SoA. |
| 111 | + |
| 112 | +- ☐ **Planner ↔ SoA.** `lance-graph-planner` plans OVER the `MailboxSoaView` |
| 113 | + columns (the four superpowers §2 are planner operations). JITson |
| 114 | + (`contract::jit::JitCompiler`) compiles the selected thinking-style kernel. |
| 115 | +- ☐ **Thinking styles ↔ Rubikon.** OGAR **class DO/THINK** selects the |
| 116 | + thinking-style via an **i4-32D fingerprint CAM** with **implicit sparse |
| 117 | + adjacency** ("how other tasks do it" — i4-distance PROPOSES → `ClassView` |
| 118 | + ADDRESSES, per AGENT_LOG WD-1/WD-2). Best-practice styles come from **OGAR |
| 119 | + inheritance + the Ontology** (`lance-graph-ontology`), resolved `classid → |
| 120 | + ClassView` one layer up from the SoA (never in the columns). |
| 121 | +- ☐ **SurrealQL DLL/AST adapter = the consumer/commit membrane.** |
| 122 | + `ogar-adapter-surrealql` (already a symbiont dep) lowers Cypher/Class DDL → |
| 123 | + SurrealQL; `surreal_container` projects the SoA columns read-only |
| 124 | + (`SurrealMailboxView`); the **SurrealQL re-read** (`read_via_kv_lance`) is the |
| 125 | + one remaining stub. Writes commit through it (ORM/SQL membrane). |
| 126 | +- ☐ **Outer boundary = `lance-graph-callcenter`.** The outer SLA + the |
| 127 | + outer SQL/consumer commit membrane (ORM or whatever) + the version watcher |
| 128 | + (`LanceVersionWatcher`/`WatchReceiver`) for *subscriber* consumers. |
| 129 | +- ✅ **ractor = the dummy ownership guarantee** threading through all of it — |
| 130 | + the mailbox owns its SoA exclusively (`&mut`), compile-time, no messages. |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +## 5. Sequence (queued increments, each a falsifiable probe) |
| 135 | + |
| 136 | +1. ☐ Planner reads the symbiont SoA (a `MailboxSoaView`) and runs a real query. |
| 137 | +2. ☐ Superpower §2.1 — tenant→fingerprint meta-query (one tenant, 16k rows → one |
| 138 | + fingerprint; cosine/CAM over the standing wave). |
| 139 | +3. ☐ Superpower §2.4 — key-only 32-byte render (materialise `hhtl_path_at` / |
| 140 | + `edge_block_at`; assert zero value-slab reads). |
| 141 | +4. ☐ Superpower §2.2/§2.3 — `temporal` Markov chaining + project |
| 142 | + witness/CausalEdge64. |
| 143 | +5. ☐ Rubikon §3 — the −200 ms Libet-veto anchor on `Planning → Prune`. |
| 144 | +6. ☐ Thinking-style §4 — OGAR DO/THINK i4-32D CAM selects the style; JITson |
| 145 | + compiles it; the Rubikon lifecycle dispatches it. |
| 146 | +7. ☐ Membrane §4 — `read_via_kv_lance` un-stubbed; callcenter SLA + commit. |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## 6. Honest status (no overclaim) |
| 151 | + |
| 152 | +- ✅ **SHIPPED + verified** (§1): the golden-image SoA foundation — every claim |
| 153 | + has a file:line read THIS session. |
| 154 | +- ☐ **PROPOSED / named-target-located** (§2–§5): the planner integration and the |
| 155 | + four superpowers as planner operations, the −200 ms veto, OGAR DO/THINK |
| 156 | + thinking-style selection, the SurrealQL membrane, the callcenter boundary. The |
| 157 | + targets exist (`temporal` module, `jit.rs`, `ogar-adapter-surrealql`, |
| 158 | + `lance-graph-callcenter`, OGAR i4-32D / `ClassView`), but the wiring is the |
| 159 | + work — none of §2–§5 is claimed running. |
| 160 | + |
| 161 | +**Cross-ref:** symbiont `INTEGRATION_PLAN.md` + `BATTLE_TEST_PLAN.md`; CANON |
| 162 | +(`canonical_node.rs`); `kanban.rs` / `scheduler.rs` / `soa_view.rs`; |
| 163 | +`scheduler_seam.rs`; EPIPHANIES `E-NODE-IS-SOA-IS-KANBAN-BOARD`, |
| 164 | +`E-BINDSPACE-IS-A-NAN-PROJECTION-SURFACE`, `E-SCENT-IS-NOT-READING`; STATUS_BOARD |
| 165 | +`symbiont-golden-image-harness`. |
0 commit comments