|
| 1 | +# DeepNSM → V3 substrate convergence — v1 |
| 2 | + |
| 3 | +> **Status:** PROPOSED (doc-only). Extends `v3-convergence-wiring-v1` |
| 4 | +> ("wire, don't invent"). Credits PR #624 (probes P0–P5) as the proven |
| 5 | +> static baseline. Does NOT supersede any shipped decision. |
| 6 | +> |
| 7 | +> **Organizing frame:** DeepNSM is **not migrated onto** the V3 substrate — |
| 8 | +> it is the **trained encoder that fills tenants V3 has already reserved.** |
| 9 | +> The COCA gridlake `Cell` is a byte-subset of existing value tenants; the |
| 10 | +> "migration" is a *recognition* (a `ValueSchema` reading), not a port. |
| 11 | +
|
| 12 | +--- |
| 13 | + |
| 14 | +## 0. What is already proven (do not re-derive) |
| 15 | + |
| 16 | +PR #624 landed probes P0–P5 (`crates/lance-graph-osint/tests/`), each an |
| 17 | +integer-exact `#[test]` that de-blackboxes one convergence claim against |
| 18 | +shipped code: |
| 19 | + |
| 20 | +- **P1** — deepnsm `subspace_distance_table` → quantize → palette → |
| 21 | + `SpoDistances::s_dist` (planner) **≡** `MatrixDistance::distance` |
| 22 | + (arm-discovery), byte-exact over 4096 pairs. *(node-code layer)* |
| 23 | +- **P2/P3/P3b** — `CausalEdge64::pack_v2` round-trips S/P/O + mask + freq/conf; |
| 24 | + the 8 Pearl masks = 8 questions from 3 cached reads; Association vs |
| 25 | + Intervention rank candidates oppositely. *(edge + truth layers)* |
| 26 | +- **P4** — Aerial+ ARM mines a rule, deterministic, `arm_to_truth_u8 → |
| 27 | + CausalEdge64`. *(discovery layer)* |
| 28 | +- **P5** — `is_a` transitivity via `syllogize`, exact NAL truth. *(reasoning)* |
| 29 | + |
| 30 | +The reframe is also prior art: `E-V3-TENANTS-ALREADY-EXIST-WIRE-DONT-INVENT` |
| 31 | +(#626). This plan is the DeepNSM-specific application of it. |
| 32 | + |
| 33 | +**Consequence:** the "check convergence of CAM-PQ / CausalEdge64 / SPO-NARS-2³ / |
| 34 | +arm-discovery" question is **answered — they converge at one integer-exact |
| 35 | +256×256 palette metric, proven.** The open work is the *memory* layer and the |
| 36 | +*gridlake carrier landing*, below. |
| 37 | + |
| 38 | +## 1. The four-layer stack (not four rival representations) |
| 39 | + |
| 40 | +The representations named as "vs" are one composed stack, bottom to top: |
| 41 | + |
| 42 | +| Layer | Object | V3 home | Status | |
| 43 | +|---|---|---|---| |
| 44 | +| node-code | CAM-PQ `[u8;6]` (`Heel/Branch/TwigA/TwigB/Leaf/Gamma`) + its `[[f32;256];6]` ADC-table **dual** | `HelixResidue`(6B) + facet re-read; key `HEEL\|HIP\|TWIG` (doc-asserted tile) | code/table dual proven P1; key↔tile identity **doc-only** | |
| 45 | +| edge | `CausalEdge64` (u64: S/P/O + freq/conf + causal/dir/infer/W/lens) | `EdgeBlock`(16B, 1-byte refs) → `ValueTenant::MaterializedEdges`(4×u64) | **wired** | |
| 46 | +| truth | SPO-NARS 2³ (8 Pearl masks over `SpoDistances` 3×256²) | 3-bit mask in `CausalEdge64` bits 40-42; freq/conf; `Meta` tenant | mask **stored**, projections **computed** (P3) | |
| 47 | +| memory | episodic witness + AriGraph basin | `family` field (basin); `episodic_edges.rs` EW64; `witness_tombstone.rs` | **doc-only / scaffold `todo!()`** | |
| 48 | + |
| 49 | +**Collision guards** (from the mapper sweep — pin before any code): |
| 50 | +- "6×256" names **three** objects: CAM-PQ per-query ADC table `[[f32;256];6]`; |
| 51 | + `SpoDistances` 3×256² pairwise; OGAR key-tier 256×256 centroid tile. Not |
| 52 | + interchangeable. |
| 53 | +- "basin" names **two**: perturbation-sim electrical/Kron basin (Laplacian |
| 54 | + Schur complement) vs canonical `family`. Only the latter maps to the key. |
| 55 | +- CAM-PQ 48-bit and 6×palette256² are **not alternatives** — they are the |
| 56 | + *code* and its *distance-table dual*. |
| 57 | + |
| 58 | +## 2. The recognition: the COCA `Cell` IS the value slab |
| 59 | + |
| 60 | +`crates/deepnsm/examples/gridlake_coca_wire.rs` hand-rolls a 20-byte `Cell` |
| 61 | +that is a byte-subset of tenants `canonical_node.rs` already carves: |
| 62 | + |
| 63 | +| COCA `Cell` field | V3 tenant (exists today) | |
| 64 | +|---|---| |
| 65 | +| `helix48: [u8;6]` | `ValueTenant::HelixResidue` — 6 B, "48-bit helix place, 2× Signed360 hemisphere" | |
| 66 | +| `campq48: [u8;6]` | canonical 6 B CAM-PQ code (the Phase-2 facet re-reads HelixResidue + 6 B CAM-PQ as one 16 B facet) | |
| 67 | +| `count` / `sum_truth` | `ValueTenant::Meta` MetaWord `nars_f(8)+nars_c(8)` | |
| 68 | + |
| 69 | +So "migrate the COCA landing to V3" = land it as a `ValueSchema` reading over |
| 70 | +existing tenants, consuming the **328 B reserved headroom, zero new tenant, no |
| 71 | +`ENVELOPE_LAYOUT_VERSION` bump**. This is task #17 (gridlake carrier / lane J) |
| 72 | +and is the natural first step. It also retires the codec's "deterministic |
| 73 | +stand-in" status by pointing it at the real HelixResidue + CAM-PQ contract. |
| 74 | + |
| 75 | +## 3. Staged deliverables (ordered by wired-ness) |
| 76 | + |
| 77 | +- **D-DNV-1 (recognition, = task #17).** Land the COCA/gridlake landing as a |
| 78 | + `ValueSchema` reading over `HelixResidue` + CAM-PQ facet + `Meta`. Zero new |
| 79 | + tenant. jc-pillar certification (ICC/ρ/α, certification-officer pattern) |
| 80 | + before the reading backs any claim. *Buildable now.* |
| 81 | +- **D-DNV-2 (SPO → CausalEdge64 + 2³, deepen P1/P3).** Map deepnsm `SpoTriple` |
| 82 | + (36-bit S/P/O) onto `CausalEdge64` S/P/O + freq/conf → `MaterializedEdges`; |
| 83 | + run `nars_engine.all_projections()` over deepnsm's COCA distance matrix. The |
| 84 | + rung decomposition on real COCA data. *Buildable now; extends #624 P3b.* |
| 85 | +- **D-DNV-3 (arm-discovery second leg — GATED).** ARM (rule-mine proposer) and |
| 86 | + deepnsm-FSM (grammar-parse proposer) already share the palette256 oracle |
| 87 | + (ρ=0.9973); wire both into one SpoStore. **Blocked on `ARM-JIRAK-FLOOR`** |
| 88 | + (D-ARM-7) — the Jirak noise floor is a hard prereq before touching a live |
| 89 | + `SpoStore`. Do not build the live join before its probe. |
| 90 | +- **D-DNV-4 (memory layer — the real new work, own wave).** No episodic-witness |
| 91 | + `ValueTenant` exists; `witness_tombstone.rs` calcify chain is `todo!()`; |
| 92 | + `basin = family` is doc-only (AriGraph runtime references neither `NodeGuid` |
| 93 | + nor `family`). This is a genuinely-new tenant (or the witness_tombstone |
| 94 | + build) + waking the `family` basin field — highest risk, most doc-only. |
| 95 | + Its own probe + jc certification; must NOT ride D-DNV-1..3. |
| 96 | + |
| 97 | +## 4. Explicitly out of scope |
| 98 | + |
| 99 | +- Grammar **templates** as compiled thinking templates (StepMask) — that is |
| 100 | + W3, a separate wave; `StepMask` does not exist in source yet. |
| 101 | +- Any new `ValueSchema` enum variant (#496/#500 no-new-variant guardrail). |
| 102 | +- Superposing CAM-PQ codes (`I-VSA-IDENTITIES`: bundle identities, not content). |
| 103 | + |
| 104 | +## 5. Cross-refs |
| 105 | + |
| 106 | +PR #624 (P0–P5 probes), `E-V3-TENANTS-ALREADY-EXIST-WIRE-DONT-INVENT`, |
| 107 | +`E-V3-JINA-IS-THE-FULCRUM-SUBSTRATE-MEASURED-1` (deepnsm COCA measured vs Jina), |
| 108 | +`v3-convergence-wiring-v1`, `canonical_node.rs` (`ValueTenant`, `VALUE_TENANTS`, |
| 109 | +`ValueSchema`), `crates/deepnsm/` (encoder/spo/parser + gridlake examples), |
| 110 | +`crates/lance-graph-arm-discovery/` (Aerial+ leg), `nars_engine.rs` |
| 111 | +(`all_projections`, `SpoHead`), `arigraph/markov_soa.rs` (already V3-native), |
| 112 | +`episodic_edges.rs` + `graph/witness_tombstone.rs` (the memory seam), task #17. |
0 commit comments