|
| 1 | +# Capstone Validation Plan — Phase-Aligned Cognitive Loop: Wiring & NaN-Census (v1) |
| 2 | + |
| 3 | +> **Status:** PROPOSED (2026-06-20). The measurement companion to the kanban×Rubicon |
| 4 | +> tenant arc. **Not a build plan — a measurement plan.** Per the workspace |
| 5 | +> measurement-before-synthesis iron rule (truth-architect) + probe-first protocol: |
| 6 | +> every seam below is a **CONJECTURE until its probe runs green**. The deliverable |
| 7 | +> per seam is the probe + the number, never more prose. |
| 8 | +> **Operator framing (2026-06-20):** "99% is there unused, 28% wiring gaps |
| 9 | +> resulting in 72% NaN" — treated here as THREE orthogonal measured quantities, |
| 10 | +> not estimates to assert. |
| 11 | +
|
| 12 | +--- |
| 13 | + |
| 14 | +## 0 — Why this exists (the anti-synthesis-spiral guard) |
| 15 | + |
| 16 | +Two Opus mapping passes (AGENT_LOG 2026-06-20) established the qualitative truth: |
| 17 | +the substrate has **all the pieces** of a phase-aligned, per-SoA-owned, version-arc- |
| 18 | +scheduled cognitive loop (`kanban` Rubicon phases, `MailboxSoaOwner`/`View` split, |
| 19 | +`VersionScheduler`/`NextPhaseScheduler`, `CycleAccumulator`, the `Meta`/`Qualia`/ |
| 20 | +`Plasticity` tenants, `mul.rs` DK/Trust/Flow/Gate, `OrchestrationBridge`/`BridgeSlot`, |
| 21 | +surrealdb `timeline.rs`), **but the runtime loop is not closed** — `UnifiedStep` |
| 22 | +carries no SoA pointer, the batch writer pushes nothing, the timeline is unwired |
| 23 | +(`#[allow(dead_code)]`), kanban is not yet a value tenant, and no pipelining exists. |
| 24 | + |
| 25 | +The risk this plan removes: shipping the kanban tenant + calling the loop "done" |
| 26 | +by assertion. Instead we **measure** the three quantities below and drive run-NaN |
| 27 | +toward 0 seam by seam. |
| 28 | + |
| 29 | +## 1 — The three measured quantities (the dashboard) |
| 30 | + |
| 31 | +| Metric | Definition | How measured | Baseline (Wave 0) | |
| 32 | +|---|---|---|---| |
| 33 | +| **Piece-presence %** | of the N named loop components, how many TYPES exist | static: grep the contract + surrealdb for each named type | ~99% (claim — Wave-0 confirms) | |
| 34 | +| **Seam-wiring %** | of the M seams (S1..S7), how many are CONNECTED (caller→callee actually invoked in a non-test path) | runtime-trace: instrument one cycle, count seams that fire | ~72% wired ⇒ ~28% gap (claim) | |
| 35 | +| **Run-NaN %** | of the K observable outputs in one end-to-end cycle, fraction that are NaN / `None` / unhandled-`BridgeSlot` / default-fallback | run one cycle on shipped code, count valid vs NaN | ~72% NaN (HYPOTHESIS) | |
| 36 | + |
| 37 | +**These are distinct.** A piece can be present (99%) yet its seam unwired (28% gap) |
| 38 | +yet its output NaN at runtime (72%). The plan's success metric is **run-NaN → <5%** |
| 39 | +with **seam-wiring → 100%**, each step backed by a probe number. |
| 40 | + |
| 41 | +## 2 — The loop under test (one cycle) |
| 42 | + |
| 43 | +``` |
| 44 | +SoA node (Kanban tenant: phase) ── S1 |
| 45 | + → MUL reads Qualia(flow/trust/DK)+Meta(NARS/FE)+Plasticity ── S2 |
| 46 | + → GateDecision (flow vs mismatch) ── S2 |
| 47 | + → owner advances Kanban phase (gated write) ── S1/S2 |
| 48 | + → VersionScheduler lowers version-arc → KanbanMove ── S3 |
| 49 | + → UnifiedStep routed via BridgeSlot (lance/surreal/lancedb) ── S4 |
| 50 | + → batch writer commits → Lance version (push?) ── S5 |
| 51 | + → timeline view renders kanbanview (zero-copy?) ── S6 |
| 52 | + → SoA self-NaN-census written to Meta (meta-awareness)── S7 |
| 53 | + → (next cycle, pipelined against this one's disk-push)── S5/G2 |
| 54 | +``` |
| 55 | + |
| 56 | +## 3 — The seams (each a probe with PASS / KILL) |
| 57 | + |
| 58 | +| Seam | Claim | Probe (pass/fail) | KILL condition | Status | |
| 59 | +|---|---|---|---|---| |
| 60 | +| **S1** kanban tenant | `ValueTenant::Kanban` at `[144,152)` carries phase+cycle+exec, layout-preserving | field-isolation matrix: write each tenant, assert all others unchanged; `NodeRowPacket` round-trips kanban byte-exact | stride ≠ 512, or any other tenant perturbed | CONJECTURE | |
| 61 | +| **S2** MUL→phase | `MUL::GateDecision(Qualia,Meta,Plasticity)` mismatch ⇒ owner advances phase | feed a known flow-vs-mismatch qualia vector; assert the gate returns the expected `KanbanMove` (or HOLD) | gate ignores qualia (constant output), or reads uninitialized → NaN | CONJECTURE | |
| 62 | +| **S3** version→move | `VersionScheduler::on_version` lowers a real Lance version to the next legal `KanbanMove` | drive a 2-version dataset; assert the forward-arc move emitted | no move on a legal transition, or illegal edge emitted | CONJECTURE (type exists, unwired) | |
| 63 | +| **S4** envelope route | a kanban `UnifiedStep` reaches the present `BridgeSlot` (surreal plan engaged by Cargo presence) | register a surreal slot; route a `step_type:"kanban.*"`; assert it lands; with slot absent assert graceful unhandled (not panic) | routes to wrong domain, or panics when slot absent | CONJECTURE (UnifiedStep has no SoA pointer — G1) | |
| 64 | +| **S5** batch push | commit PUSHES a kanban update to the planner (not pull-only) | commit a row; assert a push/notify carrying the `KanbanMove` is observed | commit only notifies the optimizer (current state) → gap stays | GAP (measured: pull-only) | |
| 65 | +| **S6** timeline view | `TimelineView` renders the kanbanview **zero-copy** (`FixedSizeBinary(512)` → `&[NodeRow]`) | store a node as `FixedSizeBinary(512)`; `node_rows_from_le_bytes` over the column buffer; assert ptr-identity (no copy) | `val` is variable `Binary` (current) → cannot zero-copy → NaN/copy | GAP (val is opaque Binary) | |
| 66 | +| **S7** meta-awareness | the SoA carries its OWN wiring-completeness census in the `Meta` tenant | compute the run-NaN% of one cycle; write it as a free-energy/awareness field; assert it reads back and reflects the real gap count | census not written, or hard-coded (doesn't track real gaps) | CONJECTURE (the capstone itself) | |
| 67 | + |
| 68 | +## 4 — Waves (probe-ordered; no brick lands before its probe is green) |
| 69 | + |
| 70 | +- **Wave 0 — measure the baseline on SHIPPED code (no new code).** Instrument one |
| 71 | + end-to-end cycle against `main` as it stands; produce the first real |
| 72 | + `(piece-presence%, seam-wiring%, run-NaN%)` triple. **This is the honest |
| 73 | + number behind "99/28/72."** Output: a `nan_census` example/bench + a recorded |
| 74 | + baseline. Until this runs, "72% NaN" stays a HYPOTHESIS in this doc. |
| 75 | +- **Wave 1 — S1 + S2** (the kanban tenant keystone + the MUL trigger). Build the |
| 76 | + 8-byte tenant (gated on operator go), field-isolation test (S1 green), wire the |
| 77 | + MUL→phase function (S2 green). Re-measure the triple; expect run-NaN to drop. |
| 78 | +- **Wave 2 — S4 + S5 + S6** (envelope routing, batch push, `FixedSizeBinary(512)`). |
| 79 | + The heavier surrealdb-side + contract envelope work. Each gated on its probe. |
| 80 | +- **Wave 3 — S7** the meta-awareness self-census: the SoA writes its own run-NaN% |
| 81 | + into `Meta`. The capstone — the system measuring its own wiring. |
| 82 | + |
| 83 | +## 5 — The honest AGI-adjacency framing (overclaim guard) |
| 84 | + |
| 85 | +What the green end-state proves: **the substrate can close an active-inference |
| 86 | +loop over the SoA, per-SoA-owned, NaN-free, with the system carrying a census of |
| 87 | +its own remaining gaps.** That is *adjacency* — the structure of the thing — not a |
| 88 | +claim of AGI. The load-bearing word is **IF**: IF all seams go green AND run-NaN→0 |
| 89 | +AND S7 self-census tracks real gaps, THEN we are at aspiration-adjacency. The plan |
| 90 | +converts the IF into a measured fact; it never asserts the THEN. (truth-architect / |
| 91 | +overclaim-auditor: AGI-adjacency is the hypothesis the census tests, not a headline.) |
| 92 | + |
| 93 | +The genuinely novel measurable: **S7 — a system aware of what it cannot yet do** |
| 94 | +(the φ-1 permanent-humility ceiling, made a number in the `Meta` tenant). That |
| 95 | +self-NaN-census is the "Orchestration meta-awareness plan" the operator named. |
| 96 | + |
| 97 | +## 6 — Cross-refs |
| 98 | + |
| 99 | +`canonical_node.rs` (`ValueTenant`/`VALUE_TENANTS` carve, free `[144,512)`), |
| 100 | +`mul.rs` (Dk/Trust/Flow/Gate), `soa_view.rs` (`MailboxSoaOwner`/`View`), |
| 101 | +`scheduler.rs` (`VersionScheduler`/`NextPhaseScheduler`), `cycle_accumulator.rs`, |
| 102 | +`orchestration.rs` (`UnifiedStep`/`BridgeSlot`), surrealdb `core/src/kvs/lance/ |
| 103 | +timeline.rs`; AGENT_LOG 2026-06-20 (cont.¹⁴ the two mapping passes); EPIPHANIES |
| 104 | +`E-SURREALDB-SECOND-BRAIN-IS-ZERO-COPY-IFF-FIXEDSIZEBINARY`; the AGI-as-glove |
| 105 | +doctrine (four columns ARE the surface); I-VSA-IDENTITIES (register laziness — |
| 106 | +why thinking-style is ClassView + Meta, not a new 128-bit tenant). |
0 commit comments