|
| 1 | +# GUID Canon + Prefix Routing — the policy side (crystallization) |
| 2 | + |
| 3 | +> **READ BY:** integration-lead, truth-architect, family-codec-smith, |
| 4 | +> palette-engineer, any agent touching `identity.rs`, `hhtl.rs`, |
| 5 | +> `high_heel.rs`, `quorum.rs`, the ontology registry, or codebook builds. |
| 6 | +> |
| 7 | +> **Date:** 2026-06-10. **Canon source:** `OGAR/CLAUDE.md` (operator-pinned; |
| 8 | +> cited, never forked). **Counterpart:** ndarray |
| 9 | +> `.claude/knowledge/guid-prefix-shape-routing.md` (the mechanism side). |
| 10 | +> Conjectures are labeled; probes named (no unmarked conjectures). |
| 11 | +> **P0 pre-read honored:** `.claude/knowledge/encoding-ecosystem.md` |
| 12 | +> (codec/distance/representation context for the CAM-PQ and LUT claims |
| 13 | +> below). |
| 14 | +
|
| 15 | +## 1. The canon (cited) |
| 16 | + |
| 17 | +**FINDING** (operator-pinned canon, `OGAR/CLAUDE.md` 2026-06-10 — the |
| 18 | +layout below is recorded design authority, not a derivation): |
| 19 | + |
| 20 | +```text |
| 21 | +xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 32 hex = 128 bit = the GUID |
| 22 | +classid HEEL HIP TWIG basin·leaf(6)+identity(6) |
| 23 | +``` |
| 24 | + |
| 25 | +- **Key-of-key-value:** node = key(128) + value(3968) = 4096 bits. The key |
| 26 | + routes/resolves/compares/scopes/names with zero value decode. |
| 27 | +- **3×4 uniform** (`tier = nibble >> 2`); RFC 9562 = wrapper concern; |
| 28 | + standing 3×4-vs-4×3 watch lives in `OGAR/CLAUDE.md`. |
| 29 | +- **Centroid tile [H]:** path = 6 bytes = CAM-PQ 6×256; per-tier 256×256 |
| 30 | + LUT distance; codebooks 4⁴-hierarchical; **scoped by class prefix** |
| 31 | + (longest-prefix wins). |
| 32 | +- Wrapper audit direction: `contract::identity::NodeGuid` (#480) is the |
| 33 | + carving of this GUID — audited against the canon **group-by-group**, |
| 34 | + never the reverse. Groups 1–2 + the 24-bit `local` already match; the |
| 35 | + Phase B question is groups 3–4 yielding all eight nibbles to HIP/TWIG. |
| 36 | + |
| 37 | +## 2. lance-graph owns POLICY (ndarray owns mechanism) |
| 38 | + |
| 39 | +| Concern | Where it lands | Status | |
| 40 | +|---|---|---| |
| 41 | +| `(entity_type ↔ NiblePath)` bijection mint | ontology registry — Phase B | CONJECTURE until Phase B lands ([H], identity plan) | |
| 42 | +| Per-class centroid codebooks (4⁴-hierarchical, prefix-scoped) | registry shelf, next to `ClassView`/`StructuralSignature` — minted with the class, trained once (amortized) | CONJECTURE → PROBE-CODEBOOK-44 (ndarray doc §6) | |
| 43 | +| `PrefixShapeTable` registration (classid/prefix → `ShapeId`) | lance-graph builds the table from the registry; ndarray routes by it, never knowing semantics | CONJECTURE → PROBE-ROUTE-1 | |
| 44 | +| Quorum certificate type | the **currently-UNEXPORTED `src/quorum.rs` scaffold** (#411, `todo!()`) — `lance-graph-contract/src/lib.rs` declares **no `pub mod quorum`** (Codex-verified on #482), so **step 1 of the implementation is the export itself**; do NOT import `lance_graph_contract::quorum` until then. `HighHeelBGZ`'s basin-merge L1-threshold consensus is the existing mechanism to generalize | CONJECTURE → export + PROBE-QUORUM-1 | |
| 45 | +| Escalation on quorum fail | HHTL tier escalation (`bgz-tensor::hhtl_cache::RouteAction::Escalate` is the shipped precedent) | FINDING: [G] mechanism / CONJECTURE: [H] wiring | |
| 46 | + |
| 47 | +## 3. The anti-theater rules, contract side |
| 48 | + |
| 49 | +The ndarray casebook (`pp13-brutally-honest-tester-verdict.md`) defines |
| 50 | +eigenvalue theater: cheap arithmetic wearing metric/spectral language it |
| 51 | +does not earn (unsatisfiable PSD gates; optimism thresholds; enforced |
| 52 | +placeholders; unrun "verified" claims; raw-XOR-u64 as "nearest"). |
| 53 | + |
| 54 | +Contract-side consequences: |
| 55 | +1. **Cheap-path answers carry a quorum certificate** — k-of-n φ-stride |
| 56 | + probes agree within τ; τ from measured anchors (ρ = 0.9973 HIP / 0.965 |
| 57 | + TWIG; Pflug-10 palette certification) under **I-NOISE-FLOOR-JIRAK** |
| 58 | + (Jirak 2016 rates, never classical Berry-Esseen, never optimism). |
| 59 | +2. **Metrics are named typed fns** (`cognitive-distance-typing.md` |
| 60 | + no-umbrella rule): popcount Hamming, palette L1 ADC — raw-XOR-u64 |
| 61 | + ordering is the named anti-pattern. |
| 62 | +3. **Quorum fail escalates a tier; never silently accepts.** |
| 63 | +4. **`ShapeId` is a register key** (I-VSA-IDENTITIES Test 0): points to a |
| 64 | + shape; never bundled, never content-hashed. |
| 65 | +5. **No spectral language on the cheap path.** PSD/eigen/Σ claims route to |
| 66 | + ndarray's pillar suite with relative tolerances and measured thresholds. |
| 67 | + |
| 68 | +## 4. Probes (shared numbering with the ndarray doc) |
| 69 | + |
| 70 | +PROBE-ROUTE-1 (batch parity + ≥4× bench) · PROBE-QUORUM-1 (accept ⇒ ρ ≥ |
| 71 | +anchor; reject ⇒ escalate) · PROBE-PHI-1 (φ-stride discrepancy beats |
| 72 | +uniform) · PROBE-PYR-1 (perturbation pyramid byte-exact) · |
| 73 | +PROBE-CODEBOOK-44 (4⁴ vs flat-256 within Pflug band) · PROBE-HILBERT-L4 |
| 74 | +(**VERIFIED GREEN 2026-06-10, run first-hand**: 13/13 hilbert tests pass |
| 75 | +incl. `level4_all_indices_unique` — bijective onto [0,4096), exactly what |
| 76 | +cascade addressing needs — and `level4_curve_is_connected`; PP-13 P0-4's |
| 77 | +"expected 4095" was an orientation assumption, not the contract; the |
| 78 | +suite stays as the standing gate). |
| 79 | + |
| 80 | +## 5. Cross-references |
| 81 | + |
| 82 | +`OGAR/CLAUDE.md` (canon) · `OGAR/docs/INTEGRATION-MAP.md` (seams S1/S7/S9; |
| 83 | +gates F10–F14) · ndarray `guid-prefix-shape-routing.md` (mechanism) · |
| 84 | +`EPIPHANIES.md` E-IDENTITY-WHITEBOX-1 (the bijection + roundtrip_eq |
| 85 | +whitening) · iron rules I-NOISE-FLOOR-JIRAK, I-VSA-IDENTITIES, |
| 86 | +I-LEGACY-API-FEATURE-GATED. |
| 87 | + |
| 88 | +## 6. Perturbation = deterministic phase (operator pin, 2026-06-10) |
| 89 | + |
| 90 | +The pyramid perturbation decomposes as **(exponent, location, phase, |
| 91 | +magnitude)**; exponent/location/phase derive from the KEY (level |
| 92 | +nibbles `>>2`, implied mantissa, coprime phase walk — helix |
| 93 | +`CurveRuler` stride-4-over-17 is the shipped, bit-exact integer |
| 94 | +generator) and only the **magnitude envelope is stored** |
| 95 | +(palette-quantized, coarse). Lossless for synthesis by construction — |
| 96 | +phase is convention, not data; the analysis remainder escalates to |
| 97 | +full-residual per the quorum certificate, never silently. Added |
| 98 | +probes: **PROBE-PHASE-1** (bit-exact cross-backend regeneration; |
| 99 | +integer walk only per D-QUANTGATE) · **PROBE-PERT-RHO** (magnitude-only |
| 100 | +meets ρ anchors; escalation rate reported). Bipolar sharpening (§7 |
| 101 | +below). Full treatment: ndarray |
| 102 | +`guid-prefix-shape-routing.md` §4; canon: `OGAR/CLAUDE.md`. |
| 103 | + |
| 104 | +## 7. Bipolar-phase pyramid = Walsh-Hadamard on VSA (operator, 2026-06-10) |
| 105 | + |
| 106 | +Sharper form of §6: when the deterministic phase is **signed (±1)**, |
| 107 | +the cascade IS the Walsh-Hadamard transform of the address tree, |
| 108 | +carried on the workspace's existing `Vsa16kF32` bipolar algebra. |
| 109 | +**Signs compose by XOR (= `vsa_bind`)**; **magnitudes compose by |
| 110 | +`vsa_bundle`** (Markov-respecting per `I-SUBSTRATE-MARKOV`). Each cell |
| 111 | +is a Walsh-resonance superposition recoverable by role-key unbind; |
| 112 | +the Heisenberg-shaped capacity bound is `I-VSA-IDENTITIES` Test 1 |
| 113 | +(N ≤ √d/4 ≈ 32) — the classical uncertainty principle of the substrate |
| 114 | +made explicit. Roundtrip bit-exact because phase is generated, not |
| 115 | +stored. |
| 116 | + |
| 117 | +**Two-algebra rule (load-bearing):** sign = XOR; magnitude = bundle, |
| 118 | +NEVER `MergeMode::Xor` (breaks Markov; the named anti-pattern is PP-13 |
| 119 | +P1-1, "raw-XOR ordering as 'nearest'"). Receipts already exist: |
| 120 | +`vsa_bind` / `vsa_bundle` (iron-rule algebra), `Vsa16kF32` (bipolar |
| 121 | +carrier in `crystal/fingerprint.rs`), helix `CurveRuler` (bit-exact |
| 122 | +integer phase walk, D-QUANTGATE-compliant). Honest fences: |
| 123 | +"quantum-like" is the bundling algebra, NOT measurement randomness; |
| 124 | +bipolar = 1-bit phase; Parseval preservation requires the bundle (sum), |
| 125 | +not just XOR. |
| 126 | + |
| 127 | +**Probes added:** **WHP-1** (Parseval: `Σ|cell|² = Σ|M_L|²` within |
| 128 | +Jirak noise floor) · **WHP-2** (encode→decode→encode byte-identical |
| 129 | +cross-backend) · **WHP-3** (bind/unbind margin holds for N ≤ √d/4; |
| 130 | +fails cleanly past it) · **WHP-4** (explicit two-algebra guard: |
| 131 | +raw-XOR on magnitudes fails Chapman-Kolmogorov consistency). Full |
| 132 | +treatment: ndarray `guid-prefix-shape-routing.md` §4b. |
0 commit comments