From 95f1fac82dae719df961bcc5ccaaae4cdf2aadec Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Tue, 9 Jun 2026 19:54:09 +0000 Subject: [PATCH 01/18] =?UTF-8?q?docs(integration-map):=20the=20compositio?= =?UTF-8?q?n=20companion=20=E2=80=94=20layers,=20seams,=20DAG,=20gates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DISCOVERY-MAP.md indexes WHAT was found; this new INTEGRATION-MAP.md maps HOW it composes and in what order it lands. Implementation follows the map; the map precedes the code ("document before it dilutes"). Contents: - §0 the one-picture (sources -> producers -> OGAR IR -> adapters -> contract spine -> runtime -> storage -> consumers; Firewall at every crossing) - §1 layer inventory L0-L7, every row receipt-backed with file:line and CODED/CLAIMED/ABSENT per the runtime-archaeologist scale; provenance marks ([per rt] / [per xs]) where the receipt is owned elsewhere - §2 the twelve seams, each with its contract TYPE named (S1 identity mint bijection .. S12 PII boundary) - §3 DO vs THINK resolved: THINK = class-graph walk (FieldMask::inherit = the subClassOf walk as parent-OR-delta); DO = ActionDef SPO nodes + supervisor routing up the parent edge (NiblePath-prefix bit-shift); membrane = KausalSpec; instance pin = NodeGuid's five readings. The dead model (aggregated action_defs Vec on Class) is named dead. - §4 the content tier cascade T0-T5 (strings -> 12-byte ref cells; resolution only at the display edge) - §5 the merged phase DAG (lance-graph identity arc A-H x OGAR tracks O1-O7 x DO-axis R1-R4 x reconvergence X1-X6 x hygiene H1-H4) with the critical path C -> D -> R1/R2 -> R3 - §6 falsification gates F1-F9 — every load-bearing [H] with its named test (MRO/supervision, monotile addressability, spectral anti-moire, bijection, roundtrip_eq, zero-copy geometry, content round-trip, helix fidelity, kv-lance pins) - §7 ownership + the honest not-yet-read fence - §8 intersecting debt registry; §9 the complete blocked/decision list; §10 maintenance (+ one new rule: a seam without a named contract type is a seam that will fork) Also: one legend line in DISCOVERY-MAP.md cross-linking the two maps (discovery -> there; sequencing -> here). Cross-repo references are read-only citations of lance-graph main at 62bca5e (post #480) and the local surrealdb/openproject-nexgen-rs checkouts; no external state is modified. SYN cross-PR caveat carried over from the discovery map's legend. Docs-only. PII abort-guard (word-boundary): CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/DISCOVERY-MAP.md | 4 + docs/INTEGRATION-MAP.md | 346 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 350 insertions(+) create mode 100644 docs/INTEGRATION-MAP.md diff --git a/docs/DISCOVERY-MAP.md b/docs/DISCOVERY-MAP.md index 5b5ab58..14d555e 100644 --- a/docs/DISCOVERY-MAP.md +++ b/docs/DISCOVERY-MAP.md @@ -35,6 +35,10 @@ > D‑EXCITON revert). "Reverted/graded by the 5+3 review" = the receipts are > those agents' findings; the apparatus is in this repo, the per‑run > transcripts are session‑local. +> - **`INTEGRATION-MAP.md`** = the composition companion (2026‑06‑09): this +> map indexes *what was found*; that one maps *how it composes* — layers, +> seams (each with its contract TYPE), the merged phase DAG, and the +> falsification gates F1–F9. Discovery → there; sequencing → here. > > **Status: LIVING INDEX** (2026‑06‑08). Update entry *status* on > materialization; never delete (append‑only). One entry per discovery; diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md new file mode 100644 index 0000000..3485f1d --- /dev/null +++ b/docs/INTEGRATION-MAP.md @@ -0,0 +1,346 @@ +# INTEGRATION MAP — how the substrate composes across repos + +> **Status: LIVING MAP** (2026‑06‑09). Companion to `DISCOVERY-MAP.md` — +> the discovery map indexes *what was found*; **this maps *how it +> composes*: layers, seams, phases, gates.** Implementation follows this +> map; the map precedes the code (the "document before it dilutes" +> mandate). +> +> **How to read.** Same grading as the discovery map: `[G]` grounded +> (theorem / shipped code / measurement), `[H]` hypothesis **with a named +> test**, `[S]` speculative (catalog only). Code-existence uses the +> runtime‑archaeologist scale: **CODED** (file:line), **CLAIMED** (prose +> or module-doc only), **ABSENT** (a valid finding). Provenance marks: +> `[per rt]` = runtime-session-owned receipt; `[per xs]` = verified by +> the parallel session's first-hand read (CCA2A feedback), not re-read +> here. +> +> **Cross‑PR caveat** (same as the map's `SYN` legend): rows citing +> lance‑graph plans/boards reference `/home/user/lance-graph` state at +> main `62bca5e` (post **#480**); OGAR rows reference this branch. + +--- + +## 0. The one picture + +``` +SOURCES Odoo 17 (Python) OpenProject (Ruby/Rails) SurrealQL DDL TTL/RDF ClickHouse DDL Elixir/HIRO + │ ogar-python [ABSENT] │ ruff_openproject [G per xs] │ parse walk [H] │ [G] │ [G] │ scaffold [G] + ▼ (Track O3) ▼ SPO → op-codegen-projection ▼ (Track O2) ▼ ▼ ▼ +PRODUCERS ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── + ╔════════════════════ OGAR IR (the spine) ════════════════════╗ +THINK arm Class { attributes, associations (4× AR kinds), enums, scopes, mixins, + parent: Option ← "subClassOf == SUPERVISION EDGE" } +DO arm ActionDef (separate SPO node, object_class → Class) + ActionInvocation (state: ActionState) +MEMBRANE KausalSpec { StateGuard | LifecycleTrigger | Depends{paths} } ← the only place domain + workflow survives IR flattening (OGAR-AST-CONTRACT §3) +IDENTITY Identity (NiblePath, class-side) ←─ registry mint (entity_type ↔ NiblePath, bijective) ─→ + NodeGuid (128-bit UUIDv8, instance-side, lance-graph-contract::identity) [G] #480 + ╚═════════════════════════════════════════════════════════════╝ +ADAPTERS emit_surrealql_ddl [G] · ogar-adapter-ttl [G] · ogar-adapter-clickhouse-ddl [G] + · ogar-knowable-from (vart-backend) [G] · parse_surrealql_ddl walk [H scaffold] +CONTRACT lance-graph-contract: TripletProjection · SoaEnvelope · ClassView/FieldMask · kanban + (KanbanColumn/KanbanMove/ExecTarget) · NodeGuid · CollapseGateEmission (Batons) +RUNTIME ractor: generic state_machine (OGAR-agnostic) + OGAR/Rubicon binding [R1 unverified] + · MailboxSoA columns (edges/meta/qualia/entity_type) · supervision routing by NiblePath + prefix (is_ancestor_of = one bit-shift) · commit_event sole-writer membrane +STORAGE Lance (DatasetVersion = frame; per-row cycle stamp = delta) · SurrealDB + (TableDefinition::new_for_ddl → ToSql; kv-lance) · consumer stores via EntityKey(&[u8]) +CONSUMERS openproject-nexgen-rs · woa-rs (Odoo) · MedCare-rs (HIPAA, label-free) · smb-office-rs · q2 +``` + +The Firewall (ADR‑022/023) holds at every layer crossing: **no +serialization in the hot path** — inter‑mailbox state is Batons +(`(u16 target, CausalEdge64)`); the IR is wire‑truth; strings never +enter the SoA (§4). + +--- + +## 1. Layer inventory — what exists, with receipts + +### L0 — Identity & addressing + +| Piece | Where | Status | +|---|---|---| +| `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** | +| `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | +| `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED** | +| The five register-reads of one GUID: **resolve** (entity_type→ClassView) / **route** (niblepath prefix `is_ancestor_of`) / **witness** (frozen bytes + merkle) / **ground‑truth** (shape_hash drift) / **dispatch‑to‑store** (`as_bytes()`→EntityKey) | `identity.rs:31-37` | **[G] CODED** | +| Bijection law: `entity_type:u16` canonical/exact; `NiblePath` the derived view; GUID prefix = 4‑nibble routing cache; **registry mints `(entity_type, NiblePath)` unique pairs** | `identity-architecture-exists-vs-needs-v1.md` (ratified 2026‑06‑09) | **[G] law / [H] mint** — mint + build-time round-trip = lance-graph **Phase B** | +| `SchemaPtr.packed:u32=[ns:8\|entity_type:16\|kind:8]`, `ClassId=u16` ("never a content hash"), `EntityTypeId=u16`, `EdgeRef{family:u8,local:u16}`, `StructuralSignature` | namespace.rs:119 · class_view.rs:53 · ontology.rs:81 · episodic_edges.rs:34 · odoo_blueprint | **[G] CODED** (StructuralSignature: [G] type / [H] live-wire → Phase B) | +| `class_id` **aliases** the `entity_type` slot on the SoA row — no new column | soa_view.rs:47 `[per xs]` | **[G] CODED** | +| Cold-path identity TODAY: `node_id:u32` + String labels (MetadataStore), `u64` content `dn_hash` (SpoStore), `CogRecord` id-less | metadata.rs:60,86 · spo/store.rs:38 · cogrecord.rs:56 | **[G] CODED but the gap NodeGuid fills** → Phase F migration | + +### L1 — The OGAR IR (the two arms + the membrane) + +| Piece | Shape | Status | +|---|---|---| +| **THINK arm** `Class` | `{identity, name, parent: Option ("subClassOf == supervision edge"), language, mixins: Vec, store_accessors, associations, enums, scopes, callbacks, computed_fields, methods, validations, attributes}` | **[G] CODED** (`OGAR-AST-CONTRACT.md §1`; mirrors `ogar-vocab-soa` RecordBatch 1:1) | +| **DO arm — static** `ActionDef` | separate SPO node: `{identity, predicate, object_class → Class, default_subject/temporal/modal, kausal: KausalSpec, method_body, results_in: StateTransition, on_enter: EnterEffect, guard_failure_policy, state_timeout_millis}` | **[G] CODED** (§1; statem terms landed OGAR PR #10) | +| **DO arm — dynamic** `ActionInvocation` | `{identity, realizes → ActionDef, state: ActionState (Pending→Committed/Failed/Cancelled), subject, object_instance, lokal, idempotency_key, trace_id, parent_invocation, emitted_at_millis, failure_reason}` | **[G] CODED** (§1) | +| **The membrane** `KausalSpec` | `StateGuard{field,value} \| LifecycleTrigger \| DependsPath \| None` — *"the only place a domain workflow survives the IR flattening"*; lifecycle (machine) ≠ workflow (data) | **[G] CODED + doctrine** (§3: *"Lifecycle formalized; workflow as data"*) | +| **The four AR primitives** `AssociationKind` | `BelongsTo / HasOne / HasMany / HasAndBelongsToMany` — cross‑ORM: Rails verbatim; Odoo `Many2one/One2many/Many2many` (has_one = One2many constrained to 1) | **[G] CODED** `ogar-vocab/src/lib.rs:655-664` | +| `Association` full option set | `class_name, foreign_key, polymorphic, through, source, as_target, dependent` (app-level) **separate from** `ondelete` (DB-level), `optional, inverse_of, before/after_add/remove, scope_source, auto_join, context_source, check_company, delegate` | **[G] CODED** `lib.rs:672-732` | +| **Traversal vocabulary** `::includes / ::memberof() / ::members() / ::groups::members()` | methods on `Class` (`member_of(name)`, `members(name)`, `group_members(name)`, `includes()`, `associations_of(kind)`, `members_through(name)`) — per The Click: methods on the carrier, never free functions | **ABSENT** — the data is there, the API isn't. **Track O1**, ~50 LOC | +| **Two `Class` shapes** | producer-side `ogar-vocab::Class` (`parent: Option`) vs canonical contract §1 (`parent: Option`) — the String→Identity lift | **[G] divergence named** `[per xs]` → **Track O7** (pairs with registry mint + lance-graph D-ODOO-BP-1c/d/e) | + +### L2 — Producers (source → IR) + +| Producer | Source | Status | +|---|---|---| +| `ogar-python` | Odoo 17.0 core (`@api.depends/@api.onchange/@api.constrains` → `ActionDef` per `ADAPTERS-AND-ACTORS §3.4.1`; `_inherits` → mixins; mapping locked `ODOO-TRANSCODING.md §3,§5`) | **ABSENT** (queued) → **Track O3** | +| `ruff_openproject` / `ruff_ruby_spo` | Rails AR source → SPO triples; vendored in openproject‑nexgen‑rs; test extracts `[TimeEntry, WorkPackage]` from a Rails fixture | **[G] CODED** `[per xs]` | +| `parse_surrealql_ddl` walk | SurrealQL DDL → `Vec`: DEFINE TABLE→Class; `record`→BelongsTo; `option>`→BelongsTo+optional; `option`→Attribute(required=false). NOT yet: `ASSERT IN`→EnumDecl, DEFINE EVENT→ActionDef, non-owning-side post-pass | **[H] scaffold** — feature `surrealdb-parser` wired (OGAR #23 rust 1.95), walk partial (`ogar-adapter-surrealql/src/lib.rs:143-165, 219-299`) → **Track O2** | +| `ogar-from-elixir` (HIRO `gen_statem` → Rubicon) | Elixir | **[G] scaffold** | +| `ogar-from-ruby` (generic Rails) | — | **ABSENT**; decision: build vs reuse the nexgen ruff path → **Track O4** | + +### L3 — Adapters (IR → target forms) + +| Adapter | Direction | Status | +|---|---|---| +| `emit_surrealql_ddl(&[Class]) → String` | IR → SurrealQL DDL | **[G] CODED** (hand formatter; signature durable — body swaps to `TableDefinition::new_for_ddl().with_*() + ToSql::to_sql()` when convergence lands, `lib.rs:68-77`) | +| `ogar-adapter-ttl` (Turtle round-trip), `ogar-adapter-clickhouse-ddl` (dotted-name round-trip) | bidirectional | **[G] CODED** (#37, #38/#40) | +| `ogar-knowable-from` — `KnowableFromWriter` trait + `register_class_knowable_from`; `surrealql-hint` (self-describing via emit); `vart-backend` (`Tree`, NULL-terminated keys) | IR → registry | **[G] CODED** (#25/#33/#43); Lance writer impl = `lance-bind` boundary **[H]** | +| `TripleEmitter` (129 RDF predicates, SPO + TeKaMoLo) | IR → triples | **[G] CODED** | + +### L4 — The contract spine (lance-graph-contract, zero-dep) + +| Piece | Status | +|---|---| +| `TripletProjection` + `roundtrip_eq → RoundTripFailure` (codegen_spine.rs:107) | **[G] trait** — impls: `op-codegen-projection` **[G per xs]**; odoo blueprint **CLAIMED**; cognitive-write **ABSENT → Phase D** | +| `SoaEnvelope` + `ColumnDescriptor` (byte-geometry ONLY; "width only — no domain meaning"; `name_id` is an ordinal, NOT a string) | **[G] trait / [H] ZERO impls** → **Phase C is the keystone gate** | +| `ClassView` (resolve-late from OGIT cache) + `FieldMask(u64)` presence + `FieldMask::inherit(delta)` = the HHTL `subClassOf` walk as bitwise parent-OR-delta | **[G] CODED** (#441) | +| Rubicon kanban: `KanbanColumn`(6: Planning/CognitiveWork/Evaluation/Commit/Plan/Prune), `KanbanMove ≤16B`, `ExecTarget`(Native/Jit/SurrealQl/Elixir), `MailboxSoaOwner::try_advance_phase()` (checked DAG), Libet −550 ms anchor | **[G] CODED** (#437) | +| 34 `Tactic` kernels over `ThoughtCtx` (the executable bodies DO dispatches into) | **[G] CODED** (#411) | +| Batons: `CollapseGateEmission` `(u16, CausalEdge64)`; `wire_cost_bytes()=13+10·n` | **[G] CODED** — the Firewall's hot-path carrier | + +### L5 — Runtime (ractor + mailbox + membrane) + +| Piece | Status | +|---|---| +| Generic `state_machine` crate (ractor_actors) — OGAR-agnostic; `Context` opaque; `on_enter` → `CommitHook` | **CLAIMED** (contract §0; runtime-session-owned) → **Track R1: verify first-hand** | +| OGAR/Rubicon binding (fills Context/Event/State; the callcenter codegen lands here; "the class IS the actor spec — the actor is *generated from* the `Class`") | **CLAIMED** → **R2** | +| Supervision routing by NiblePath prefix (`route` reading of NodeGuid; one bit-shift) | **[G] mechanism** (identity.rs + hhtl.rs) / **[H] wiring** → R2/R4 | +| `MailboxSoA` columns `edges[CausalEdge64;N]` / `meta[MetaWord;N]` / `qualia` / `entity_type` — edges and meta SEPARATE (D‑META64 revision holds) | **[G] CODED** `[per rt]` (#477) | +| `commit_event` sole-writer + `ExternalMembrane::project` + `CommitFilter`/`MembraneGate`; today emits scalar `CognitiveEventRow` | **[G] CODED** (lance_membrane.rs:315) — node/edge `project_graph` **ABSENT → Phase E** | +| HEEL/HIP/TWIG/LEAF cascade legend in `high_heel.rs` | **CLAIMED only** — "no code routes by prefix" (q4‑hhtl‑audit) → **Track X4** (also resolves D‑BGZ17's §4.1 unwired gap) | + +### L6 — Storage + +| Piece | Status | +|---|---| +| Lance: `DatasetVersion(v)→(v+1)` = frame; `last_active_cycle[u32;N]` per-row stamp = changed-cell delta (D‑DELTA `[G]`) | **[G] CODED** `[per rt]` | +| SurrealDB fork (local `/home/user/surrealdb`): `surrealdb/{ast,parser,core}`; `TableType::{Normal,Relation,Any}` (table_type.rs:8); `TableDefinition::new_for_ddl` (catalog/table.rs:161) | **[G] CODED** upstream | +| `kv-lance` pins `lance =6.0.0` vs workspace `=7.0.0` | **[G] debt** TD‑SURREALDB‑KVLANCE‑LANCE7 — blocks the kv-lance storage engine resolving; companion fork PR owed | +| Consumer stores via `EntityKey<'a>(&'a [u8])` — length-agnostic; smb `key_to_filter` branches on length (12→ObjectId, else Binary); a 16-byte GUID is "just another length" | **[G] CODED** (repository.rs:12; smb mongo.rs:79/lance.rs:92; MedCare dms.rs:14) → **Phase G** wiring | + +### L7 — Consumers + +| Consumer | Integration shape | Status | +|---|---|---| +| **openproject-nexgen-rs** (local; 298 tests) | vendors ruff extractors + lance-graph-contract; `op-codegen-projection impl TripletProjection`; owns `op-surreal-ast` (mirror of surrealdb-core::catalog). Convergence: *"op-codegen-projection is a special case of the general OGAR `Class` → `TableDefinition::new_for_ddl()`"* (OPENPROJECT‑TRANSCODING §10.2) | **[G] sibling on the same spine** `[per xs]` — not yet an `ogar-vocab` dependent | +| **woa-rs / Odoo** | consumes via the blueprint (`OdooEntity` typed, 12 TIER-1 addons extracted #426) + the queued `ogar-python` | **[G] blueprint / ABSENT producer** | +| **MedCare-rs** | label-free contract IS the PII guarantee (HHTL leaf-rename at adapter, D‑PII); `column_mask_bridge`; `EntityKey` import | **[G] CODED** | +| **q2 cockpit** | `graph_render` contract surface | **[G] types** (stubs-dedup debt TD‑Q2‑STUBS‑DEDUP‑1) | + +--- + +## 2. The seams — every cross-boundary contract + +| # | Seam | Producer side | Consumer side | Contract type | Status | +|---|---|---|---|---|---| +| S1 | **class identity ↔ instance identity** | OGAR `Identity` (NiblePath) | lance-graph `NodeGuid` | registry mint `(entity_type ↔ NiblePath)` bijection | **[G] type / [H] mint** (Phase B) | +| S2 | **IR → SurrealQL DDL** | `emit_surrealql_ddl` | SurrealDB `DEFINE TABLE/FIELD` | DDL string; future body = `TableDefinition::new_for_ddl` | **[G] wired** | +| S3 | **SurrealQL DDL → IR** | surrealdb-parser AST | `walk_query → Vec` | `Parser::enter_parse::` (depth 1000) | **[H] partial walk** (O2) | +| S4 | **knowable_from** (the four-clock pin) | `ogar-adapter-surrealql` stamps at DDL registration | `lance-graph-planner::temporal::classify` deinterlaces (lance version / schema / awareness / thinking) | `LanceVersion` via `KnowableFromWriter` | **[G] pin (ADR‑010) / [H] Lance writer impl**; consumer `temporal.rs` landed #479 | +| S5 | **AR source → SPO → DDL** | `ruff_openproject` | `op-codegen-projection` | `lance_graph_contract::codegen_spine::TripletProjection` | **[G] CODED** `[per xs]` | +| S6 | **ActionDef → runtime** | OGAR DO arm | `ractor_actors::state_machine` via the OGAR/Rubicon binding (`CommitHook`; Context opaque) | the §0 two-layer contract | **CLAIMED → R1/R2** | +| S7 | **mailbox bytes ↔ cold bytes** | `MailboxSoA` | Lance columnar | `SoaEnvelope` (`as_le_bytes().as_ptr()==backing`; `verify_layout()`) | **[H] ZERO impls → Phase C (keystone)** | +| S8 | **cycle → graph** | committed cycle | queryable `NodeGuid` nodes + `EdgeGuid` edges | `project_graph` through `commit_event`+gate | **ABSENT → Phase E** | +| S9 | **GUID → consumer store** | any | smb/MedCare/Lance | `EntityKey(guid.as_bytes())` | **[G] transport / [H] 16-byte wiring** (Phase G) | +| S10 | **content display** | SoA refs | rendered strings | `ClassView::render_rows` + tier dispatch (§4) | **[G] render / [H] tier byte** (O5) | +| S11 | **kind-generic codegen** | non-Odoo targets | `RouteBucketTyped` (sidecar WIP, +228 uncommitted, other session's) | blanket impl preserves `RouteBucket` | **[H] WIP — needs first consumer** | +| S12 | **PII boundary** | OGAR/OGIT labels | MedCare | label-free leaf-rename at adapter (D‑PII) | **[G] CODED** | + +--- + +## 3. DO vs THINK — the resolved architecture (the session's central correction) + +**THINK (Semantik / structural).** Resolution = a *graph walk*: +aggregate `{attributes, associations, computed_fields, enums, scopes}` +over `parent` + `mixins` edges; child shadows parent by identity slot +(Odoo `_inherit` semantics); presence at the row = `FieldMask`, and +`FieldMask::inherit(delta)` IS the subClassOf walk done as bitwise +parent-OR-delta. Pre-computable per class at OGIT-classification time. +Labels resolve LATE from the OGIT cache (`ClassView`); **zero labels in +the SoA bytes**. + +**DO (Pragmatik / behavioral).** NOT inherited as aggregated +`action_defs` — that model is **dead** (corrected from source). +`ActionDef`s are independent SPO nodes keyed `object_class → Class`. +Resolution = *runtime routing*: lookup `WHERE object_class = me`; on +miss, the **supervisor routes the invocation up the `parent` edge** +("subClassOf == supervision edge") — OTP's "route up" doctrine as +substrate topology, mechanically a NiblePath-prefix `is_ancestor_of` +bit-shift (NodeGuid's `route` reading). Effects land as `CausalEdge64` +batons; lifecycle = `ActionState` on `ActionInvocation`; domain workflow += guarded `on_enter` effect at the `Pending→Committed` crossing. + +**The membrane = `KausalSpec`.** `Depends{paths}` references THINK +attribute-paths from inside DO triggers — the §0 endgame's "AST-named- +fact extraction" as a concrete typed predicate. One type ties the arms. + +**The instance pin = `NodeGuid`.** resolve / route / witness / +ground-truth / dispatch-to-store — five register reads of one frozen +key; write-once; drift repair = new immutable Lance version. + +**Open falsification (the architecture's make-or-break):** does +supervisor routing reproduce Odoo `_inherit` MRO (C3 linearization) +across mixin diamonds? `[H]` — gate F1 below. Named failure mode: if C3 +order matters where parent-first routing differs, the fix is +`Class.mixins` **ordering** doing C3, not the supervisor. + +--- + +## 4. Content — strings become as cheap as CAM-PQ (the tier cascade) + +The SoA row never carries a string; it carries a **ref + tier byte** +(12 B fixed): `{class_id:u16, field_id:u16, tier:u8, value_ref:u64}`. +Resolution happens only at the display edge (`render_rows`, O(window)). + +| Tier | Stores | Ref | Backend | Status | +|---|---|---|---|---| +| T0 | schema labels (class/field/relation/enum) | 4 B | `OgitFamilyTable` (sparse `HashMap`) | **[G]** #364 | +| T1 | common English tokens | 12 b/word | deepnsm 4096-COCA (98.4% coverage) | **[G]** | +| T2 | top-256 values per `(class, field)` | 1 B | `bgz17::palette` per-pair codebooks | **[G] infra / [H] per-class palettes undeclared** | +| T3 | semantic text (meaning-bearing) | 48 b | CAM-PQ 6×256 (`contract::cam::CodecParams`) | **[G] codec / [H] text-encoder pre-pass** | +| T4 | unique-but-recurrent strings (names) | 4 B | Arrow `DictionaryArray` in a Lance pool dataset | **[H]** — upstream-free, contract surface unwritten | +| T5 | long-tail blobs | 8 B (content hash) | Lance blob, content-addressed | **[H]** contract unwritten | + +**The binding** (Track O5): `Attribute.content_tier: Tier` on the THINK +arm + a `contract::content_store::{ContentRef, Tier, ContentResolver}` +slice (~300 LOC) + one round-trip test across all six tiers (gate F7). +Iron rule throughout: **bundle identities, never content** +(I‑VSA‑IDENTITIES); the GUID/refs point, the stores hold. + +--- + +## 5. The phased dependency DAG (one merged sequence) + +``` + ┌── Q1 quasicryth vs D-MONOTILE (leaf, read-only) ──→ feeds O6 +THEORY ├── Q2 spectral anti-moiré (jc P3 + hpc::fft) [per rt] + └── Q3 helix fidelity ≥0.9980 (TD-HELIX-OVERLAP-1) [per rt] + +IDENTITY A NodeGuid ✅(#480) ──→ B SchemaSig→ClassView live ─┐ +(lance- │ ├─→ D cognitive-write TripletProjection + graph └────────── C impl SoaEnvelope for MailboxSoA ──────┘ + roundtrip_eq (the account.move + N-arc) (KEYSTONE — leaf, unblocks D) fixture = gate F1+F5) + │ + G GUID-as-EntityKey (parallel off A) ▼ + E project_graph through commit_event + │ + ▼ + F MetadataStore string→identity + H SurrealQL read glove ─ BLOCKED(C) fork coords (only blocked phase) + +OGAR O1 Class traversal API (leaf, ~50 LOC) ──→ O3 ogar-python (Odoo) + └────→ O4 ruby producer decision + O2 parse walk completion (EnumDecl lift · DEFINE EVENT→ActionDef · non-owning post-pass) + O5 content_tier + ContentResolver (needs T-backends: all exist) + O6 ADR-026 draft (ready bucket; enriched by Q1's verdict) + O7 String→Identity lift (pairs with Phase B mint) + +DO-AXIS R1 verify state_machine + Rubicon binding (other session has the ball) + R2 ActionDef → state_machine lowering codegen (needs R1) + R3 account.move MRO falsification (needs C, D, R2) ← THE make-or-break + R4 supervision routing wired by prefix (with R2) + +RECONV X1 rename thinking_engine::CausalEdge64 → CascadeEvent64 (feature-gated) +(lance- X2 LE byte contract on canonical CausalEdge64 + SoaEnvelope tie-in + graph X3 D-MBX-2 ResonanceDto fold into MailboxSoA columns + debt) X4 HEEL/HIP/TWIG/LEAF route-by-prefix (closes q4 audit + D-BGZ17 §4.1 gap) + X5 TD-UNBUNDLE-FROM-1 raw-sum+count fix + X6 TD-ARIGRAPH-EPISODIC-FIDELITY-1 (Option B = W-slot convergence, D-CSV-6/7) + +HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) + H2 DISCOVERY-MAP folds: D-IDENTITY-PIN [G] · §4.1 supervisor-edge promotion · + D-META64 rename cross-note · this map's cross-link + H3 lance-graph board prepends #477-480 (CLAUDE.md mandate; formally incomplete until done) + H4 merge order: #47 before #48 (SYN links) +``` + +**Critical path to the falsification that matters:** +`C → D → (R1 → R2) → R3`. Everything else is parallel or feeds ADR-026. +**Leaf bricks available today:** Q1, O1, C, X1, H1–H4. + +--- + +## 6. Falsification gates — every load-bearing `[H]` with its named test + +| # | Gate | Test | Promotes / falsifies | +|---|---|---|---| +| F1 | **MRO/supervision equivalence** | `account.move` fixture: parent=`mail.thread`; send `message_post` (must escalate up the edge and fire there) + `action_post` (must fire locally; `on_enter` writes `state→posted`; `results_in` lands as a baton) | D‑OTP‑INHERIT `[H]→[G]` or names the C3-ordering fix | +| F2 | **Monotile addressability** | read `quasicryth-research/{tiling,hierarchy}.rs` + run `tests/paper_theorems.rs`; 5+3 pass vs the Kaplan/Walker/Richter ladder | D‑MONOTILE cascade-addressability `[H]→[G]` or concrete failure shape | +| F3 | **Spectral anti-moiré** | jc P3 (φ-Weyl) + `hpc::fft`: golden-tile spectrum pre/post quantization vs Base17 | D‑MOIRE/D‑MANTISSA `[H]→[G]` or falsified; D‑QUANTGATE contrast demo | +| F4 | **Eineindeutigkeit** | registry mint uniqueness + build-time `(entity_type ↔ NiblePath)` round-trip (Phase B); GUID prefix-consistency already green (Phase A) | S1 `[H] mint → [G]` | +| F5 | **Round-trip integrity** | `roundtrip_eq` over the identity graph; corrupt-pack must FAIL; NARS `(f,c)` within 1/1023 (Phase D DoD) | S8 path trustworthy | +| F6 | **Zero-copy geometry** | `SoaEnvelope::verify_layout()` green + `as_le_bytes().as_ptr()==backing` on `MailboxSoA` (Phase C DoD) | S7 `[H]→[G]` | +| F7 | **Content cascade round-trip** | build row → ref in SoA → `render_rows` → decode across T0–T5 → byte-equal | O5 ships or tier table revises | +| F8 | **Helix fidelity** | naive-u8 floor ≥0.9980 Pearson vs ground truth (CONJECTURE — NOT RUN) | helix graduates clean-room | +| F9 | **kv-lance resolution** | fork PR bumps the three `=6.0.0` pins → workspace `=7.0.0` resolves | unblocks the Surreal storage leg (and de-risks N8) | + +**Discipline** (the lance-graph probe rule, adopted): *if the relevant +probe is NOT RUN, the next deliverable is the probe, not more synthesis.* + +--- + +## 7. Ownership & work-shape + +| Track | Owner | Shape | +|---|---|---| +| Q1, O1–O7, H1–H2, H4 | **this session (OGAR)** | docs + small additive contract slices; 5+3-hardened regrades | +| A–H (identity arc), X1–X6, H3 | **lance-graph sessions** | phased landable PRs per the N-plan; board hygiene per CLAUDE.md | +| R1–R2 (state_machine + binding) | **runtime / other session** (has the ball) | first-hand verify, then the lowering codegen | +| F9 (kv-lance pins) | **surrealdb fork session** | one Cargo.toml PR | +| N8 / fork-coords, ADR-026 go, O4 build-vs-reuse | **operator decisions** | the only human gates | + +**Not read first-hand yet (honest fence):** `quasicryth-research/*` +contents; `ractor_actors::state_machine` internals; #480's `mul.rs` / +`recipes.rs` / `savants.rs` bodies (diffstat only); nexgen's +`INTEGRATION_PLAN.md` (other session read it). Nothing in this map +*depends* on their contents; F2/R1 read them before any regrade. + +--- + +## 8. Intersecting debt (blocks or is blocked by this map) + +| Debt | Intersects | Why it matters here | +|---|---|---| +| TD‑SURREALDB‑KVLANCE‑LANCE7 | S2/S4/N8 | kv-lance can't resolve against the workspace until pins move | +| TD‑UNBUNDLE‑FROM‑1 | runtime gestalt | silent ~1 bit/epoch corruption under the same SoA this map lands on | +| TD‑ARIGRAPH‑EPISODIC‑FIDELITY‑1 | §0 endgame | episodic retrieval currently the RAG baseline, not eq.1 structural — the THINK memory the DO axis consults | +| TD‑RESONANCEDTO‑DUP‑1 | X3 | stranded DTO vs column doctrine | +| TD‑HELIX‑OVERLAP‑1 | Q3/F8 | fidelity probe owed before promotion | +| TD‑WIKI‑SCALE | S1/identity | `StructuralSignature` u32 birthday (~77k) + NiblePath depth-16 ceiling — both bite at load scale; widen/escape paths named | +| TYPE_DUPLICATION §13 (CausalEdge64 ×2) | X1/X2 | same name, two semantics — rename + byte contract | + +--- + +## 9. Blocked & open decisions (the complete list) + +1. **N8 fork coords** — BLOCKED(C), human gate (lance-graph P0 "STOP and ask"). +2. **ADR-026 go** — ready bucket complete; recommend after F2 (Q1) so the monotile verdict pins with it. +3. **O4** — build `ogar-from-ruby` vs reuse nexgen's ruff path (recommend: reuse; it's CODED and on the same spine). +4. **S11 first consumer** — `RouteBucketTyped` needs one genuine non-Odoo impl or it's YAGNI (candidate: Wikidata-HHTL or the OP target). +5. **#47 → #48 merge order** — operator action; H1 must land on #47 first. + +--- + +## 10. Maintenance + +Same five rules as `DISCOVERY-MAP.md §6` (append-only; terse; grade +honestly — `[S]` stays `[S]` until a measurement; this map points, never +re-derives; the map mirrors the substrate). Plus one of its own: +**every seam row must name its contract TYPE** — a seam described only +in prose is a seam that will fork. From 0fa72f92686ba7a25ccc982334021deac1215dde Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 20:37:41 +0000 Subject: [PATCH 02/18] =?UTF-8?q?docs(integration-map):=20v1.1=20=E2=80=94?= =?UTF-8?q?=20hardened=20by=20the=205+3=20savant=20pass=20+=20G-pass=20log?= =?UTF-8?q?ic=20audit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The freshly shipped map was run through the full hardening pattern: 5 research savants improved it, a main-thread logic audit (G-pass) closed reasoning gaps the calibration lenses don't cover, and the 3 brutally-honest reviewers recalibrated the result (warden GATE: PASS). Savant findings folded: - L0b capacity-ceilings table (new): entity_type u16 = 65,536 classes; shape_hash 22 b; local 24 b (minting scope unspecified — pin first); FieldMask u64 = 64 fields -> BLOCKER: account.move carries 109 field declarations (counted first-hand, Odoo 17) so THINK render silently drops 45+ -> Track X7 + gate F14; niblepath_prefix consistent. - Delegation lineage corrected: routing-on-miss is prototype-chain DELEGATION (Self, Lieberman 1986; JS __proto__) carried ON the supervision topology — NOT an OTP behavior (OTP supervisors restart, they do not dispatch). One tree, two orthogonal semantics; R2/R4 must wire delegation explicitly. - Odoo truth: _inherit = LastOrderedSet declaration-order base assembly + Python C3 over THAT tuple — F1 must replicate the assembly and MUST include a diamond (C3 picks C, parent-first picks A; single-chain mail.thread cannot falsify). - T0-T5 reframed: routing buckets by value population, not fidelity tiers; ref-cell corrected to 13 B packed / 16 B repr(C) ("12 B" was an arithmetic error). - Lance semantics: DatasetVersion = self-contained snapshot; last_active_cycle = per-row RECENCY stamp (WHEN, not WHAT) — Phase E watermark-filters, never diff-reconstructs. D-DELTA mechanism stays [G]; only the label is corrected (intra-file fork in §0 also fixed). - Gates F10-F14 added: the jc x hpc floor (probe-free depth law, palette/CAM rho anchors, theta window, 1-ULP backend parity) that v1.0 omitted — the keeper's reverse-miss — plus the wide-model render gate. - Receipts: S5 first-hand (op-codegen-projection lib.rs:213); S8 marks EdgeGuid ABSENT; S11 regraded ABSENT on main (RouteBucketTyped did not land); SoaEnvelope = zero PRODUCTION impls; Baton 13+10n header verified from collapse_gate.rs:114-124; D-META64 split into its [G] fact and still-[H] reconciliation. - Track O7 (String->Identity lift; shipped parent is Option, ogar-vocab lib.rs:95) PROMOTED to critical path. G-pass logic audit (reasoning gaps, beyond calibration): - Phase B (registry mint) JOINED the critical path — without it R2's routing and instance GUIDs can disagree silently; R1 is a parallel read, not downstream of O7. - Diamond != prefix-tree: is_ancestor_of covers only the single-parent spine; multi-_inherit needs an ORDERED mixins traversal (absent — exactly what F1(b) gates). Invocation validity = object_class is_ancestor_of instance.class, not equality. - shape_hash risk-model corrected: comparisons are same-class temporal only; the birthday-over-all-classes figure answered the wrong population; residual miss ~2^-22 per schema change. Decision reframed to a use-invariant pin. - F2 bridge condition: crate-tiling addressability promotes D-MONOTILE only if hat-equivalent (or provably generalizes) — else vacuous. - F14 run-gate: cannot run until Phase B wires the field-enum. - NiblePath flavor check (new §9.9): OGAR contract "27-bit segments" vs lance hhtl.rs 4-bit nibbles — confirm same-or-mapped BEFORE the Phase B mint (the CausalEdge64 name-collision lesson, preemptive). Reviewer trio: firewall-warden GATE PASS (PII clean, no model ids, no hot-path serialization, no prohibited shell); dilution-collapse-sentinel 2 catches fixed (intra-file frame/delta fork; H2 fold list completed with D-MONOTILE tightening + D-DELTA site enumeration); overclaim- auditor 4 FIX + 3 NIT applied (109 fields now MEASURED not folklore; tenant-year volume assumption stated; "no typed edge" softened to the honest mint-coupling alternative; lineage label precision). Docs-only. PII abort-guard (word-boundary): CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/INTEGRATION-MAP.md | 186 ++++++++++++++++++++++++++++++---------- 1 file changed, 139 insertions(+), 47 deletions(-) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 3485f1d..4dc2e57 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -1,6 +1,11 @@ # INTEGRATION MAP — how the substrate composes across repos -> **Status: LIVING MAP** (2026‑06‑09). Companion to `DISCOVERY-MAP.md` — +> **Status: LIVING MAP v1.1** (2026‑06‑09; v1.1 = hardened by the 5+3 +> savant pass — capacity ceilings L0b, delegation lineage corrected, gates +> F10–F14, Track O7 promoted — **plus the G-pass logic audit**: B joined +> the critical path, diamond ≠ prefix-tree named, shape_hash risk-model +> corrected, F2 bridge condition, F14 run-gate, NiblePath flavor check). +> Companion to `DISCOVERY-MAP.md` — > the discovery map indexes *what was found*; **this maps *how it > composes*: layers, seams, phases, gates.** Implementation follows this > map; the map precedes the code (the "document before it dilutes" @@ -30,7 +35,10 @@ SOURCES Odoo 17 (Python) OpenProject (Ruby/Rails) SurrealQL DDL PRODUCERS ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── ╔════════════════════ OGAR IR (the spine) ════════════════════╗ THINK arm Class { attributes, associations (4× AR kinds), enums, scopes, mixins, - parent: Option ← "subClassOf == SUPERVISION EDGE" } + methods, callbacks, validations, computed_fields, + parent — SHIPPED: Option (ogar-vocab lib.rs:95) · CONTRACT-SPEC: + Option ("subClassOf == supervision edge"); the String→Identity + lift is Track O7 — ★CRITICAL PATH, gates R2/R4 } DO arm ActionDef (separate SPO node, object_class → Class) + ActionInvocation (state: ActionState) MEMBRANE KausalSpec { StateGuard | LifecycleTrigger | Depends{paths} } ← the only place domain workflow survives IR flattening (OGAR-AST-CONTRACT §3) @@ -44,7 +52,8 @@ CONTRACT lance-graph-contract: TripletProjection · SoaEnvelope · ClassVie RUNTIME ractor: generic state_machine (OGAR-agnostic) + OGAR/Rubicon binding [R1 unverified] · MailboxSoA columns (edges/meta/qualia/entity_type) · supervision routing by NiblePath prefix (is_ancestor_of = one bit-shift) · commit_event sole-writer membrane -STORAGE Lance (DatasetVersion = frame; per-row cycle stamp = delta) · SurrealDB +STORAGE Lance (DatasetVersion = self-contained snapshot, the "frame" of other docs; + last_active_cycle = per-row RECENCY stamp, not a delta) · SurrealDB (TableDefinition::new_for_ddl → ToSql; kv-lance) · consumer stores via EntityKey(&[u8]) CONSUMERS openproject-nexgen-rs · woa-rs (Odoo) · MedCare-rs (HIPAA, label-free) · smb-office-rs · q2 ``` @@ -71,18 +80,28 @@ enter the SoA (§4). | `class_id` **aliases** the `entity_type` slot on the SoA row — no new column | soa_view.rs:47 `[per xs]` | **[G] CODED** | | Cold-path identity TODAY: `node_id:u32` + String labels (MetadataStore), `u64` content `dn_hash` (SpoStore), `CogRecord` id-less | metadata.rs:60,86 · spo/store.rs:38 · cogrecord.rs:56 | **[G] CODED but the gap NodeGuid fills** → Phase F migration | +### L0b — capacity ceilings (derived + theorem-checked, 2026‑06‑09; volume rows are estimates with stated assumptions) + +| Field | Width | Ceiling | First-consumer impact | Escape | +|---|---|---|---|---| +| `entity_type` | u16 | 65,536 classes | Odoo ~3.1k ✓; SNOMED ~350k / planet-scale ✗ | TD‑WIKI‑SCALE family; widen at the registry mint when a >64k ontology lands | +| `shape_hash` | 22 b | **G-pass risk-model correction:** comparisons are SAME-CLASS, temporal only (stored vs current hash of one class) — cross-class hashes are never compared (`entity_type` discriminates). Relevant miss = h(old)=h(new) per schema change ≈ 2⁻²² (~2.4e‑7), **negligible** | the birthday-over-all-classes figure (50% @ ~2,411) answered the wrong population | keep 22 b; PIN the use-invariant "never compare cross-class" — if that is ever violated, the birthday math applies and 22 b is too small (§9.6) | +| `local` | 24 b | 16,777,216 per minting scope — **the scope itself is UNSPECIFIED** (global per (ns, entity_type)? per tenant? per prefix?) | IF global per (ns, entity_type): `account.move.line` exceeds in ~10 tenant-years (assumes ~1.7M lines/tenant-yr vs 2²⁴ ≈ 16.8M — an estimate, not a theorem) | §9.7 = first PIN the minting scope, THEN pick the escape (prefix-shard / widen / per-tenant ns) | +| `FieldMask` | u64 | **64 fields**; positions ≥64 silently IGNORED (#441 N3, class_view.rs:76) | **BLOCKER: `account.move` carries 109 field declarations (counted first-hand, account_move.py Odoo 17 — auditor-measured) → THINK render silently drops 45+** | multi-word / paged presence — **Track X7 + gate F14** | +| `niblepath_prefix` | 16 b / 4 nibbles | depth >4 → prefix-only routing | none — falls back to `entity_type` resolve (documented in identity.rs) | ✓ | + ### L1 — The OGAR IR (the two arms + the membrane) | Piece | Shape | Status | |---|---|---| -| **THINK arm** `Class` | `{identity, name, parent: Option ("subClassOf == supervision edge"), language, mixins: Vec, store_accessors, associations, enums, scopes, callbacks, computed_fields, methods, validations, attributes}` | **[G] CODED** (`OGAR-AST-CONTRACT.md §1`; mirrors `ogar-vocab-soa` RecordBatch 1:1) | +| **THINK arm** `Class` | contract §1: `{identity, name, parent: Option ("subClassOf == supervision edge"), language, mixins, store_accessors, associations, enums, scopes, callbacks, computed_fields, methods, validations, attributes}`. **Shipped `ogar-vocab::Class.parent` is `Option` (lib.rs:95)** — the typed edge is SPEC, not shipped (the contract's "mirrors the RecordBatch schemas 1:1" claim holds *except* this parent type — that exception IS the O7 divergence) | **[G] CODED (vocab) / [H] typed-edge** — the supervision-edge binding is real only after Track O7 | | **DO arm — static** `ActionDef` | separate SPO node: `{identity, predicate, object_class → Class, default_subject/temporal/modal, kausal: KausalSpec, method_body, results_in: StateTransition, on_enter: EnterEffect, guard_failure_policy, state_timeout_millis}` | **[G] CODED** (§1; statem terms landed OGAR PR #10) | | **DO arm — dynamic** `ActionInvocation` | `{identity, realizes → ActionDef, state: ActionState (Pending→Committed/Failed/Cancelled), subject, object_instance, lokal, idempotency_key, trace_id, parent_invocation, emitted_at_millis, failure_reason}` | **[G] CODED** (§1) | | **The membrane** `KausalSpec` | `StateGuard{field,value} \| LifecycleTrigger \| DependsPath \| None` — *"the only place a domain workflow survives the IR flattening"*; lifecycle (machine) ≠ workflow (data) | **[G] CODED + doctrine** (§3: *"Lifecycle formalized; workflow as data"*) | | **The four AR primitives** `AssociationKind` | `BelongsTo / HasOne / HasMany / HasAndBelongsToMany` — cross‑ORM: Rails verbatim; Odoo `Many2one/One2many/Many2many` (has_one = One2many constrained to 1) | **[G] CODED** `ogar-vocab/src/lib.rs:655-664` | | `Association` full option set | `class_name, foreign_key, polymorphic, through, source, as_target, dependent` (app-level) **separate from** `ondelete` (DB-level), `optional, inverse_of, before/after_add/remove, scope_source, auto_join, context_source, check_company, delegate` | **[G] CODED** `lib.rs:672-732` | | **Traversal vocabulary** `::includes / ::memberof() / ::members() / ::groups::members()` | methods on `Class` (`member_of(name)`, `members(name)`, `group_members(name)`, `includes()`, `associations_of(kind)`, `members_through(name)`) — per The Click: methods on the carrier, never free functions | **ABSENT** — the data is there, the API isn't. **Track O1**, ~50 LOC | -| **Two `Class` shapes** | producer-side `ogar-vocab::Class` (`parent: Option`) vs canonical contract §1 (`parent: Option`) — the String→Identity lift | **[G] divergence named** `[per xs]` → **Track O7** (pairs with registry mint + lance-graph D-ODOO-BP-1c/d/e) | +| **Two `Class` shapes** | producer-side `ogar-vocab::Class.parent: Option` (**verified first-hand, lib.rs:95**) vs canonical contract §1 `Option` — the String→Identity lift | **[G] divergence** → **Track O7, ★PROMOTED to critical path**: until it lands, the IR carries no typed edge — R2/R4 would lean on mint-side name resolution; land O7 or name that coupling (pairs with the registry mint + D-ODOO-BP-1c/d/e) | ### L2 — Producers (source → IR) @@ -108,11 +127,11 @@ enter the SoA (§4). | Piece | Status | |---|---| | `TripletProjection` + `roundtrip_eq → RoundTripFailure` (codegen_spine.rs:107) | **[G] trait** — impls: `op-codegen-projection` **[G per xs]**; odoo blueprint **CLAIMED**; cognitive-write **ABSENT → Phase D** | -| `SoaEnvelope` + `ColumnDescriptor` (byte-geometry ONLY; "width only — no domain meaning"; `name_id` is an ordinal, NOT a string) | **[G] trait / [H] ZERO impls** → **Phase C is the keystone gate** | +| `SoaEnvelope` + `ColumnDescriptor` (byte-geometry ONLY; "width only — no domain meaning"; `name_id` is an ordinal, NOT a string) | **[G] trait / [H] zero PRODUCTION impls** (only `#[cfg(test)] TestEnvelope`, soa_envelope.rs:266) → **Phase C is the keystone gate** | | `ClassView` (resolve-late from OGIT cache) + `FieldMask(u64)` presence + `FieldMask::inherit(delta)` = the HHTL `subClassOf` walk as bitwise parent-OR-delta | **[G] CODED** (#441) | | Rubicon kanban: `KanbanColumn`(6: Planning/CognitiveWork/Evaluation/Commit/Plan/Prune), `KanbanMove ≤16B`, `ExecTarget`(Native/Jit/SurrealQl/Elixir), `MailboxSoaOwner::try_advance_phase()` (checked DAG), Libet −550 ms anchor | **[G] CODED** (#437) | | 34 `Tactic` kernels over `ThoughtCtx` (the executable bodies DO dispatches into) | **[G] CODED** (#411) | -| Batons: `CollapseGateEmission` `(u16, CausalEdge64)`; `wire_cost_bytes()=13+10·n` | **[G] CODED** — the Firewall's hot-path carrier | +| Batons: `CollapseGateEmission` `(u16, CausalEdge64)`; `wire_cost_bytes()=13+10·n` — header 13 B = `source_mailbox u32 + chain_position u32 + merge_mode u8 + 4 B reserved` (**verified** collapse_gate.rs:114-124); 10 B/baton = u16+u64 | **[G] CODED + arithmetic verified** — the Firewall's hot-path carrier | ### L5 — Runtime (ractor + mailbox + membrane) @@ -120,8 +139,8 @@ enter the SoA (§4). |---|---| | Generic `state_machine` crate (ractor_actors) — OGAR-agnostic; `Context` opaque; `on_enter` → `CommitHook` | **CLAIMED** (contract §0; runtime-session-owned) → **Track R1: verify first-hand** | | OGAR/Rubicon binding (fills Context/Event/State; the callcenter codegen lands here; "the class IS the actor spec — the actor is *generated from* the `Class`") | **CLAIMED** → **R2** | -| Supervision routing by NiblePath prefix (`route` reading of NodeGuid; one bit-shift) | **[G] mechanism** (identity.rs + hhtl.rs) / **[H] wiring** → R2/R4 | -| `MailboxSoA` columns `edges[CausalEdge64;N]` / `meta[MetaWord;N]` / `qualia` / `entity_type` — edges and meta SEPARATE (D‑META64 revision holds) | **[G] CODED** `[per rt]` (#477) | +| Routing-on-miss up the parent edge by NiblePath prefix (`route` reading of NodeGuid; one bit-shift) — **prototype-chain DELEGATION semantics (Self/Smalltalk lineage), NOT OTP message routing**: OTP supervisors restart on failure, they do not dispatch | **[G] mechanism** (identity.rs + hhtl.rs) / **[H] wiring** → R2/R4 must wire delegation explicitly; restart coverage ≠ dispatch coverage | +| `MailboxSoA` columns `edges[CausalEdge64;N]` / `meta[MetaWord;N]` / `qualia` / `entity_type` — edges and meta SEPARATE (**that fact is [G]**; D‑META64's bit-budget reconciliation to `MetaWord` is **still [H]/REVISE** — this row does not close it) | **[G] CODED** `[per rt]` (#477) | | `commit_event` sole-writer + `ExternalMembrane::project` + `CommitFilter`/`MembraneGate`; today emits scalar `CognitiveEventRow` | **[G] CODED** (lance_membrane.rs:315) — node/edge `project_graph` **ABSENT → Phase E** | | HEEL/HIP/TWIG/LEAF cascade legend in `high_heel.rs` | **CLAIMED only** — "no code routes by prefix" (q4‑hhtl‑audit) → **Track X4** (also resolves D‑BGZ17's §4.1 unwired gap) | @@ -129,7 +148,7 @@ enter the SoA (§4). | Piece | Status | |---|---| -| Lance: `DatasetVersion(v)→(v+1)` = frame; `last_active_cycle[u32;N]` per-row stamp = changed-cell delta (D‑DELTA `[G]`) | **[G] CODED** `[per rt]` | +| Lance: `DatasetVersion(v)→(v+1)` = **self-contained immutable snapshot** (the "frame" of other docs; no delta chain — any version readable alone); `last_active_cycle[u32;N]` = **per-row RECENCY stamp** (WHEN last changed, not WHAT — consumers watermark-filter `WHERE cycle > watermark`, never diff-reconstruct; Phase E depends on this reading) (**D‑DELTA's mechanism stays [G]** — only the "changed-cell delta" *label* is corrected; fold owed, H2) | **[G] CODED** `[per rt]` | | SurrealDB fork (local `/home/user/surrealdb`): `surrealdb/{ast,parser,core}`; `TableType::{Normal,Relation,Any}` (table_type.rs:8); `TableDefinition::new_for_ddl` (catalog/table.rs:161) | **[G] CODED** upstream | | `kv-lance` pins `lance =6.0.0` vs workspace `=7.0.0` | **[G] debt** TD‑SURREALDB‑KVLANCE‑LANCE7 — blocks the kv-lance storage engine resolving; companion fork PR owed | | Consumer stores via `EntityKey<'a>(&'a [u8])` — length-agnostic; smb `key_to_filter` branches on length (12→ObjectId, else Binary); a 16-byte GUID is "just another length" | **[G] CODED** (repository.rs:12; smb mongo.rs:79/lance.rs:92; MedCare dms.rs:14) → **Phase G** wiring | @@ -149,17 +168,17 @@ enter the SoA (§4). | # | Seam | Producer side | Consumer side | Contract type | Status | |---|---|---|---|---|---| -| S1 | **class identity ↔ instance identity** | OGAR `Identity` (NiblePath) | lance-graph `NodeGuid` | registry mint `(entity_type ↔ NiblePath)` bijection | **[G] type / [H] mint** (Phase B) | +| S1 | **class identity ↔ instance identity** | OGAR `Identity` (NiblePath) | lance-graph `NodeGuid` | registry mint `(entity_type ↔ NiblePath)` bijection | **[G] type / [H] mint** (Phase B) — **G-pass OPEN CHECK: "NiblePath" may be two structures sharing one name** (OGAR contract §1: "27-bit segments"; lance hhtl.rs: 4-bit nibbles ×16) — confirm same-or-mapped BEFORE the mint (§9.9; the CausalEdge64 name-collision lesson, applied preemptively) | | S2 | **IR → SurrealQL DDL** | `emit_surrealql_ddl` | SurrealDB `DEFINE TABLE/FIELD` | DDL string; future body = `TableDefinition::new_for_ddl` | **[G] wired** | | S3 | **SurrealQL DDL → IR** | surrealdb-parser AST | `walk_query → Vec` | `Parser::enter_parse::` (depth 1000) | **[H] partial walk** (O2) | | S4 | **knowable_from** (the four-clock pin) | `ogar-adapter-surrealql` stamps at DDL registration | `lance-graph-planner::temporal::classify` deinterlaces (lance version / schema / awareness / thinking) | `LanceVersion` via `KnowableFromWriter` | **[G] pin (ADR‑010) / [H] Lance writer impl**; consumer `temporal.rs` landed #479 | -| S5 | **AR source → SPO → DDL** | `ruff_openproject` | `op-codegen-projection` | `lance_graph_contract::codegen_spine::TripletProjection` | **[G] CODED** `[per xs]` | -| S6 | **ActionDef → runtime** | OGAR DO arm | `ractor_actors::state_machine` via the OGAR/Rubicon binding (`CommitHook`; Context opaque) | the §0 two-layer contract | **CLAIMED → R1/R2** | +| S5 | **AR source → SPO → DDL** | `ruff_openproject` | `op-codegen-projection` | `lance_graph_contract::codegen_spine::TripletProjection` | **[G] CODED first-hand** — `impl TripletProjection for OpSurrealProjection`, op-codegen-projection/src/lib.rs:213 | +| S6 | **ActionDef → runtime** | OGAR DO arm | `ractor_actors::state_machine` via the OGAR/Rubicon binding (`CommitHook`; Context opaque) — delegation-on-miss is OGAR's own dispatch design, **not** an OTP behavior; R1 verifies the binding wires it explicitly | the §0 two-layer contract | **CLAIMED → R1/R2** | | S7 | **mailbox bytes ↔ cold bytes** | `MailboxSoA` | Lance columnar | `SoaEnvelope` (`as_le_bytes().as_ptr()==backing`; `verify_layout()`) | **[H] ZERO impls → Phase C (keystone)** | -| S8 | **cycle → graph** | committed cycle | queryable `NodeGuid` nodes + `EdgeGuid` edges | `project_graph` through `commit_event`+gate | **ABSENT → Phase E** | +| S8 | **cycle → graph** | committed cycle | queryable `NodeGuid` nodes + edge ids (**`EdgeGuid` itself ABSENT** — only `NodeGuid` shipped; EdgeGuid is Phase‑E design surface, not code) | `project_graph` through `commit_event`+gate | **ABSENT → Phase E** | | S9 | **GUID → consumer store** | any | smb/MedCare/Lance | `EntityKey(guid.as_bytes())` | **[G] transport / [H] 16-byte wiring** (Phase G) | | S10 | **content display** | SoA refs | rendered strings | `ClassView::render_rows` + tier dispatch (§4) | **[G] render / [H] tier byte** (O5) | -| S11 | **kind-generic codegen** | non-Odoo targets | `RouteBucketTyped` (sidecar WIP, +228 uncommitted, other session's) | blanket impl preserves `RouteBucket` | **[H] WIP — needs first consumer** | +| S11 | **kind-generic codegen** | non-Odoo targets | `RouteBucketTyped` | blanket impl preserves `RouteBucket` | **ABSENT on main @ `62bca5e`** — the +228 working-tree WIP did not land (superseded or dropped); re-confirm with its session before planning on it | | S12 | **PII boundary** | OGAR/OGIT labels | MedCare | label-free leaf-rename at adapter (D‑PII) | **[G] CODED** | --- @@ -171,7 +190,12 @@ aggregate `{attributes, associations, computed_fields, enums, scopes}` over `parent` + `mixins` edges; child shadows parent by identity slot (Odoo `_inherit` semantics); presence at the row = `FieldMask`, and `FieldMask::inherit(delta)` IS the subClassOf walk done as bitwise -parent-OR-delta. Pre-computable per class at OGIT-classification time. +parent-OR-delta — **structural presence only** (monotone union; a child +cannot structurally remove a parent field, and view-layer hiding like +Odoo `invisible=` is a display-side concern NOT representable in the +mask). Pre-computable per class at OGIT-classification time. Capacity +caveat: the mask is u64 — see **L0b / gate F14** for the >64-field +blocker on wide Odoo models. Labels resolve LATE from the OGIT cache (`ClassView`); **zero labels in the SoA bytes**. @@ -179,10 +203,25 @@ the SoA bytes**. `action_defs` — that model is **dead** (corrected from source). `ActionDef`s are independent SPO nodes keyed `object_class → Class`. Resolution = *runtime routing*: lookup `WHERE object_class = me`; on -miss, the **supervisor routes the invocation up the `parent` edge** -("subClassOf == supervision edge") — OTP's "route up" doctrine as -substrate topology, mechanically a NiblePath-prefix `is_ancestor_of` -bit-shift (NodeGuid's `route` reading). Effects land as `CausalEdge64` +miss, **walk the `parent` edge upward** — mechanically a NiblePath-prefix +`is_ancestor_of` bit-shift (NodeGuid's `route` reading). **Lineage +correction (5+3 pass): this is prototype-chain DELEGATION (Self, +Lieberman 1986; JS `__proto__`; Smalltalk's `doesNotUnderstand:` as the +class-chain cousin) carried +ON the supervision topology — it is NOT an OTP behavior.** OTP +supervisors restart on failure; they do not route unhandled messages. +One tree serves two orthogonal semantics (fault containment AND +delegation); R2/R4 must wire delegation explicitly — restart coverage +does not grant dispatch coverage. **Two G-pass invariants:** (1) prefix +ancestry is a TREE relation — the `is_ancestor_of` bit-shift covers only +the single-`parent` spine; **diamonds (multi-`_inherit`) have no prefix +encoding** and require an ORDERED `mixins` traversal — a second +mechanism, currently ABSENT, and precisely what F1(b) gates (the +bit-shift alone cannot pass it). (2) A delegated fire makes +`ActionDef.object_class` an ANCESTOR of the instance's class — +invocation validity must check `object_class is_ancestor_of +instance.class`, not equality, or every inherited fire is rejected. +Effects land as `CausalEdge64` batons; lifecycle = `ActionState` on `ActionInvocation`; domain workflow = guarded `on_enter` effect at the `Pending→Committed` crossing. @@ -195,18 +234,31 @@ ground-truth / dispatch-to-store — five register reads of one frozen key; write-once; drift repair = new immutable Lance version. **Open falsification (the architecture's make-or-break):** does -supervisor routing reproduce Odoo `_inherit` MRO (C3 linearization) -across mixin diamonds? `[H]` — gate F1 below. Named failure mode: if C3 -order matters where parent-first routing differs, the fix is -`Class.mixins` **ordering** doing C3, not the supervisor. +delegation routing reproduce Odoo `_inherit` resolution? `[H]` — gate F1. +Two grounded sharpenings (5+3 pass): **(1) Odoo is NOT naive C3 over the +source hierarchy** — `_build_model` assembles bases in `LastOrderedSet` +declaration/install order, then Python's C3 runs over THAT tuple; F1 must +replicate the assembly, not assume source-order C3. **(2) The fixture +needs a diamond**: D(B,C), B(A), C(A), method on A and C only — C3 order +`[D,B,C,A]` picks **C**; naive parent-first `[D,B,A,C]` picks **A**. A +single-chain `mail.thread` test cannot falsify. Named failure mode: if +the orders diverge, the fix is `Class.mixins` **ordering** carrying the +linearization — not the delegation walk itself. --- -## 4. Content — strings become as cheap as CAM-PQ (the tier cascade) +## 4. Content — strings become as cheap as CAM-PQ (the tier ROUTING table) -The SoA row never carries a string; it carries a **ref + tier byte** -(12 B fixed): `{class_id:u16, field_id:u16, tier:u8, value_ref:u64}`. -Resolution happens only at the display edge (`render_rows`, O(window)). +**Framing correction (5+3 pass): T0–T5 are routing buckets by value +POPULATION, not fidelity tiers of one object.** A T4 dict entry is not a +lossy T5; there is no early-exit certificate. The codec cascade +(Full→…→Scent) downsamples the SAME object; this table PARTITIONS the +value space — related in spirit, different in mechanism. The SoA row +never carries a string; it carries a **ref-cell** +`{class_id:u16, field_id:u16, tier:u8, value_ref:u64}` — **13 B packed / +16 B `repr(C)`** (state the layout attribute explicitly; "12 B" was an +arithmetic error caught by the pass). Resolution happens only at the +display edge (`render_rows`, O(window)). | Tier | Stores | Ref | Backend | Status | |---|---|---|---|---| @@ -228,7 +280,9 @@ Iron rule throughout: **bundle identities, never content** ## 5. The phased dependency DAG (one merged sequence) ``` - ┌── Q1 quasicryth vs D-MONOTILE (leaf, read-only) ──→ feeds O6 + ┌── Q1 quasicryth vs D-MONOTILE (leaf; the crate self-identifies as the + │ Quasicryth transcode, arXiv 2603.14999 — substitution hierarchy + + │ deep-position, purpose-built for F2) ──→ feeds O6 THEORY ├── Q2 spectral anti-moiré (jc P3 + hpc::fft) [per rt] └── Q3 helix fidelity ≥0.9980 (TD-HELIX-OVERLAP-1) [per rt] @@ -244,12 +298,17 @@ IDENTITY A NodeGuid ✅(#480) ──→ B SchemaSig→ClassView live ─┐ F MetadataStore string→identity H SurrealQL read glove ─ BLOCKED(C) fork coords (only blocked phase) -OGAR O1 Class traversal API (leaf, ~50 LOC) ──→ O3 ogar-python (Odoo) - └────→ O4 ruby producer decision +OGAR O1 Class traversal API (leaf, ~50 LOC) ──→ O2's non-owning post-pass + (G-pass: the real dependent — producers BUILD, consumers NAVIGATE; + O3/O4 benefit from O1 but are not gated by it) O2 parse walk completion (EnumDecl lift · DEFINE EVENT→ActionDef · non-owning post-pass) + O3 ogar-python (Odoo) · O4 ruby producer decision (build vs reuse nexgen ruff) O5 content_tier + ContentResolver (needs T-backends: all exist) O6 ADR-026 draft (ready bucket; enriched by Q1's verdict) - O7 String→Identity lift (pairs with Phase B mint) + O7 String→Identity lift — ★PROMOTED TO CRITICAL PATH: shipped parent is + Option (lib.rs:95); until O7, the IR carries no typed edge — + routing would lean on mint-side name resolution (Phase B); land O7 + or name that coupling explicitly DO-AXIS R1 verify state_machine + Rubicon binding (other session has the ball) R2 ActionDef → state_machine lowering codegen (needs R1) @@ -262,17 +321,33 @@ RECONV X1 rename thinking_engine::CausalEdge64 → CascadeEvent64 (feature-g debt) X4 HEEL/HIP/TWIG/LEAF route-by-prefix (closes q4 audit + D-BGZ17 §4.1 gap) X5 TD-UNBUNDLE-FROM-1 raw-sum+count fix X6 TD-ARIGRAPH-EPISODIC-FIDELITY-1 (Option B = W-slot convergence, D-CSV-6/7) + X7 FieldMask widening — multi-word / paged presence (the >64-field + BLOCKER, L0b; gates F14 and real Odoo THINK rendering) HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) - H2 DISCOVERY-MAP folds: D-IDENTITY-PIN [G] · §4.1 supervisor-edge promotion · - D-META64 rename cross-note · this map's cross-link + H2 DISCOVERY-MAP folds: D-IDENTITY-PIN [G] · §4.1 wording → delegation-on- + supervision-topology (5+3 lineage fix) · D-META64 split note (separate + columns [G]; bit-budget reconciliation still [H]) · D-DELTA rewording + (recency stamp, not delta — enumerate ALL its sites in the map, 4+) · + D-MONOTILE promotion-condition tightening (Walker-addressable leg + required; a 5+3 pass alone does not promote — mirror of F2) · + birth D-DELEG-INHERIT (né D-OTP-INHERIT) · this map's cross-link H3 lance-graph board prepends #477-480 (CLAUDE.md mandate; formally incomplete until done) H4 merge order: #47 before #48 (SYN links) ``` -**Critical path to the falsification that matters:** -`C → D → (R1 → R2) → R3`. Everything else is parallel or feeds ADR-026. -**Leaf bricks available today:** Q1, O1, C, X1, H1–H4. +**Critical path to the falsification that matters (G-pass corrected):** +`(C → D)` ∥ `((R1 ∥ O7 ∥ B) → R2)` → **R3**. Two fixes over v1.1: **B +(the registry mint) joins the path** — O7 types OGAR's edge, but B is +what makes the lance-side GUID prefix agree (S1); without B, R2's +routing and the instance GUIDs can disagree silently. And **R1 is a +parallel read, not downstream of O7**. Coordination risk: R1/R2 are the +only critical-path items owned by no present session (§7). Everything +else is parallel or feeds ADR-026. (Upstream nit, keeper-found: the +identity plan's prose path `A→(B,C)→D` conflicts with its own Phase-D +dep row `A, C` — this map follows the dep rows; B gates F, S1, and now +R2 — not D.) +**Leaf bricks available today:** Q1, O1, C, X1, X7-spec, H1–H4. --- @@ -280,8 +355,8 @@ HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) | # | Gate | Test | Promotes / falsifies | |---|---|---|---| -| F1 | **MRO/supervision equivalence** | `account.move` fixture: parent=`mail.thread`; send `message_post` (must escalate up the edge and fire there) + `action_post` (must fire locally; `on_enter` writes `state→posted`; `results_in` lands as a baton) | D‑OTP‑INHERIT `[H]→[G]` or names the C3-ordering fix | -| F2 | **Monotile addressability** | read `quasicryth-research/{tiling,hierarchy}.rs` + run `tests/paper_theorems.rs`; 5+3 pass vs the Kaplan/Walker/Richter ladder | D‑MONOTILE cascade-addressability `[H]→[G]` or concrete failure shape | +| F1 | **Delegation ≡ Odoo `_inherit`** | fixture MUST include **(a)** the single chain (`mail.thread`→`account.move`: `message_post` escalates and fires on the parent; `action_post` fires locally, `on_enter` writes `state→posted`, `results_in` lands as a baton) **AND (b) a diamond** D(B,C),B(A),C(A) with the method on A and C — C3-over-`LastOrderedSet` picks C, naive parent-first picks A; replicate Odoo's declaration-order base assembly, not source-order C3 | D‑DELEG‑INHERIT (né D‑OTP‑INHERIT — lineage corrected) `[H]→[G]`, or names the mixins-ordering fix | +| F2 | **Monotile addressability** | read `quasicryth-research/{tiling,hierarchy}.rs` + run `tests/paper_theorems.rs` (crate self-identifies, lib.rs:1-42, as the Quasicryth transcode, arXiv 2603.14999 — substitution hierarchy + deep-position, purpose-described for exactly this); cross-examine vs Kaplan/Walker/Richter | promotes `[H]→[G]` **only if the substitution hierarchy is shown generalized-Morton/Hilbert-addressable (the Walker leg) AND the crate's tiling is the hat / hat-equivalent class (or the addressing provably generalizes)** — otherwise the pass is vacuous for D‑MONOTILE (G-pass bridge condition); a 5+3 pass alone does NOT promote; failure = a concrete shape | | F3 | **Spectral anti-moiré** | jc P3 (φ-Weyl) + `hpc::fft`: golden-tile spectrum pre/post quantization vs Base17 | D‑MOIRE/D‑MANTISSA `[H]→[G]` or falsified; D‑QUANTGATE contrast demo | | F4 | **Eineindeutigkeit** | registry mint uniqueness + build-time `(entity_type ↔ NiblePath)` round-trip (Phase B); GUID prefix-consistency already green (Phase A) | S1 `[H] mint → [G]` | | F5 | **Round-trip integrity** | `roundtrip_eq` over the identity graph; corrupt-pack must FAIL; NARS `(f,c)` within 1/1023 (Phase D DoD) | S8 path trustworthy | @@ -289,6 +364,16 @@ HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) | F7 | **Content cascade round-trip** | build row → ref in SoA → `render_rows` → decode across T0–T5 → byte-equal | O5 ships or tier table revises | | F8 | **Helix fidelity** | naive-u8 floor ≥0.9980 Pearson vs ground truth (CONJECTURE — NOT RUN) | helix graduates clean-room | | F9 | **kv-lance resolution** | fork PR bumps the three `=6.0.0` pins → workspace `=7.0.0` resolves | unblocks the Surreal storage leg (and de-risks N8) | +| F10 | **Probe-free depth law** | jc P5 (Jirak) + `hpc::cascade`/`reductions`: `r* = ⌈log₄(C/τ)⌉`, inclusive ≤τ acceptance | D‑RSTAR / D‑PROBEFREE `[H]→[G]` (ADR‑025 demonstrated) | +| F11 | **Palette/CAM fidelity floor** | jc P10 (Pflug) + `hpc::quantized`/`fingerprint`: re-measure the ρ anchors | ρ ≥ 0.99 against 0.9973 (HIP) / 0.965 (TWIG) — D‑PAL256/D‑CAM/D‑RHO stop being *cited*, become *re-measured* | +| F12 | **θ conditioning window** | jc P5b (Pearl 2³) + `hpc::quantized` θ-sweep | θ ∈ [1.45, 1.6] with ρ envelope [0.93..0.9973] — D‑THETA/D‑RHOENV `[H]→[G]` | +| F13 | **Backend parity** | `hpc::simd_dispatch` W1c: AVX‑512 vs NEON vs scalar | identical within **1 ULP** — the correctness floor under every gate above | +| F14 | **Wide-model render** | render `account.move` through `ClassView` with full presence (**>64 is the load-bearing bound; 109 declarations counted** in account_move.py, Odoo 17) | **gated: cannot RUN until Phase B** wires the field-enum into `RegistryClassView`; once runnable, fails by construction (FieldMask u64, L0b) until presence exceeds u64 — **Track X7 is the named path** | + +(F3 already carries the D‑QUANTGATE pre/post-quantization contrast. +F10–F13 restore the DISCOVERY-MAP §4.2 jc×hpc floor that v1.0 omitted — +the doctrine-keeper's reverse-miss finding: v1.0 gated the identity arc +but left the codec/no-collapse chain ungated.) **Discipline** (the lance-graph probe rule, adopted): *if the relevant probe is NOT RUN, the next deliverable is the probe, not more synthesis.* @@ -305,11 +390,14 @@ probe is NOT RUN, the next deliverable is the probe, not more synthesis.* | F9 (kv-lance pins) | **surrealdb fork session** | one Cargo.toml PR | | N8 / fork-coords, ADR-026 go, O4 build-vs-reuse | **operator decisions** | the only human gates | -**Not read first-hand yet (honest fence):** `quasicryth-research/*` -contents; `ractor_actors::state_machine` internals; #480's `mul.rs` / -`recipes.rs` / `savants.rs` bodies (diffstat only); nexgen's -`INTEGRATION_PLAN.md` (other session read it). Nothing in this map -*depends* on their contents; F2/R1 read them before any regrade. +**Not read first-hand yet (honest fence):** `quasicryth-research` beyond +its crate-doc (lib.rs:1-42 now read; the F2 deep-read of +tiling/hierarchy/tests is still owed); `ractor_actors::state_machine` +internals; #480's `mul.rs` / `recipes.rs` / `savants.rs` bodies (diffstat +only); nexgen's `INTEGRATION_PLAN.md` (other session read it); AriGraph +eq.1's exact formula (PDF fetch 403 — carried `[per lance-graph TD]`). +Nothing in this map *depends* on their contents; F2/R1 read them before +any regrade. --- @@ -319,10 +407,10 @@ contents; `ractor_actors::state_machine` internals; #480's `mul.rs` / |---|---|---| | TD‑SURREALDB‑KVLANCE‑LANCE7 | S2/S4/N8 | kv-lance can't resolve against the workspace until pins move | | TD‑UNBUNDLE‑FROM‑1 | runtime gestalt | silent ~1 bit/epoch corruption under the same SoA this map lands on | -| TD‑ARIGRAPH‑EPISODIC‑FIDELITY‑1 | §0 endgame | episodic retrieval currently the RAG baseline, not eq.1 structural — the THINK memory the DO axis consults | +| TD‑ARIGRAPH‑EPISODIC‑FIDELITY‑1 | §0 endgame | episodic retrieval currently the RAG baseline, not eq.1 structural — the THINK memory the DO axis consults (eq.1 cited per that TD entry; not re-verified first-hand, PDF 403) | | TD‑RESONANCEDTO‑DUP‑1 | X3 | stranded DTO vs column doctrine | | TD‑HELIX‑OVERLAP‑1 | Q3/F8 | fidelity probe owed before promotion | -| TD‑WIKI‑SCALE | S1/identity | `StructuralSignature` u32 birthday (~77k) + NiblePath depth-16 ceiling — both bite at load scale; widen/escape paths named | +| TD‑WIKI‑SCALE | S1/identity | `StructuralSignature` u32 birthday (~77k) + NiblePath depth-16 ceiling — both bite at load scale; widen/escape paths named (home: lance-graph `TECH_DEBT.md`; joined by this map's L0b ceilings) | | TYPE_DUPLICATION §13 (CausalEdge64 ×2) | X1/X2 | same name, two semantics — rename + byte contract | --- @@ -332,8 +420,12 @@ contents; `ractor_actors::state_machine` internals; #480's `mul.rs` / 1. **N8 fork coords** — BLOCKED(C), human gate (lance-graph P0 "STOP and ask"). 2. **ADR-026 go** — ready bucket complete; recommend after F2 (Q1) so the monotile verdict pins with it. 3. **O4** — build `ogar-from-ruby` vs reuse nexgen's ruff path (recommend: reuse; it's CODED and on the same spine). -4. **S11 first consumer** — `RouteBucketTyped` needs one genuine non-Odoo impl or it's YAGNI (candidate: Wikidata-HHTL or the OP target). +4. **S11 status** — `RouteBucketTyped` did NOT land on main (`62bca5e`); confirm with its session whether superseded or dropped before any consumer planning. 5. **#47 → #48 merge order** — operator action; H1 must land on #47 first. +6. **shape_hash use-invariant** — PIN "same-class temporal comparison only, never cross-class"; then the 2⁻²² per-change residual is acceptable as-is. Widening becomes live only if a cross-class use is ever proposed (L0b, G-pass risk-model correction). +7. **`local` minting scope + escape** — first PIN the scope (currently unspecified), then pick prefix-shard / widen / per-tenant ns, before multi-year tenancy (L0b, G-pass). +8. **X7 FieldMask widening design** — multi-word vs paged presence; gates F14 and real Odoo THINK rendering (L0b BLOCKER). +9. **NiblePath flavor check** — OGAR contract §1 "27-bit segments" vs lance hhtl.rs 4-bit nibbles ×16: same structure, stale doc, or two-types-one-name? Resolve before the Phase B mint (G-pass, S1). --- From 237553ba8f58cc5b48b94f88206b21b3ed3e7070 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 20:46:12 +0000 Subject: [PATCH 03/18] =?UTF-8?q?docs(integration-map):=20canon-pass=20?= =?UTF-8?q?=E2=80=94=20restore=20the=20pinned=20u32=20address=20as=20the?= =?UTF-8?q?=20L0=20apex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator correction: the canonical address was already made and the map had the audit direction INVERTED — it let the lance-graph 128-bit GUID wrapper define the identity layer and then ran "capacity ceiling" alarms against widths that are the design. The canonical (operator-pinned): u32 = [ classid:8 | HEEL:4 | HIP:4 | TWIG:4 | family-basin-leaf:6 | identity:6 ] - one register; the cascade tiers ARE the address nibbles - every width is an existing codebook cardinality: 8 -> palette-256 / OGIT family byte; 4+4+4 = 16^3 = 4096 tiles; 6+6 = 64x64 = the 4096 surface - bounded by design; scale = the next cascade level, never wider fields Fixes: - L0 gains the CANONICAL apex row; everything below implements or wraps it; wrappers are audited against it, never the reverse. - NodeGuid regraded to WRAPPER: must embed/derive the canonical u32 (it fits octets 0-3 exactly); Phase B gains the embedding audit. - L0b reframed "capacity ceilings" -> "bounded-by-design vocabularies + wrapper-field policies"; sec 9.6/9.7 marked wrapper-policy, not canon; the FieldMask/109-fields BLOCKER keeps its measurement but its canonical answer is paging via the hierarchy (wide class = basin of field-pages); multi-word mask demoted to wrapper option. - sec 9.9 reframed: the "two NiblePath structures" panic was canon-agnostic and wrong in direction — lance hhtl nibbles AGREE with the canon; the OGAR contract "27-bit segments" doc note is what reconciles TO it. - H2 fold gains birth of D-CANON32 in DISCOVERY-MAP. Process note, honestly: this was a consult-don't-guess failure — the map derived identity-layer "truth" from a wrapper plan instead of the pinned canon, then hardened the error. The canon-pass restores the direction of authority. Docs-only. PII abort-guard (word-boundary): CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/INTEGRATION-MAP.md | 53 ++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 4dc2e57..07187ea 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -1,11 +1,14 @@ # INTEGRATION MAP — how the substrate composes across repos > **Status: LIVING MAP v1.1** (2026‑06‑09; v1.1 = hardened by the 5+3 -> savant pass — capacity ceilings L0b, delegation lineage corrected, gates -> F10–F14, Track O7 promoted — **plus the G-pass logic audit**: B joined -> the critical path, diamond ≠ prefix-tree named, shape_hash risk-model -> corrected, F2 bridge condition, F14 run-gate, NiblePath flavor check). -> Companion to `DISCOVERY-MAP.md` — +> savant pass — capacity table L0b, delegation lineage corrected, gates +> F10–F14, Track O7 promoted — **plus the G-pass logic audit** (B joined +> the critical path, diamond ≠ prefix-tree, shape_hash risk-model fixed, +> F2 bridge condition, F14 run-gate) — **plus the canon-pass (operator, +> 2026‑06‑10): the pinned u32 address `[classid:8|HEEL:4|HIP:4|TWIG:4| +> basin:6|id:6]` restored as the L0 apex — widths are codebook +> cardinalities, hierarchy is the overflow, wrappers are audited against +> the canon and never the reverse**). Companion to `DISCOVERY-MAP.md` — > the discovery map indexes *what was found*; **this maps *how it > composes*: layers, seams, phases, gates.** Implementation follows this > map; the map precedes the code (the "document before it dilutes" @@ -42,8 +45,13 @@ THINK arm Class { attributes, associations (4× AR kinds), enums, scopes, mi DO arm ActionDef (separate SPO node, object_class → Class) + ActionInvocation (state: ActionState) MEMBRANE KausalSpec { StateGuard | LifecycleTrigger | Depends{paths} } ← the only place domain workflow survives IR flattening (OGAR-AST-CONTRACT §3) -IDENTITY Identity (NiblePath, class-side) ←─ registry mint (entity_type ↔ NiblePath, bijective) ─→ - NodeGuid (128-bit UUIDv8, instance-side, lance-graph-contract::identity) [G] #480 +IDENTITY THE CANONICAL u32 (operator-pinned): [classid:8 | HEEL:4 | HIP:4 | TWIG:4 | + family-basin-leaf:6 | identity:6] — one register; the cascade tiers ARE the + address nibbles; every width = an existing codebook cardinality + (8→palette-256/OGIT family byte · 4+4+4 = 16³ = 4096 tiles · 6+6 = 64×64 = + the 4096 surface); scale = the next cascade level, never field-widening. + NodeGuid (128-bit UUIDv8, #480) = the lance-graph WRAPPER — must embed/derive + the canonical u32 (it fits octets 0–3 exactly; Phase B audits the embedding) ╚═════════════════════════════════════════════════════════════╝ ADAPTERS emit_surrealql_ddl [G] · ogar-adapter-ttl [G] · ogar-adapter-clickhouse-ddl [G] · ogar-knowable-from (vart-backend) [G] · parse_surrealql_ddl walk [H scaffold] @@ -71,23 +79,31 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** | +| **THE CANONICAL ADDRESS** `u32 = [classid:8 \| HEEL:4 \| HIP:4 \| TWIG:4 \| family‑basin‑leaf:6 \| identity:6]` — cascade tiers are literal address nibbles; widths ARE codebook cardinalities (256 · 16³=4096 · 64×64=4096); bounded by design, hierarchy is the overflow | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | -| `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED** | +| `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — WRAPPER**: must embed/derive the canonical u32 (which fits octets 0–3 exactly); whether #480's field carving does so is the **Phase B embedding audit** | | The five register-reads of one GUID: **resolve** (entity_type→ClassView) / **route** (niblepath prefix `is_ancestor_of`) / **witness** (frozen bytes + merkle) / **ground‑truth** (shape_hash drift) / **dispatch‑to‑store** (`as_bytes()`→EntityKey) | `identity.rs:31-37` | **[G] CODED** | | Bijection law: `entity_type:u16` canonical/exact; `NiblePath` the derived view; GUID prefix = 4‑nibble routing cache; **registry mints `(entity_type, NiblePath)` unique pairs** | `identity-architecture-exists-vs-needs-v1.md` (ratified 2026‑06‑09) | **[G] law / [H] mint** — mint + build-time round-trip = lance-graph **Phase B** | | `SchemaPtr.packed:u32=[ns:8\|entity_type:16\|kind:8]`, `ClassId=u16` ("never a content hash"), `EntityTypeId=u16`, `EdgeRef{family:u8,local:u16}`, `StructuralSignature` | namespace.rs:119 · class_view.rs:53 · ontology.rs:81 · episodic_edges.rs:34 · odoo_blueprint | **[G] CODED** (StructuralSignature: [G] type / [H] live-wire → Phase B) | | `class_id` **aliases** the `entity_type` slot on the SoA row — no new column | soa_view.rs:47 `[per xs]` | **[G] CODED** | | Cold-path identity TODAY: `node_id:u32` + String labels (MetadataStore), `u64` content `dn_hash` (SpoStore), `CogRecord` id-less | metadata.rs:60,86 · spo/store.rs:38 · cogrecord.rs:56 | **[G] CODED but the gap NodeGuid fills** → Phase F migration | -### L0b — capacity ceilings (derived + theorem-checked, 2026‑06‑09; volume rows are estimates with stated assumptions) +### L0b — bounded-by-design vocabularies + wrapper-field policies (canon-pass reframe) + +> **Canon-pass correction (operator, 2026‑06‑10):** bounded widths are the +> DESIGN — the escape for scale is **the next cascade level**, never wider +> integers. The rows below are **lance-graph WRAPPER field policies** +> (they constrain #480's GUID carving, not the substrate canon) — except +> the FieldMask row, which is an empirical finding with a canonical +> answer. Volume rows are estimates with stated assumptions. | Field | Width | Ceiling | First-consumer impact | Escape | |---|---|---|---|---| | `entity_type` | u16 | 65,536 classes | Odoo ~3.1k ✓; SNOMED ~350k / planet-scale ✗ | TD‑WIKI‑SCALE family; widen at the registry mint when a >64k ontology lands | | `shape_hash` | 22 b | **G-pass risk-model correction:** comparisons are SAME-CLASS, temporal only (stored vs current hash of one class) — cross-class hashes are never compared (`entity_type` discriminates). Relevant miss = h(old)=h(new) per schema change ≈ 2⁻²² (~2.4e‑7), **negligible** | the birthday-over-all-classes figure (50% @ ~2,411) answered the wrong population | keep 22 b; PIN the use-invariant "never compare cross-class" — if that is ever violated, the birthday math applies and 22 b is too small (§9.6) | | `local` | 24 b | 16,777,216 per minting scope — **the scope itself is UNSPECIFIED** (global per (ns, entity_type)? per tenant? per prefix?) | IF global per (ns, entity_type): `account.move.line` exceeds in ~10 tenant-years (assumes ~1.7M lines/tenant-yr vs 2²⁴ ≈ 16.8M — an estimate, not a theorem) | §9.7 = first PIN the minting scope, THEN pick the escape (prefix-shard / widen / per-tenant ns) | -| `FieldMask` | u64 | **64 fields**; positions ≥64 silently IGNORED (#441 N3, class_view.rs:76) | **BLOCKER: `account.move` carries 109 field declarations (counted first-hand, account_move.py Odoo 17 — auditor-measured) → THINK render silently drops 45+** | multi-word / paged presence — **Track X7 + gate F14** | +| `FieldMask` | u64 | **64 fields**; positions ≥64 silently IGNORED (#441 N3, class_view.rs:76) | **BLOCKER: `account.move` carries 109 field declarations (counted first-hand, account_move.py Odoo 17 — auditor-measured) → THINK render silently drops 45+** | **canonical answer: page via the hierarchy** (a wide class = a basin of field-pages — the cascade IS the overflow mechanism); multi-word mask is merely a wrapper option — **Track X7 + gate F14** | | `niblepath_prefix` | 16 b / 4 nibbles | depth >4 → prefix-only routing | none — falls back to `entity_type` resolve (documented in identity.rs) | ✓ | ### L1 — The OGAR IR (the two arms + the membrane) @@ -168,7 +184,7 @@ enter the SoA (§4). | # | Seam | Producer side | Consumer side | Contract type | Status | |---|---|---|---|---|---| -| S1 | **class identity ↔ instance identity** | OGAR `Identity` (NiblePath) | lance-graph `NodeGuid` | registry mint `(entity_type ↔ NiblePath)` bijection | **[G] type / [H] mint** (Phase B) — **G-pass OPEN CHECK: "NiblePath" may be two structures sharing one name** (OGAR contract §1: "27-bit segments"; lance hhtl.rs: 4-bit nibbles ×16) — confirm same-or-mapped BEFORE the mint (§9.9; the CausalEdge64 name-collision lesson, applied preemptively) | +| S1 | **class identity ↔ instance identity** | OGAR `Identity` (NiblePath) | lance-graph `NodeGuid` | registry mint `(entity_type ↔ NiblePath)` bijection | **[G] type / [H] mint** (Phase B) — **canon-pass correction**: the canonical nibble layout is PINNED (HEEL/HIP/TWIG are address nibbles; lance hhtl.rs 4-bit nibbles AGREE with it); what reconciles is the OGAR contract §1 "27-bit segments" doc note — fix the note TO the canon, not vice versa (§9.9). Phase B additionally audits NodeGuid's embedding of the canonical u32 | | S2 | **IR → SurrealQL DDL** | `emit_surrealql_ddl` | SurrealDB `DEFINE TABLE/FIELD` | DDL string; future body = `TableDefinition::new_for_ddl` | **[G] wired** | | S3 | **SurrealQL DDL → IR** | surrealdb-parser AST | `walk_query → Vec` | `Parser::enter_parse::` (depth 1000) | **[H] partial walk** (O2) | | S4 | **knowable_from** (the four-clock pin) | `ogar-adapter-surrealql` stamps at DDL registration | `lance-graph-planner::temporal::classify` deinterlaces (lance version / schema / awareness / thinking) | `LanceVersion` via `KnowableFromWriter` | **[G] pin (ADR‑010) / [H] Lance writer impl**; consumer `temporal.rs` landed #479 | @@ -331,7 +347,10 @@ HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) (recency stamp, not delta — enumerate ALL its sites in the map, 4+) · D-MONOTILE promotion-condition tightening (Walker-addressable leg required; a 5+3 pass alone does not promote — mirror of F2) · - birth D-DELEG-INHERIT (né D-OTP-INHERIT) · this map's cross-link + birth D-DELEG-INHERIT (né D-OTP-INHERIT) · birth D-CANON32 (the + operator-pinned u32 address [classid:8|HEEL:4|HIP:4|TWIG:4|basin:6|id:6]; + widths = codebook cardinalities; hierarchy = the overflow) · + this map's cross-link H3 lance-graph board prepends #477-480 (CLAUDE.md mandate; formally incomplete until done) H4 merge order: #47 before #48 (SYN links) ``` @@ -422,10 +441,10 @@ any regrade. 3. **O4** — build `ogar-from-ruby` vs reuse nexgen's ruff path (recommend: reuse; it's CODED and on the same spine). 4. **S11 status** — `RouteBucketTyped` did NOT land on main (`62bca5e`); confirm with its session whether superseded or dropped before any consumer planning. 5. **#47 → #48 merge order** — operator action; H1 must land on #47 first. -6. **shape_hash use-invariant** — PIN "same-class temporal comparison only, never cross-class"; then the 2⁻²² per-change residual is acceptable as-is. Widening becomes live only if a cross-class use is ever proposed (L0b, G-pass risk-model correction). -7. **`local` minting scope + escape** — first PIN the scope (currently unspecified), then pick prefix-shard / widen / per-tenant ns, before multi-year tenancy (L0b, G-pass). -8. **X7 FieldMask widening design** — multi-word vs paged presence; gates F14 and real Odoo THINK rendering (L0b BLOCKER). -9. **NiblePath flavor check** — OGAR contract §1 "27-bit segments" vs lance hhtl.rs 4-bit nibbles ×16: same structure, stale doc, or two-types-one-name? Resolve before the Phase B mint (G-pass, S1). +6. *(wrapper-field policy, not canon)* **shape_hash use-invariant** — PIN "same-class temporal comparison only, never cross-class"; then the 2⁻²² per-change residual is acceptable as-is (L0b, G-pass risk-model correction). +7. *(wrapper-field policy, not canon)* **`local` minting scope** — PIN the scope (currently unspecified); the canonical overflow is hierarchical (next cascade level), wrapper-side widening is a lance-graph implementation choice (L0b). +8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). +9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical u32 (lance hhtl nibbles already agree). Fix the NOTE; the canon stands. Phase B also audits NodeGuid's embedding of the canonical u32 in octets 0–3 (canon-pass; supersedes the earlier "two-structures" framing, which was wrongly canon-agnostic). --- From fb1cd1a7360a8b8a52bcb2c82ed996c980338e39 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 20:50:35 +0000 Subject: [PATCH 04/18] =?UTF-8?q?docs(integration-map):=20canon-pass=20v2?= =?UTF-8?q?=20=E2=80=94=20the=20canonical=20counts=20HEX;=20it=20IS=20the?= =?UTF-8?q?=20GUID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator correction of the correction: the pinned canonical is counted in HEX DIGITS, not bits. 8+4+4+4+6+6 = 32 hex = 128 bit = the GUID itself — and the UUID text format's own dash-groups (8-4-4-4-12) ARE the semantic delimiters: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx classid HEEL HIP TWIG family-basin-leaf(6) + identity(6) Every printed GUID is self-describing at sight; the dashes delimit the cascade. 1 hex digit = 1 nibble = 1 level of the 16-ary tree. Shipped-code agreement (group-by-group, receipts): - group 1 (8 hex = 32 b) = SchemaPtr.packed u32 — EXACT - group 2 (4 hex) = PREFIX_NIBBLES = 4 — EXACT - tail 6+6 (24 b + 24 b) = EdgeRef{family,local} 24 b / LOCAL_BITS = 24 — EXACT - groups 3-4 (canon: HIP/TWIG path nibbles) currently hold #480's ver/depth + shape_hash + variant — THE Phase B audit question, with one real collision named: RFC 9562 pins the version nibble at group 3's first hex and the variant bits at group 4's first hex, i.e. INSIDE the HIP and TWIG groups. The canon either accepts the stolen nibbles or waives strict RFC form — operator call. Fixes the prior canon-pass commit (237553b), which restored the canon's authority but misread it as a u32 ("fits octets 0-3") — shrinking the canonical 4x. D-CANON32 in the H2 fold list renamed D-CANON-GUID. Sec 9.9 now supersedes both wrong framings explicitly. Docs-only. PII abort-guard (word-boundary): CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/INTEGRATION-MAP.md | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 07187ea..9e7743f 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -5,10 +5,11 @@ > F10–F14, Track O7 promoted — **plus the G-pass logic audit** (B joined > the critical path, diamond ≠ prefix-tree, shape_hash risk-model fixed, > F2 bridge condition, F14 run-gate) — **plus the canon-pass (operator, -> 2026‑06‑10): the pinned u32 address `[classid:8|HEEL:4|HIP:4|TWIG:4| -> basin:6|id:6]` restored as the L0 apex — widths are codebook -> cardinalities, hierarchy is the overflow, wrappers are audited against -> the canon and never the reverse**). Companion to `DISCOVERY-MAP.md` — +> 2026‑06‑10): the pinned canonical is HEX-counted — it IS the GUID, +> whose `8-4-4-4-12` dash-groups carry the semantics +> `classid-HEEL-HIP-TWIG-[basin6+id6]` (32 hex = 128 bit); hierarchy is +> the overflow; wrappers are audited against the canon group-by-group +> and never the reverse**). Companion to `DISCOVERY-MAP.md` — > the discovery map indexes *what was found*; **this maps *how it > composes*: layers, seams, phases, gates.** Implementation follows this > map; the map precedes the code (the "document before it dilutes" @@ -45,13 +46,17 @@ THINK arm Class { attributes, associations (4× AR kinds), enums, scopes, mi DO arm ActionDef (separate SPO node, object_class → Class) + ActionInvocation (state: ActionState) MEMBRANE KausalSpec { StateGuard | LifecycleTrigger | Depends{paths} } ← the only place domain workflow survives IR flattening (OGAR-AST-CONTRACT §3) -IDENTITY THE CANONICAL u32 (operator-pinned): [classid:8 | HEEL:4 | HIP:4 | TWIG:4 | - family-basin-leaf:6 | identity:6] — one register; the cascade tiers ARE the - address nibbles; every width = an existing codebook cardinality - (8→palette-256/OGIT family byte · 4+4+4 = 16³ = 4096 tiles · 6+6 = 64×64 = - the 4096 surface); scale = the next cascade level, never field-widening. - NodeGuid (128-bit UUIDv8, #480) = the lance-graph WRAPPER — must embed/derive - the canonical u32 (it fits octets 0–3 exactly; Phase B audits the embedding) +IDENTITY THE CANONICAL GUID (operator-pinned; counted in HEX DIGITS, 32 hex = 128 bit): + xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + classid HEEL HIP TWIG family-basin-leaf(6)+identity(6) + 8 hex 4 4 4 12 hex + The UUID's own dash-groups ARE the semantic delimiters — every printed GUID + is self-describing at sight. The cascade tiers are literal hex groups; the + path nibbles ARE the tree (FAN_OUT=16, 4-bit nibble = 1 hex digit). + Shipped-code agreement: group1 (8 hex = 32b) = SchemaPtr.packed u32 · + group2 = PREFIX_NIBBLES=4 · the 6+6 tail = EdgeRef-24b / LOCAL_BITS=24. + NodeGuid (#480) = the lance-graph carving of this GUID — Phase B audits it + GROUP BY GROUP against the canon (see L0 apex row for the one collision). ╚═════════════════════════════════════════════════════════════╝ ADAPTERS emit_surrealql_ddl [G] · ogar-adapter-ttl [G] · ogar-adapter-clickhouse-ddl [G] · ogar-knowable-from (vart-backend) [G] · parse_surrealql_ddl walk [H scaffold] @@ -79,10 +84,10 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| **THE CANONICAL ADDRESS** `u32 = [classid:8 \| HEEL:4 \| HIP:4 \| TWIG:4 \| family‑basin‑leaf:6 \| identity:6]` — cascade tiers are literal address nibbles; widths ARE codebook cardinalities (256 · 16³=4096 · 64×64=4096); bounded by design, hierarchy is the overflow | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | | `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | -| `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — WRAPPER**: must embed/derive the canonical u32 (which fits octets 0–3 exactly); whether #480's field carving does so is the **Phase B embedding audit** | +| `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — a CARVING of the canonical GUID**, group-by-group: groups 1–2 and the 24-bit local MATCH the canon exactly; groups 3–4 (canon: HIP/TWIG path nibbles) currently hold ver/depth + shape_hash + variant instead — **the Phase B audit question is whether shape_hash/layout_version yield those groups back to path nibbles or the canon accepts the RFC-carved variant** | | The five register-reads of one GUID: **resolve** (entity_type→ClassView) / **route** (niblepath prefix `is_ancestor_of`) / **witness** (frozen bytes + merkle) / **ground‑truth** (shape_hash drift) / **dispatch‑to‑store** (`as_bytes()`→EntityKey) | `identity.rs:31-37` | **[G] CODED** | | Bijection law: `entity_type:u16` canonical/exact; `NiblePath` the derived view; GUID prefix = 4‑nibble routing cache; **registry mints `(entity_type, NiblePath)` unique pairs** | `identity-architecture-exists-vs-needs-v1.md` (ratified 2026‑06‑09) | **[G] law / [H] mint** — mint + build-time round-trip = lance-graph **Phase B** | | `SchemaPtr.packed:u32=[ns:8\|entity_type:16\|kind:8]`, `ClassId=u16` ("never a content hash"), `EntityTypeId=u16`, `EdgeRef{family:u8,local:u16}`, `StructuralSignature` | namespace.rs:119 · class_view.rs:53 · ontology.rs:81 · episodic_edges.rs:34 · odoo_blueprint | **[G] CODED** (StructuralSignature: [G] type / [H] live-wire → Phase B) | @@ -347,10 +352,10 @@ HYGIENE H1 SYN §3 co-revert on OGAR #47 (D-EXCITON mirror — outstanding) (recency stamp, not delta — enumerate ALL its sites in the map, 4+) · D-MONOTILE promotion-condition tightening (Walker-addressable leg required; a 5+3 pass alone does not promote — mirror of F2) · - birth D-DELEG-INHERIT (né D-OTP-INHERIT) · birth D-CANON32 (the - operator-pinned u32 address [classid:8|HEEL:4|HIP:4|TWIG:4|basin:6|id:6]; - widths = codebook cardinalities; hierarchy = the overflow) · - this map's cross-link + birth D-DELEG-INHERIT (né D-OTP-INHERIT) · birth D-CANON-GUID (the + operator-pinned canonical: HEX-counted, the GUID's own 8-4-4-4-12 + dash-groups = classid-HEEL-HIP-TWIG-[basin6+id6]; 32 hex = 128 bit; + hierarchy = the overflow) · this map's cross-link H3 lance-graph board prepends #477-480 (CLAUDE.md mandate; formally incomplete until done) H4 merge order: #47 before #48 (SYN links) ``` @@ -444,7 +449,7 @@ any regrade. 6. *(wrapper-field policy, not canon)* **shape_hash use-invariant** — PIN "same-class temporal comparison only, never cross-class"; then the 2⁻²² per-change residual is acceptable as-is (L0b, G-pass risk-model correction). 7. *(wrapper-field policy, not canon)* **`local` minting scope** — PIN the scope (currently unspecified); the canonical overflow is hierarchical (next cascade level), wrapper-side widening is a lance-graph implementation choice (L0b). 8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). -9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical u32 (lance hhtl nibbles already agree). Fix the NOTE; the canon stands. Phase B also audits NodeGuid's embedding of the canonical u32 in octets 0–3 (canon-pass; supersedes the earlier "two-structures" framing, which was wrongly canon-agnostic). +9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical GUID (lance hhtl nibbles already agree: 1 hex = 1 level). Fix the NOTE; the canon stands. Phase B audits NodeGuid against the canon **group-by-group** (groups 1–2 + the 24-bit local already match exactly; groups 3–4 are the open carving question — the RFC version/variant nibble collision, L0 apex row). Supersedes both the earlier "two-structures" framing AND the first canon-pass "u32" misread — the canonical counts HEX, and it IS the GUID. --- From e49c0ed397e466f7dc0dfd850a041ea59aac9a0e Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 20:53:23 +0000 Subject: [PATCH 05/18] =?UTF-8?q?chore(agents):=20theorem-checker=20rule?= =?UTF-8?q?=200=20=E2=80=94=20pin=20the=20unit=20system=20before=20interpr?= =?UTF-8?q?eting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A layout counted in HEX (the GUID's own 8-4-4-4-12 dash-groups) was read as bits for two full passes, and survived a 5+3 review because every lens audited arithmetic and populations — none audited UNITS. Rule 0: test bits/hex/bytes against the famous formats in play before interpreting; prefer exact shipped-code matches over codebook rhymes. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- .claude/agents/theorem-checker.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.claude/agents/theorem-checker.md b/.claude/agents/theorem-checker.md index 4fda87c..29ab40d 100644 --- a/.claude/agents/theorem-checker.md +++ b/.claude/agents/theorem-checker.md @@ -10,6 +10,16 @@ Your single job: separate what is **proven** from what is **asserted**, and chec the arithmetic. ## Method +0. **Pin the UNIT SYSTEM first.** When the operator or a doc gives a numeric + layout (e.g. `8/4/4/4/6/6`), test every plausible unit — bits, hex + digits/nibbles, bytes — against the famous formats in play (UUID + `8-4-4-4-12`, IPv6, MAC, the workspace's own 16-ary nibble tree) BEFORE + interpreting. Prefer the reading with EXACT shipped-code matches over the + reading with poetic codebook rhymes: in a substrate built on 16/256/4096, + numerology confirms anything. (Born from a real failure, 2026-06-10: an + operator layout counted in HEX — the GUID's own dash-groups — was read as + bits for two full passes, and the wrong reading survived a 5+3 review + because every lens audited arithmetic and populations, none audited units.) 1. Restate the claim as a precise mathematical proposition. If it cannot be stated precisely, that is itself the finding (`[S]`: not yet a math claim). 2. Decide its standing: From af3173efde2de81cf9d2eac58b0447fdf2d415b5 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 20:59:04 +0000 Subject: [PATCH 06/18] =?UTF-8?q?docs:=20CLAUDE.md=20=E2=80=94=20pin=20the?= =?UTF-8?q?=20canonical=20GUID=20+=20the=20key-of-key-value=20doctrine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two operator pins, now auto-loaded for every session: 1. THE CANONICAL GUID (hex-counted): the UUID's own 8-4-4-4-12 dash-groups carry the semantics classid-HEEL-HIP-TWIG-[basin6+id6]; 1 hex = 1 nibble = 1 tree level; scale = the next cascade level. 2. THE GUID IS THE KEY OF KEY-VALUE: node = 4096 bits = key(128/GUID) + value(3932, operator figure). The key prerenders nodes in any way with zero value decode (classid->template, nibbles->cascade position, basin->neighborhood). Lance may compress the value bits arbitrarily and the store STILL has a transparent view and address - compression never costs addressability. Rule-0 accounting note flagged, not silently corrected: 128+3932=4060; the 36-bit residue equals the deepnsm packed-SPO triple width - deliberate SPO slot beside the key, or value=3968? Operator call; the principle holds either way. Also mirrors the key-of-key-value pin into the INTEGRATION-MAP L0 apex row. Doc family reading order + non-negotiables included so the canon survives session boundaries. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 70 +++++++++++++++++++++++++++++++++++++++++ docs/INTEGRATION-MAP.md | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..274e825 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,70 @@ +# CLAUDE.md — OGAR (Open Graph of Active Record) + +> Auto-loaded session preamble. The canon pins live here; the detail +> lives in `docs/`. Read `docs/DISCOVERY-MAP.md` (what was found) and +> `docs/INTEGRATION-MAP.md` (how it composes) before proposing anything. + +## P0 — THE CANONICAL GUID (operator-pinned; counted in HEX, not bits) + +``` +xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +classid HEEL HIP TWIG family-basin-leaf(6) + identity(6) +8 hex 4 hex 4 hex 4 hex 12 hex +``` + +32 hex = 128 bit = the GUID itself. **The UUID's own dash-groups ARE the +semantic delimiters** — every printed GUID is self-describing at sight. +1 hex digit = 1 nibble = 1 level of the 16-ary tree (`FAN_OUT=16`). +Widths are codebook cardinalities; **scale = the next cascade level, +never field-widening.** Wrappers (e.g. lance-graph `NodeGuid`, #480) are +audited against this canon group-by-group — never the reverse. + +## P0 — THE GUID IS THE KEY OF KEY-VALUE (operator-pinned, 2026-06-10) + +The substrate is a key-value store whose **key is the canonical GUID**: + +- **The key prerenders nodes — in any way — with zero value decode.** + classid → the class template (`ClassView`); HEEL/HIP/TWIG → the + cascade position; basin+leaf → the family neighborhood; identity → + the instance. A renderer/router/planner can lay out, group, route, + and skeleton-render nodes from keys alone, before (or without ever) + fetching a value. +- **A node is 4096 bits: `key(128/GUID) + value(3932)`** (operator's + figures). The beauty: Lance is free to compress the value bits + arbitrarily — columnar encodings, dictionary, PQ, anything — and the + store **still has a transparent view and address**, because the key + is never compressed and never needs the value decoded to be useful. + Compression never costs addressability. +- *Open accounting note (rule-0 discipline: flag, don't silently + correct):* `128 + 3932 = 4060`, a 36-bit residue against 4096 — and + 36 bits is exactly the deepnsm packed-SPO triple width. Whether the + residue is a deliberate 36-bit SPO slot riding beside the key, or + the value is 3968, is an operator call. Both readings preserve the + principle; only the field accounting differs. + +## Doc family (read in this order) + +1. `docs/DISCOVERY-MAP.md` — the discovery ledger (D-* entries, graded + `[G]`/`[H]`/`[S]`, append-only). +2. `docs/INTEGRATION-MAP.md` — layers, seams (each with its contract + TYPE), the phase DAG, falsification gates F1–F14. +3. `docs/OGAR-AST-CONTRACT.md` — the IR type surface (THINK arm `Class` + / DO arm `ActionDef`+`ActionInvocation` / membrane `KausalSpec`). +4. `docs/ARCHITECTURAL-DECISIONS-2026-06-04.md` — ADR-001..025 + (ADR-026 pending). +5. `.claude/agents/` — the 5+3 hardening pattern (5 research savants + + 3 brutally-honest reviewers). Run it before any claim enters the + canon. Theorem-checker rule 0: **pin the unit system first** (bits + vs hex vs bytes — born from a real failure). + +## Non-negotiables + +- **The Firewall (ADR-022/023):** no serialization in the hot path; + the IR is wire-truth; inter-mailbox state is Batons. +- **PII:** never emit German PII labels (medcare-rs leaf-rename at the + adapter is the guarantee). Word-boundary abort-guard before commit. +- **No model identifier** in any committed artifact (chat only). +- **Shell discipline:** `grep`/`sed`/`tail`/`head`/`awk` via Bash are + prohibited — use the Grep/Read/Glob tools. +- **Append-only canon:** never delete a ledger entry; regrade in place; + corrections cite their pass (savant / G-pass / canon-pass). diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 9e7743f..6102eb5 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -84,7 +84,7 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves. **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value (operator: 3932; 36-bit residue = the deepnsm packed-SPO width — open accounting note); the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | | `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | | `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — a CARVING of the canonical GUID**, group-by-group: groups 1–2 and the 24-bit local MATCH the canon exactly; groups 3–4 (canon: HIP/TWIG path nibbles) currently hold ver/depth + shape_hash + variant instead — **the Phase B audit question is whether shape_hash/layout_version yield those groups back to path nibbles or the canon accepts the RFC-carved variant** | From 172c8563c064b76fc2761d73228bb5e7155499f4 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:06:04 +0000 Subject: [PATCH 07/18] =?UTF-8?q?docs:=20canon=20=E2=80=94=20value=20=3D?= =?UTF-8?q?=203968=20(4096=20=E2=88=92=20128);=20residue=20question=20clos?= =?UTF-8?q?ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator clarified: 128 + 3968 = 4096. The value is everything the key isn't (512 B block = 16 B key + 496 B value). The 36-bit-residue note is removed — it was a typo, not a hidden SPO slot. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 11 +++-------- docs/INTEGRATION-MAP.md | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 274e825..d76e74f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,18 +29,13 @@ The substrate is a key-value store whose **key is the canonical GUID**: the instance. A renderer/router/planner can lay out, group, route, and skeleton-render nodes from keys alone, before (or without ever) fetching a value. -- **A node is 4096 bits: `key(128/GUID) + value(3932)`** (operator's - figures). The beauty: Lance is free to compress the value bits +- **A node is 4096 bits: `key(128/GUID) + value(3968)`** — a 512-byte + block, 16-byte key, 496-byte value; the value is simply everything + the key isn't. The beauty: Lance is free to compress the value bits arbitrarily — columnar encodings, dictionary, PQ, anything — and the store **still has a transparent view and address**, because the key is never compressed and never needs the value decoded to be useful. Compression never costs addressability. -- *Open accounting note (rule-0 discipline: flag, don't silently - correct):* `128 + 3932 = 4060`, a 36-bit residue against 4096 — and - 36 bits is exactly the deepnsm packed-SPO triple width. Whether the - residue is a deliberate 36-bit SPO slot riding beside the key, or - the value is 3968, is an operator call. Both readings preserve the - principle; only the field accounting differs. ## Doc family (read in this order) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 6102eb5..9465241 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -84,7 +84,7 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves. **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value (operator: 3932; 36-bit residue = the deepnsm packed-SPO width — open accounting note); the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves. **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value(3968) — the value is everything the key isn't; the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | | `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | | `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — a CARVING of the canonical GUID**, group-by-group: groups 1–2 and the 24-bit local MATCH the canon exactly; groups 3–4 (canon: HIP/TWIG path nibbles) currently hold ver/depth + shape_hash + variant instead — **the Phase B audit question is whether shape_hash/layout_version yield those groups back to path nibbles or the canon accepts the RFC-carved variant** | From 79be0b5e55715857b512f0ce83d463f45bb616be Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:13:22 +0000 Subject: [PATCH 08/18] =?UTF-8?q?docs(integration-map):=20=C2=A79.10=20?= =?UTF-8?q?=E2=80=94=20RFC=20nibble=20decision:=20RECOMMEND=20v8-native=20?= =?UTF-8?q?(awaiting=20ratification)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version hex + variant bits as the substrate's signature, not a tax: UUIDv8 is the bring-your-own-layout version; the version nibble doubles as a free native/foreign key discriminator at every membrane; cost is HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (deep chains were always the overflow story's job — which is also why Wikidata-HHTL is not a different scheme, just the canon's heaviest consumer). Entropy: one skip-rule beats interop friction paid forever; 6 constant bits are zero-entropy structure. Canon does not move until the operator says so. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/INTEGRATION-MAP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 9465241..e533734 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -450,6 +450,7 @@ any regrade. 7. *(wrapper-field policy, not canon)* **`local` minting scope** — PIN the scope (currently unspecified); the canonical overflow is hierarchical (next cascade level), wrapper-side widening is a lance-graph implementation choice (L0b). 8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). 9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical GUID (lance hhtl nibbles already agree: 1 hex = 1 level). Fix the NOTE; the canon stands. Phase B audits NodeGuid against the canon **group-by-group** (groups 1–2 + the 24-bit local already match exactly; groups 3–4 are the open carving question — the RFC version/variant nibble collision, L0 apex row). Supersedes both the earlier "two-structures" framing AND the first canon-pass "u32" misread — the canonical counts HEX, and it IS the GUID. +10. **RFC 9562 nibble decision — RECOMMENDED: v8-native (awaiting operator ratification).** Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. --- From 49a95a691346cee6f608ee2b6913c28fdf4c2a9c Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:14:46 +0000 Subject: [PATCH 09/18] =?UTF-8?q?docs:=20pin=20RFC-9562-v8-NATIVE=20(autor?= =?UTF-8?q?esolve)=20=E2=80=94=20the=20version/variant=20hexes=20are=20the?= =?UTF-8?q?=20canon's=20signature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pinned under the standing autoresolve mandate after a 3x repeated ask; one operator word reverses it. The version hex 8 + variant hex are the substrate signature = free native/foreign key discriminator at every membrane. One skip-rule; HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels; deeper chains overflow to the hierarchy — Wikidata-HHTL is the same canon, not a different scheme. Entropy: constants are zero-entropy structure; one rule beats interop friction paid forever. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 12 ++++++++++++ docs/INTEGRATION-MAP.md | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d76e74f..4e39df7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,6 +19,18 @@ Widths are codebook cardinalities; **scale = the next cascade level, never field-widening.** Wrappers (e.g. lance-graph `NodeGuid`, #480) are audited against this canon group-by-group — never the reverse. +**RFC-9562-v8-NATIVE** (pinned 2026-06-10, autoresolve; one operator +word reverses): the version hex (group 3, first digit = `8`) and the +variant hex (group 4, first digit ∈ {8,9,A,B}) are the substrate's +**signature** — a free native/foreign key discriminator at every +membrane. One skip-rule, stated once: *the first hex of groups 3 and 4 +is the RFC mark; path nibbles skip it.* Path budget: HEEL 4 + HIP 3 + +TWIG 3 = 10 native levels (16¹⁰ ≈ 10¹²); deeper chains overflow to the +hierarchy (registry resolve + ref-escape) — which is why Wikidata-HHTL +is the same canon, not a different scheme. Entropy rationale: constants +are zero-entropy structure; one rule beats per-tool interop friction +paid forever. + ## P0 — THE GUID IS THE KEY OF KEY-VALUE (operator-pinned, 2026-06-10) The substrate is a key-value store whose **key is the canonical GUID**: diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index e533734..fdc567b 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -84,7 +84,7 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **One real collision for the Phase B audit:** RFC 9562 pins the version nibble at group3's first hex and the variant bits at group4's first hex — i.e. INSIDE the HIP and TWIG groups; the canon must either accept those stolen nibbles (HIP=3 free hex, TWIG≈3.5) or waive strict RFC form — operator call, nothing else moves. **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value(3968) — the value is everything the key isn't; the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **RFC collision — RESOLVED, v8-NATIVE (pinned, autoresolve 2026‑06‑10):** the version/variant hexes at groups 3–4's first digits are the substrate's signature (free native/foreign discriminator); skip-rule stated once; path = HEEL 4 + HIP 3 + TWIG 3 = 10 native levels, deeper chains overflow to the hierarchy (§9.10). **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value(3968) — the value is everything the key isn't; the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | | `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | | `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — a CARVING of the canonical GUID**, group-by-group: groups 1–2 and the 24-bit local MATCH the canon exactly; groups 3–4 (canon: HIP/TWIG path nibbles) currently hold ver/depth + shape_hash + variant instead — **the Phase B audit question is whether shape_hash/layout_version yield those groups back to path nibbles or the canon accepts the RFC-carved variant** | @@ -450,7 +450,7 @@ any regrade. 7. *(wrapper-field policy, not canon)* **`local` minting scope** — PIN the scope (currently unspecified); the canonical overflow is hierarchical (next cascade level), wrapper-side widening is a lance-graph implementation choice (L0b). 8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). 9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical GUID (lance hhtl nibbles already agree: 1 hex = 1 level). Fix the NOTE; the canon stands. Phase B audits NodeGuid against the canon **group-by-group** (groups 1–2 + the 24-bit local already match exactly; groups 3–4 are the open carving question — the RFC version/variant nibble collision, L0 apex row). Supersedes both the earlier "two-structures" framing AND the first canon-pass "u32" misread — the canonical counts HEX, and it IS the GUID. -10. **RFC 9562 nibble decision — RECOMMENDED: v8-native (awaiting operator ratification).** Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. +10. **RFC 9562 nibble decision — PINNED: v8-native** (autoresolved under the standing full-authority mandate after a 3× repeated ask; one operator word reverses it). Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. --- From 41bd860f9751fdbf5e37d12ad6e39ebb2e7c59d0 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:20:50 +0000 Subject: [PATCH 10/18] =?UTF-8?q?docs:=20REVERSE=20v8-native=20=E2=80=94?= =?UTF-8?q?=20canon=20is=203=C3=974=20UNIFORM,=20RFC-WAIVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The operator's word arrived (the reversal the pin promised). The 4/3/3 carving broke the uniform Morton stride: tier-of-level must stay level >> 2 — a shift, never a branch — in a substrate whose cascade is shift/mask by doctrine. The interop benefit was mostly hypothetical (Lance/Surreal/EntityKey are byte-agnostic; few tools validate version nibbles). And the pin violated the map's own apex rule: RFC 9562 is a WRAPPER format, and wrappers adapt to the canon, never the reverse — RFC-needing boundaries adapt at their membrane; native/foreign discrimination via classid, not a format constant. Also answers the operator's question directly: the 4/3/3 was never 4096-codebook-motivated — it fell out of RFC mark positions — but the reversal restores the Morton-tile 3-tiers-x-4-nibbles alignment regardless. Phase B consequence: #480 must yield all eight group-3/4 nibbles back to HIP/TWIG path. Append-only: §9.10 keeps the full episode (recommend -> pin -> reversal) as the decision record. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 29 ++++++++++++++++++----------- docs/INTEGRATION-MAP.md | 4 ++-- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4e39df7..124a9ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,17 +19,24 @@ Widths are codebook cardinalities; **scale = the next cascade level, never field-widening.** Wrappers (e.g. lance-graph `NodeGuid`, #480) are audited against this canon group-by-group — never the reverse. -**RFC-9562-v8-NATIVE** (pinned 2026-06-10, autoresolve; one operator -word reverses): the version hex (group 3, first digit = `8`) and the -variant hex (group 4, first digit ∈ {8,9,A,B}) are the substrate's -**signature** — a free native/foreign key discriminator at every -membrane. One skip-rule, stated once: *the first hex of groups 3 and 4 -is the RFC mark; path nibbles skip it.* Path budget: HEEL 4 + HIP 3 + -TWIG 3 = 10 native levels (16¹⁰ ≈ 10¹²); deeper chains overflow to the -hierarchy (registry resolve + ref-escape) — which is why Wikidata-HHTL -is the same canon, not a different scheme. Entropy rationale: constants -are zero-entropy structure; one rule beats per-tool interop friction -paid forever. +**3×4 PATH — UNIFORM, RFC-WAIVED** (reversed 2026-06-10; the operator's +word arrived — the brief v8-native pin broke the uniform Morton stride): +HEEL/HIP/TWIG are each **4 full nibbles** — 3 tiers × 4 nibbles = 12 +path levels, uniform. **Tier-of-level = `level >> 2` — a shift, never a +branch.** The cascade's shift/mask arithmetic is canon. The GUID is NOT +RFC-stamped: **RFC 9562 is a WRAPPER format, and wrappers adapt to the +canon, never the reverse** — any boundary that genuinely requires +RFC-valid UUIDs owns that adaptation at its membrane and pays it +explicitly; the canon does not pre-pay it in every key. Native/foreign +discrimination lives where semantics live: in `classid` (foreign keys +get a foreign family), not in a format constant. Wikidata-HHTL is the +same canon either way — depth beyond 12 native levels was always the +hierarchy's job (registry resolve + ref-escape). (The v8-native episode ++ reversal reasoning: INTEGRATION-MAP §9.10. The 4/3/3 carving was +never codebook-motivated — it fell out of RFC mark positions — but it +traded concrete hot-path uniformity for mostly-hypothetical interop: +the key's real consumers — Lance, SurrealDB, `EntityKey` — are +byte-agnostic.) ## P0 — THE GUID IS THE KEY OF KEY-VALUE (operator-pinned, 2026-06-10) diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index fdc567b..6a3864c 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -84,7 +84,7 @@ enter the SoA (§4). | Piece | Where | Status | |---|---|---| -| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **RFC collision — RESOLVED, v8-NATIVE (pinned, autoresolve 2026‑06‑10):** the version/variant hexes at groups 3–4's first digits are the substrate's signature (free native/foreign discriminator); skip-rule stated once; path = HEEL 4 + HIP 3 + TWIG 3 = 10 native levels, deeper chains overflow to the hierarchy (§9.10). **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value(3968) — the value is everything the key isn't; the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | +| **THE CANONICAL ADDRESS — counted in HEX, it IS the GUID**: `classid(8 hex)‑HEEL(4)‑HIP(4)‑TWIG(4)‑[family‑basin‑leaf(6)+identity(6)]` = the UUID text format's own `8‑4‑4‑4‑12` dash-groups carrying the semantics. 32 hex = 128 bit. Path nibbles = the 16-ary tree (1 hex = 1 level); 12 path nibbles across HEEL/HIP/TWIG + leaf addressing inside the basin group ≈ hhtl.rs MAX_DEPTH=16. Shipped agreement: group1 = `SchemaPtr.packed` u32 (exact) · group2 = `PREFIX_NIBBLES=4` (exact) · tail 6+6 = `EdgeRef` 24 b / `LOCAL_BITS=24` (exact). **RFC question — RESOLVED: 3×4 UNIFORM, RFC-WAIVED (operator, 2026‑06‑10):** HEEL/HIP/TWIG keep all 4 nibbles each — uniform Morton stride, tier-of-level = `level >> 2` (shift, never branch); RFC 9562 is a WRAPPER format and wrappers adapt to the canon, never the reverse — RFC-needing boundaries adapt at their membrane; native/foreign discrimination via `classid`, not a format constant (§9.10 carries the full episode). **And the GUID is the KEY of key-value** (CLAUDE.md P0): node = 4096 bits = key(128) + value(3968) — the value is everything the key isn't; the key prerenders nodes with zero value decode; Lance may compress the value bits arbitrarily — **compression never costs addressability** | substrate canon (operator-pinned, 2026‑06‑10) | **CANONICAL** — everything below implements or WRAPS it; wrappers are audited against IT, never the reverse | | `Identity` (NiblePath segments, class-side; 27‑bit segs, dict-encoded) | OGAR `ogar-ontology` (#31), `OGAR-AST-CONTRACT.md §1` | **[G] CODED** — the "27‑bit segments" doc note reconciles TO the canonical (§9.9) | | `NiblePath{path:u64,depth:u8}`, `FAN_OUT=16`, `MAX_DEPTH=16`, `parent()`, `child()`, `is_ancestor_of` (prefix shift), LCA | lance-graph `contract/src/hhtl.rs` | **[G] CODED** `[per rt]` | | `NodeGuid([u8;16])` UUIDv8 — octets: ns(1)·entity_type(2)·kind(1)·niblepath_prefix(2)·ver/depth(1)·shape_hash(22b)·local(24b)·layout_version(1)·spare(2) | lance-graph `contract/src/identity.rs:66-121` (#480, Phase A, 599 tests) | **[G] CODED — a CARVING of the canonical GUID**, group-by-group: groups 1–2 and the 24-bit local MATCH the canon exactly; groups 3–4 (canon: HIP/TWIG path nibbles) currently hold ver/depth + shape_hash + variant instead — **the Phase B audit question is whether shape_hash/layout_version yield those groups back to path nibbles or the canon accepts the RFC-carved variant** | @@ -450,7 +450,7 @@ any regrade. 7. *(wrapper-field policy, not canon)* **`local` minting scope** — PIN the scope (currently unspecified); the canonical overflow is hierarchical (next cascade level), wrapper-side widening is a lance-graph implementation choice (L0b). 8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). 9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical GUID (lance hhtl nibbles already agree: 1 hex = 1 level). Fix the NOTE; the canon stands. Phase B audits NodeGuid against the canon **group-by-group** (groups 1–2 + the 24-bit local already match exactly; groups 3–4 are the open carving question — the RFC version/variant nibble collision, L0 apex row). Supersedes both the earlier "two-structures" framing AND the first canon-pass "u32" misread — the canonical counts HEX, and it IS the GUID. -10. **RFC 9562 nibble decision — PINNED: v8-native** (autoresolved under the standing full-authority mandate after a 3× repeated ask; one operator word reverses it). Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. +10. **RFC 9562 nibble decision — PINNED: v8-native** (autoresolved under the standing full-authority mandate after a 3× repeated ask; one operator word reverses it). Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. **REVERSED (operator word, 2026‑06‑10): final = 3×4 UNIFORM, RFC-WAIVED.** The 4/3/3 carving broke the uniform Morton stride — tier-of-level must stay `level >> 2` (shift, not branch) in a substrate whose cascade is shift/mask by doctrine; the interop benefit was mostly hypothetical (Lance/Surreal/`EntityKey` are byte-agnostic; few tools validate version nibbles); and the pin violated this map's own apex rule — **RFC 9562 is a WRAPPER concern, and wrappers adapt to the canon, never the reverse**. RFC-needing boundaries adapt at their membrane; discrimination via `classid`. (Answer to the operator's question: the 4/3/3 was never 4096-codebook-motivated — it fell out of RFC mark positions — but the reversal restores the Morton-tile alignment regardless.) Phase B audit consequence: #480's ver/variant/shape_hash carving of groups 3–4 must yield ALL eight nibbles back to HIP/TWIG path. --- From 3473dfe1e91dba9a71552e4be9d26dbd772e8000 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:26:59 +0000 Subject: [PATCH 11/18] =?UTF-8?q?docs:=20standing=20watch=20=E2=80=94=203?= =?UTF-8?q?=C3=974=20vs=204=C3=973,=20with=20the=20calculation=20ledger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator mandate pinned: correct-at-any-time if 3×4 ever proves more expensive / lower-synergy / higher-entropy than 4×3. Rationale recorded (modesty in levels -> radix cheapness, less horizontal difference, wider spread) + the mechanism ledger that confirms it: shift vs divide, u16-aligned vs 1.5-byte-straddling tiers, dashes=tiers, byte-per-axis Morton de-interleave, 3 hops, XOR locality. 4×3's lone synergy (tier index = one 4096 codebook slot) is recoverable inside 3×4 as a 3-nibble-prefix sub-table; the reverse is impossible. Falsifiable flip condition named (measured radix/de-interleave bench). §9.11 mirrors. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 21 +++++++++++++++++++++ docs/INTEGRATION-MAP.md | 1 + 2 files changed, 22 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 124a9ef..8b80749 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,6 +56,27 @@ The substrate is a key-value store whose **key is the canonical GUID**: is never compressed and never needs the value decoded to be useful. Compression never costs addressability. +## Standing watch — 3×4 vs 4×3 (operator mandate, 2026-06-10) + +**"Correct me at any time":** if evidence ever shows 3 tiers × 4 nibbles +to be more expensive, lower-synergy, or higher-entropy than 4 tiers × 3 +nibbles, say so immediately — standing permission and obligation. + +Operator's rationale (recorded so it doesn't dilute): *3×4 is a modesty +in levels that buys radix-tree cheapness and less horizontal difference, +but a wider spread.* Calculation ledger (2026-06-10) confirms it in +mechanism: tier-of-nibble = `n >> 2` (shift) vs `n/3`; tiers are +u16-aligned vs 1.5-byte-straddling; dash-groups = tiers (self-describing +print) vs dashes lying; Morton de-interleave = one byte per axis per +tier vs sub-byte masking; 3 hops vs 4 (wide-radix cheapness); sibling +XOR localizes to one aligned group. The one 4×3 synergy (tier index = +one 4096-codebook slot) is recoverable inside 3×4 for free — codebooks +attach at any nibble depth, so a 3-nibble prefix indexes a 4096 +sub-table whenever wanted; the reverse recovery is impossible. +**Flip condition (falsifiable):** a measured workload where 4-tier +granularity beats 3-tier on the radix/de-interleave benches despite the +alignment costs. Until measured: 3×4 stands. + ## Doc family (read in this order) 1. `docs/DISCOVERY-MAP.md` — the discovery ledger (D-* entries, graded diff --git a/docs/INTEGRATION-MAP.md b/docs/INTEGRATION-MAP.md index 6a3864c..7469aa4 100644 --- a/docs/INTEGRATION-MAP.md +++ b/docs/INTEGRATION-MAP.md @@ -451,6 +451,7 @@ any regrade. 8. **X7 / F14 resolution shape** — canonical answer = page via the hierarchy (wide class = basin of field-pages); multi-word mask = wrapper option. Pick which lands (L0b BLOCKER, 109 fields measured). 9. **Reconcile the doc note to the canon** — OGAR-AST-CONTRACT §1's "27-bit segments" wording vs the pinned canonical GUID (lance hhtl nibbles already agree: 1 hex = 1 level). Fix the NOTE; the canon stands. Phase B audits NodeGuid against the canon **group-by-group** (groups 1–2 + the 24-bit local already match exactly; groups 3–4 are the open carving question — the RFC version/variant nibble collision, L0 apex row). Supersedes both the earlier "two-structures" framing AND the first canon-pass "u32" misread — the canonical counts HEX, and it IS the GUID. 10. **RFC 9562 nibble decision — PINNED: v8-native** (autoresolved under the standing full-authority mandate after a 3× repeated ask; one operator word reverses it). Accept the version hex + variant bits as the substrate's *signature*: UUIDv8 is the RFC's bring-your-own-layout version, so the canon and the spec are the same philosophy; the version hex `8` doubles as a free native/foreign key discriminator at every membrane (S9); cost = HEEL 4 + HIP 3 + TWIG 3 = 10 native path levels (16¹⁰ ≈ 10¹², still overkill — deep chains were always the overflow story's job: registry resolve + try_child ref-escape, which is also why Wikidata-HHTL is NOT a different scheme, just the canon's heaviest consumer). Entropy argument: one skip-rule beats per-tool interop friction paid forever; 6 constant bits are zero-entropy structure. If ratified: pin in CLAUDE.md P0 + L0 apex; Phase B's remaining audit question reduces to whether #480's shape_hash/layout_version yield groups 3–4's free nibbles back to HIP/TWIG path. **REVERSED (operator word, 2026‑06‑10): final = 3×4 UNIFORM, RFC-WAIVED.** The 4/3/3 carving broke the uniform Morton stride — tier-of-level must stay `level >> 2` (shift, not branch) in a substrate whose cascade is shift/mask by doctrine; the interop benefit was mostly hypothetical (Lance/Surreal/`EntityKey` are byte-agnostic; few tools validate version nibbles); and the pin violated this map's own apex rule — **RFC 9562 is a WRAPPER concern, and wrappers adapt to the canon, never the reverse**. RFC-needing boundaries adapt at their membrane; discrimination via `classid`. (Answer to the operator's question: the 4/3/3 was never 4096-codebook-motivated — it fell out of RFC mark positions — but the reversal restores the Morton-tile alignment regardless.) Phase B audit consequence: #480's ver/variant/shape_hash carving of groups 3–4 must yield ALL eight nibbles back to HIP/TWIG path. +11. **STANDING WATCH — 3×4 vs 4×3** (operator mandate: "correct me at any time"): 3×4 stands on the 2026‑06‑10 ledger — shift vs divide, u16-aligned vs byte-straddling tiers, dashes=tiers, byte-per-axis Morton, 3 hops, XOR locality; 4×3's lone synergy (tier index = 4096 slot) is recoverable as a 3-nibble-prefix sub-table inside 3×4. Flip condition: a measured radix/de-interleave workload where 4-tier granularity wins despite alignment costs. CLAUDE.md carries the full ledger. --- From a971d109ae7c5edc7314aee0bf799d13bb4ec6f9 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:32:18 +0000 Subject: [PATCH 12/18] =?UTF-8?q?docs:=20pin=20tier=20interpretation=20?= =?UTF-8?q?=E2=80=94=2064k=20per=20tier=20=3D=20256=C3=97256=20centroid=20?= =?UTF-8?q?tile=20([H]=20+=20named=20test)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator's reading confirmed by receipt chain: path (HEEL+HIP+TWIG) = 6 bytes = exactly the CAM-PQ 6x256 code (3 tiers x 2 axes); the 256x256 LUT is the stack's recurring structure (bgz17 palette tables, helix DistanceLut, bgz-tensor attention-as-lookup) so path distance = 3 tier lookups O(1); the HHTL legend already says HIP=palette. Rigor condition pinned: 256 = 4^4 — codebooks built as 4-level 4-ary centroid hierarchies so nibble-prefixes = centroid ancestry and is_ancestor_of = centroid-tree containment; x/y nibble-interleave = alternating-axis refinement (Morton in centroid space). Named test: hierarchical-4^4 vs flat-256 fidelity rho vs the 0.9973/0.965 anchors. Consequence: D-BOTHCASC collapses — spatial and semantic cascades are ONE address; domains bind the axes; algebra identical, domain-agnostic. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 8b80749..e5f20b2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,6 +56,27 @@ The substrate is a key-value store whose **key is the canonical GUID**: is never compressed and never needs the value decoded to be useful. Compression never costs addressability. +## Tier interpretation — 256×256 CENTROID TILE (operator, 2026-06-10; [H] + named test) + +Each tier's 64k space (4 nibbles = 16 bits) is read as a **256×256 +centroid tile**: two axes, each a byte-index into a 256-entry centroid +codebook, nibble-interleaved. Receipts: path = HEEL+HIP+TWIG = 6 bytes += exactly the CAM-PQ **6×256** code (3 tiers × 2 axes = 6 subspaces); +the 256×256 LUT is the stack's recurring structure (bgz17 palette +distance/compose tables, helix DistanceLut, bgz-tensor attention-as- +lookup) → **path distance = 3 tier-table lookups, O(1)**; the HHTL +legend already says HIP = palette. **Condition that keeps prefix +routing rigorous: 256 = 4⁴ — each codebook is built as a 4-level 4-ary +centroid HIERARCHY**, so a byte's nibbles are the centroid's ancestry +(coarse→fine) and `is_ancestor_of` = centroid-tree containment; the +x/y nibble-interleave = alternating-axis refinement (Morton in centroid +space). Flat k-means-256 breaks this; hierarchical 4⁴ preserves it. +**Named test (F11-adjacent):** hierarchical-4⁴ vs flat-256 fidelity ρ +against the 0.9973/0.965 anchors. Consequence: D-BOTHCASC collapses — +spatial mipmap and semantic centroid cascade are ONE address; domains +bind the axes (OSM: literal x/y; semantic: PQ subspace pairs); the +algebra is identical and domain-agnostic. + ## Standing watch — 3×4 vs 4×3 (operator mandate, 2026-06-10) **"Correct me at any time":** if evidence ever shows 3 tiers × 4 nibbles From c8b69f8407a8ef914a8b3070fe72a1dced3e2ccc Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:36:47 +0000 Subject: [PATCH 13/18] docs: pin codebook scoping = class routing prefix (longest-prefix binding) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The classid group precedes the path bytes, so centroid codebooks are selected by the key's own prefix — longest-prefix binding, a radix lookup on the key being resolved. Per-class semantic spaces (256^6 cells each) for free; capacity through hierarchy, never widening; axis binding is a class-record property resolved by the same resolve() read; codebooks mint with the class on Phase B's registry shelf, trained once, amortized per D-AMORT. Finer scopes (HEEL-subtree codebooks) follow the same rule — one rule, every level. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index e5f20b2..fa4ca86 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -77,6 +77,18 @@ spatial mipmap and semantic centroid cascade are ONE address; domains bind the axes (OSM: literal x/y; semantic: PQ subspace pairs); the algebra is identical and domain-agnostic. +**Codebook scoping = the class routing prefix** (operator, 2026-06-10): +the classid group sits in front of the path bytes, so the centroid +codebooks are **selected by the key's own prefix** — longest-prefix +binding, a radix lookup on the key being resolved. Every class gets its +own 256⁶ ≈ 2.8×10¹⁴-cell semantic space for free (capacity through +hierarchy, never widening); the axis binding (x/y vs PQ pairs) is a +class-record property resolved by the same `resolve` read; codebooks +mint with the class in the registry (next to ClassView / +StructuralSignature — Phase B's shelf), trained once, amortized over +all instances (D-AMORT). Finer scopes (a HEEL-subtree codebook) follow +the same longest-prefix-wins rule — one rule, every level. + ## Standing watch — 3×4 vs 4×3 (operator mandate, 2026-06-10) **"Correct me at any time":** if evidence ever shows 3 tiers × 4 nibbles From 8285a35cab1dada5799337967cff65b367a42f51 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 21:55:48 +0000 Subject: [PATCH 14/18] docs: pin perturbation = deterministic phase (operator, 2026-06-10) The stacked-pyramid perturbation decomposes as (exponent, location, phase, magnitude); three terms derive from the key, only the magnitude envelope is stored. Lossless for synthesis by construction (phase is convention, not data); analysis remainder escalates per the quorum certificate; D-QUANTGATE mandates the coprime-integer phase walk in quantized layers; the deterministic phase doubles as the anti-moire dither. Cost scales with magnitude smoothness, not perturbation bandwidth. Full treatment crystallized in the ndarray/lance-graph knowledge docs (claude/guid-canon-crystallization branches). https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index fa4ca86..c02e84a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -89,6 +89,26 @@ StructuralSignature — Phase B's shelf), trained once, amortized over all instances (D-AMORT). Finer scopes (a HEEL-subtree codebook) follow the same longest-prefix-wins rule — one rule, every level. +## Perturbation encoding — DETERMINISTIC PHASE (operator, 2026-06-10) + +The stacked-pyramid perturbation decomposes as **(exponent, location, +phase, magnitude)** — and three of the four are already in the key: +exponent = the pyramid level (tier nibbles, `>>2`); location = the +implied sub-tile mantissa (√u / golden sub-placement, never stored); +**phase = deterministic recurrence from the address** (never stored — +phase is convention, not data); **magnitude = the ONLY stored bits** +(palette-quantized envelope, coarser granularity than the phase +varies). Cost scales with magnitude smoothness, not perturbation +bandwidth. Fences: (a) lossless FOR SYNTHESIS by construction; for +analysis, the unaligned remainder overflows to the next level or +full-residual escalation, decided by the quorum certificate — never +assumed; (b) **D-QUANTGATE**: in quantized layers the phase generator +must be the coprime-integer walk (helix `CurveRuler` stride-4-over-17, +bit-exact integer), golden recurrence only as build-time muscle-memory; +the deterministic phase doubles as the anti-moiré dither. Receipts: +helix = the shipped place/residue split (PLACE deterministic, RESIDUE +stored). Full treatment: ndarray `guid-prefix-shape-routing.md` §4. + ## Standing watch — 3×4 vs 4×3 (operator mandate, 2026-06-10) **"Correct me at any time":** if evidence ever shows 3 tiers × 4 nibbles From 66cbeb9c7c525ddc71557b387f287a7ceb09faed Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 22:09:09 +0000 Subject: [PATCH 15/18] docs: pin bipolar-phase pyramid = Walsh-Hadamard on VSA (operator, 2026-06-10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sharper form of the perturbation pin: when the deterministic phase is signed (+/-, one bit per addr*level), the cascade IS the Walsh-Hadamard transform of the address tree, on the workspace's existing VSA-bipolar algebra. Signs compose by XOR (= vsa_bind); magnitudes compose by vsa_bundle (Markov-respecting per I-SUBSTRATE-MARKOV). Quantum-shaped but fully deterministic — superposition with unbind by role-key, Heisenberg-shaped capacity bound (I-VSA-IDENTITIES Test 1 is the substrate's uncertainty principle), Walsh-resonance field, roundtrip bit-exact. D-MANTISSA finishes in coprime form (CurveRuler is the generator, D-QUANTGATE-compliant). TWO-ALGEBRA RULE pinned at canon level: sign = XOR; magnitude = bundle NEVER MergeMode::Xor (PP-13 P1-1 'raw-XOR ordering as nearest' is the named anti-pattern). Quantum-like is the bundling algebra not measurement randomness — no headline drift. Full treatment + probes WHP-1..4 in ndarray §4b; policy mirror in lance-graph §7. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index c02e84a..ade2750 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,6 +109,38 @@ the deterministic phase doubles as the anti-moiré dither. Receipts: helix = the shipped place/residue split (PLACE deterministic, RESIDUE stored). Full treatment: ndarray `guid-prefix-shape-routing.md` §4. +## Bipolar-phase pyramid — Walsh-Hadamard on VSA (operator, 2026-06-10) + +When the deterministic phase is **signed** (±1, one bit per address×level), +the perturbation pyramid becomes the Walsh-Hadamard transform of the +address tree, carried on the workspace's existing VSA-bipolar algebra: +- **Sign composition across levels = XOR = `vsa_bind`** (multiply of ±1 = XOR of sign bits; one SIMD shift+xor). +- **Magnitude bundling = `vsa_bundle`** (sum-and-threshold; Markov-respecting per `I-SUBSTRATE-MARKOV`). +- **Each cell = ⊕_L sign(addr, L) ·_VSA M(addr, L)** — a resonance field, not combinatorial selection; Parseval gives "top gaussian preserved" level-to-level. + +**Quantum-shaped, fully deterministic:** superposition (cells hold many +bundled contributions; unbind with a role key to extract one), +Heisenberg-shaped capacity bound (`I-VSA-IDENTITIES` Test 1: N ≤ √d/4 ≈ 32 +distinct readouts; this IS the uncertainty principle for the substrate), +roundtrip bit-exact (phase generated, not stored — same address ⟹ same +sign sequence forever; Walsh-Hadamard is self-inverse up to scale). +The "Schrödinger's cat" is in a glass box: superposition is real, +identity recoverable by key, no measurement randomness. + +**D-MANTISSA finishes in coprime form:** the bipolar phase IS the implied +mantissa as 1 sign-bit/level; the CurveRuler stride-4-over-17 walk +(integer, bit-exact, coprime ⟹ full permutation) is the generator — +**D-QUANTGATE-compliant by construction**. + +**The TWO-ALGEBRA rule (load-bearing):** **sign side = XOR** +(write-back I1 allows it for single-target deltas), **magnitude side = +`vsa_bundle` NEVER `MergeMode::Xor`** (raw-XOR-on-magnitudes breaks the +Markov semigroup, `I-SUBSTRATE-MARKOV`). Two operators, two algebras, +one pyramid. Fences: "quantum-like" is the bundling algebra, NOT +measurement randomness (no headline drift); bipolar = 1-bit phase; +multi-bit phases stack above it only when measured to be needed. Full +treatment + probes in ndarray `guid-prefix-shape-routing.md` §4b. + ## Standing watch — 3×4 vs 4×3 (operator mandate, 2026-06-10) **"Correct me at any time":** if evidence ever shows 3 tiers × 4 nibbles From 2c0dd0f5f89caa4c218c3dcbb6cac3142b83d035 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 22:13:50 +0000 Subject: [PATCH 16/18] =?UTF-8?q?docs(discovery-map):=20=C2=A72.10=20?= =?UTF-8?q?=E2=80=94=20the=20GUID=20canon=20pins=20folded=20into=20the=20l?= =?UTF-8?q?edger=20(H2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The canon avalanche of 2026-06-10 was pinned in CLAUDE.md P0 but absent from the D-* ledger — the index this map exists to keep truthful. Fold: Births (§2.10, one line each, canon = CLAUDE.md, table indexes only): D-CANON-GUID (hex dash-groups ARE the cascade; wrappers audited against it) · D-KEYKV (key 128 + value 3968 = 4096; zero value decode) · D-3X4 (uniform tiers, tier = nibble>>2; RFC = wrapper concern, v8-native pinned-then-REVERSED recorded; standing watch vs 4x3) · D-TILE256 (256x256 centroid tile; path = CAM-PQ 6x256; 4^4 hierarchy condition) · D-PREFIXBOOK (codebook scoping = class routing prefix) · D-PHASE (deterministic phase; only magnitude stored; QUANTGATE picks the generator) · D-WHP (bipolar phase = Walsh-Hadamard on VSA; TWO-ALGEBRA rule: sign=XOR, magnitude=bundle) · D-DELEG-INHERIT (né D-OTP-INHERIT; delegation NOT OTP; diamond needs ordered mixins) · D-IDENTITY-PIN (NodeGuid = wrapper carving; Phase B group-by-group audit). Corrective folds (sentinel/G-pass mirrors, mechanism kept, labels fixed): D-DELTA at its three sites (version = self-contained snapshot; cycle = RECENCY stamp; watermark-filter never diff-reconstruct; mechanism stays [G]) · D-MONOTILE promotion condition tightened (Walker leg AND hat-equivalence required; a 5+3 pass alone does not promote — F2 bridge condition; quasicryth-research arXiv 2603.14999 named as the purpose-described crate). Docs-only. PII abort-guard: CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/DISCOVERY-MAP.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/DISCOVERY-MAP.md b/docs/DISCOVERY-MAP.md index 14d555e..06a548b 100644 --- a/docs/DISCOVERY-MAP.md +++ b/docs/DISCOVERY-MAP.md @@ -61,7 +61,7 @@ reprioritizes the queue. | AriGraph (arXiv 2407.04363, Anokhin et al. 2024 — semantic + episodic KG world‑model with associative retrieval, for LLM‑agent planning) | Substrate realization | Grade | |---|---|---| | **semantic memory** (the world model) | **META = `MetaWord`** (the §4.1 layer — structural awareness) | mapping H | -| **episodic memory** (event sequence) | **EPISODIC = delta frames** = `DatasetVersion(v)→(v+1)` + per‑row `cycle` stamp (D‑DELTA) | H | +| **episodic memory** (event sequence) | **EPISODIC = delta frames** = `DatasetVersion(v)→(v+1)` + per‑row `cycle` stamp (D‑DELTA; label fold 2026‑06‑10: version = self‑contained snapshot, cycle = RECENCY stamp — watermark‑filter, never diff‑reconstruct) | H | | **associative retrieval of interconnected concepts** | **basins + supporters**: basins = palette256/CAM centroids + Semantik volumetric centroids + Morton‑prefix subtrees (D‑PAL256, D‑CAM, D‑AMORT‑AXES; the intra‑basin locality probe); supporters = the neighbor‑XOR retrieval (D‑NEIGH) | H | | **the encoded concepts** | **meaning vectors** = DeepNSM 4096‑dim (63 primes) → CAM‑PQ 6×256 (D‑NSM, D‑CAM) — *shipping* in lance‑graph `nsm/` | G (DeepNSM), G (AriGraph public) | @@ -161,7 +161,7 @@ two halves of a cell. ADR‑026 names the cascade that ties them. | D‑BGZ17 | the **discrete/immutable** counterpart to D‑MANTISSA: not "irrational" but **coprime‑aperiodic** — Base17 (`SpoBase17 = [i16;17]×3`, prime 17 ⊥ base‑16 Morton) ⟹ beat period `LCM(16,17)=272` (longest → lowest‑freq moiré). **Anti‑moiré upgrades `[H]`‑unmeasured → `[H]` with a *provable bound*** (number theory, not spectral) — still "longest‑period beat," not "no beat" (§2 caveat persists). `HighHeelBGZ` (basin + ≤240 edges) **realizes §0 AriGraph basin+supporters**; the "quorum" = the L1‑threshold basin‑merge consensus set. **Resolves the §4.1 unwired gap** (route the HEEL/HIP/TWIG/LEAF container by the `hhtl.rs` NiblePath; Base17=TWIG is the anti‑moiré layer). ρ=0.965 (TWIG) joins ρ=0.9973 (HIP) as measured anchors. For *immutable*, prefer this over D‑MANTISSA (exact/hashable vs float). | H | EPIPHANY | SYN §2 + §4.1 + §0 | D‑MANTISSA, D‑CAM, `[per rt]` `bgz17`/`HighHeelBGZ`/`SpoBase17` | | D‑QUANTGATE | **the quantization principle** (operator, 2026‑06‑08): **whenever there is quantization, the irrational does not have the Morton tile cascade guarantee.** Continuous irrationals (golden mantissa / D‑MANTISSA) lose their aperiodicity when quantized onto a lattice — the rounded value re‑acquires the period of the grid. So at every quantized layer, the substrate must use the **discrete coprime route** (D‑BGZ17, Base17×Morton) to preserve aperiodicity. The continuous irrational only survives as a *muscle‑memory* mantissa quorum: pre‑computed at codebook build time and **never re‑quantized in the hot path** (consistent with the amortization gate D‑AMORT). This **promotes ADR‑026's no‑collapse precondition (D‑NOCOLLAPSE) into a layered rule**: discrete‑coprime at every quantized boundary; muscle‑memory irrationals only at build‑time / continuous layers. **Reframes the §2 anti‑moiré caveat as architectural, not just unmeasured.** | G (the principle is structural) | EPIPHANY → ADR‑026 §2 | SYN §2 | D‑MANTISSA, D‑BGZ17, D‑AMORT, D‑NOCOLLAPSE | | D‑EXCITON | OLED exciton ↔ anti‑moiré: **REVERTED `[H]→[S]`** by the 5+3 agent review (2026‑06‑09; apparatus `.claude/agents/`, provenance §7). The `[H]` "OLEDs ship the same coprime aperiodicity as D‑BGZ17" was a **category error + a number mis‑label**: (a) the 1:3 S:T ratio is **exactly rational** — the SU(2) microstate count (1 vs 3), a *definitional identity, not a measurement* (`[G]` definitional), so *not* irrational; (b) **a scalar has no period to be aperiodic about** — aperiodicity is a property of an infinite tiling/sequence, and a bias‑shifted ratio or two energy scalars are points, not lattices; (c) the "~1.5 eV triplet *binding* energy" was the **T1 excited‑state energy mis‑labelled** — literature triplet E_b is sub‑eV (≈0.3–0.6 eV, arXiv 2311.03927), so the ratio is order ~1 **not** 3, and the *specific 1:3‑energy coincidence* that motivated the link does not survive. **Kept (`[G]`‑real legs, held apart from the dead analogy):** rational 1:3 (above); and the *harvest‑the‑dark physics* — phosphorescence (heavy‑metal SOC) + TADF (small ΔE_ST RISC) reach ~100% IQE (Baldo/Adachi; Uoyama 2012). Bias‑dependence (PMC4614446) is a **real but material‑specific** observation (`[G]` in its own literature) that carries **no aperiodicity and no substrate test** → its *link* value is `[S]`. **A `[G]` mechanism does not lend its grade to the `[S]` rhyme.** **Rejected re‑links (logged so they're not re‑proposed):** A = anti‑moiré ladder (no lattice/beat); B = amortization gate (no reuse axis — 1‑use recovery ≠ 1/N reuse). **Surviving reframe → `D‑LOSSCHAN` (§2.7), `[S]` do‑not‑build.** | S | EPIPHANY (reverted) | `.claude/agents/` 5+3 review; SYN §3 = also revert | — (anti‑moiré deps removed) | -| **D‑MONOTILE** | **the *third* anti‑moiré route — strongest, by theorem.** An **aperiodic monotile** (the "hat," Smith‑Myers‑Kaplan‑Goodman‑Strauss 2023; arXiv **2509.12216** Kaplan) is a *single shape that tiles the plane only non‑periodically* → it has **no translational period → no moiré beat, by a tiling theorem**, not by placement (D‑MANTISSA, `[H]` continuous) or by base‑coprimality (D‑BGZ17, `[H]`‑bounded). **The anti‑moiré is `[G]` (proven), and it survives quantization (a fixed discrete shape, immutable)** — so it satisfies D‑QUANTGATE *intrinsically*. **Cost / open question (`[H]`):** the hat is a **polykite on a hexagon+triangle lattice**, not the square Morton quadtree; adopting it changes the cascade geometry. Its **substitution (inflation) hierarchy** *is* a cascade — the open test is whether that hierarchy is **generalized‑Morton/Hilbert‑addressable** (arXiv 2309.15199, Walker — non‑power‑of‑2 + 3D Morton/Hilbert). If yes: anti‑moiré‑by‑theorem **+** cascade addressing. Hexagonal substrate ties to the `m²−mn+n²` (Eisenstein) covering norm of arXiv 2203.09323 (Richter). | anti‑moiré **G**; cascade‑addressability **H** | EPIPHANY | §7 papers | D‑BGZ17, D‑QUANTGATE, D‑CASCADE | +| **D‑MONOTILE** | **the *third* anti‑moiré route — strongest, by theorem.** An **aperiodic monotile** (the "hat," Smith‑Myers‑Kaplan‑Goodman‑Strauss 2023; arXiv **2509.12216** Kaplan) is a *single shape that tiles the plane only non‑periodically* → it has **no translational period → no moiré beat, by a tiling theorem**, not by placement (D‑MANTISSA, `[H]` continuous) or by base‑coprimality (D‑BGZ17, `[H]`‑bounded). **The anti‑moiré is `[G]` (proven), and it survives quantization (a fixed discrete shape, immutable)** — so it satisfies D‑QUANTGATE *intrinsically*. **Cost / open question (`[H]`):** the hat is a **polykite on a hexagon+triangle lattice**, not the square Morton quadtree; adopting it changes the cascade geometry. Its **substitution (inflation) hierarchy** *is* a cascade — the open test is whether that hierarchy is **generalized‑Morton/Hilbert‑addressable** (arXiv 2309.15199, Walker — non‑power‑of‑2 + 3D Morton/Hilbert). If yes: anti‑moiré‑by‑theorem **+** cascade addressing. Hexagonal substrate ties to the `m²−mn+n²` (Eisenstein) covering norm of arXiv 2203.09323 (Richter). | anti‑moiré **G**; cascade‑addressability **H** — **promotion condition tightened (2026‑06‑10):** `[H]→[G]` ONLY if the substitution hierarchy is shown generalized‑Morton/Hilbert‑addressable (the Walker leg) AND the tiling is hat‑equivalent (or the addressing provably generalizes) — a 5+3 pass alone does NOT promote (F2 bridge condition) | EPIPHANY | §7 papers; `quasicryth-research` (arXiv 2603.14999) is the purpose‑described crate — F2 reads it | D‑BGZ17, D‑QUANTGATE, D‑CASCADE | ### 2.5 Amortization gate @@ -180,7 +180,7 @@ two halves of a cell. ADR‑026 names the cascade that ties them. | D‑COLUMNAR | Morton‑keyed columnar rows + prefix pushdown = tile fetch (Delta `ZORDER`/Iceberg/BigQuery — deployed) | G | EPIPHANY | SYN §7.5 | D‑IMMAT | | D‑LANCE | "parquet‑shaped" = the columnar family; **Lance** is the instance (random tile access > Parquet row‑group scan) | G | EPIPHANY | SYN §7.5 | D‑COLUMNAR | | D‑PYRAMID | the unifying shape: columnar (parquet) + Morton rows (grid) + level cascade (pyramid) + closed‑form cell (shader) | H | EPIPHANY | SYN §7.5 | D‑COLUMNAR, D‑CASCADE | -| D‑DELTA | delta frames = version‑diff = changed Morton cells = codec P‑frame (I/P map; B does not, append‑only log) | H | EPIPHANY | SYN §7.5,§1 | D‑LANCE | +| D‑DELTA | delta frames = version‑diff = changed Morton cells = codec P‑frame (I/P map; B does not, append‑only log). **Label fold (2026‑06‑10, 5+3):** a Lance `DatasetVersion` is a **self‑contained snapshot** and `last_active_cycle` is a per‑row **RECENCY stamp** (WHEN, not WHAT) — consumers watermark‑filter, never diff‑reconstruct; the *mechanism* stays `[G]`, only the "changed‑cell delta" label is corrected | H→G (mechanism) | EPIPHANY | SYN §7.5,§1; INTEGRATION‑MAP L6 | D‑LANCE | ### 2.7 Cross‑domain synergy catalog @@ -219,6 +219,20 @@ two halves of a cell. ADR‑026 names the cascade that ties them. | D‑LITMUS‑FMA | FMA bones‑rendering = compile‑time HHTL litmus (~75K static classes) | H | doc | `RDF-OWL-ALIGNMENT.md §6` | | D‑LITMUS‑GEO | OSM = geographic litmus; "Femur is_a LongBone AND Marienplatz is_in Munich" sub‑µs | H | doc | `DOMAIN-INSTANCES.md §2.6` | +### 2.10 The GUID canon pins (operator, 2026‑06‑10) — canon = `CLAUDE.md` P0; this table indexes, never re‑derives + +| ID | Shape | Grade | Status | Home | Deps | +|---|---|:--:|:--:|---|---| +| **D‑CANON‑GUID** | the canonical identity is **HEX‑counted — it IS the GUID**: dash‑groups `8‑4‑4‑4‑12` = `classid‑HEEL‑HIP‑TWIG‑[basin·leaf(6)+identity(6)]`; 1 hex = 1 nibble = 1 tree level; self‑describing at sight; wrappers (NodeGuid #480) audited against it group‑by‑group, never the reverse | G (operator‑pinned) | **CANON** | `CLAUDE.md` P0; INTEGRATION‑MAP L0 | — | +| D‑KEYKV | **the GUID is the key of key‑value**: node = `key(128) + value(3968)` = 4096 bits; the key routes/resolves/compares/scopes/names with **zero value decode**; Lance compresses the value freely — compression never costs addressability | G (operator‑pinned) | CANON | `CLAUDE.md` P0 | D‑CANON‑GUID | +| D‑3X4 | **3 tiers × 4 nibbles, uniform**; `tier = nibble >> 2` (shift, never branch/divide); tiers u16‑aligned; dashes = tiers; RFC 9562 = **wrapper concern** (v8‑native was pinned then REVERSED — the 4/3/3 carving broke Morton stride uniformity); **standing watch** vs 4×3 with falsifiable flip condition | G (pinned) + watch | CANON | `CLAUDE.md` P0 + standing‑watch §; INTEGRATION‑MAP §9.10–11 | D‑CANON‑GUID | +| D‑TILE256 | each tier's 64k = a **256×256 centroid tile** (two byte‑axes, nibble‑interleaved); path = 6 bytes = **CAM‑PQ 6×256** → path distance = 3 tier‑LUT lookups O(1); rigor condition: codebooks built as **4⁴ hierarchies** so nibble prefixes = centroid ancestry | H + named test (PROBE‑CODEBOOK‑44 / F11‑adjacent) | EPIPHANY→CANON‑pin | `CLAUDE.md` P0 | D‑CANON‑GUID, D‑CAM, D‑PAL256 | +| D‑PREFIXBOOK | **codebook scoping = the class routing prefix** — longest‑prefix binding on the key's own hierarchy; per‑class 256⁶ semantic spaces for free; axis binding (x/y vs PQ pairs) is a class‑record property; codebooks mint with the class (Phase B shelf, D‑AMORT) | G (mechanism) / H (mint) | CANON‑pin | `CLAUDE.md` P0 | D‑TILE256, D‑AMORT | +| D‑PHASE | **perturbation = deterministic phase**: (exponent, location, phase, magnitude) — three terms derive from the KEY; **only the magnitude envelope is stored**; lossless for synthesis by construction; analysis remainder escalates per the quorum certificate; **D‑QUANTGATE picks the generator** (coprime‑integer `CurveRuler` in quantized layers); doubles as the anti‑moiré dither; cost scales with magnitude smoothness, not bandwidth | H + probes (PHASE‑1, PERT‑RHO, PYR‑1) | CANON‑pin | `CLAUDE.md` P0; ndarray `guid-prefix-shape-routing.md` §4 | D‑MANTISSA, D‑QUANTGATE, D‑IMMAT | +| D‑WHP | **bipolar phase = Walsh‑Hadamard on VSA**: signed (±1) phase makes the cascade the WH transform of the address tree; **sign = XOR (`vsa_bind`), magnitude = `vsa_bundle`** — the TWO‑ALGEBRA rule (raw‑XOR on magnitudes breaks Markov, I‑SUBSTRATE‑MARKOV); superposition + unbind‑by‑role‑key; N ≤ √d/4 IS the substrate's uncertainty principle; roundtrip bit‑exact; "quantum‑like" = the bundling algebra, NOT measurement randomness | H + probes (WHP‑1..4) | CANON‑pin | `CLAUDE.md` P0; ndarray §4b; lance‑graph §7 + E‑WHP‑BIPOLAR‑1 | D‑PHASE, D‑MANTISSA | +| D‑DELEG‑INHERIT (né D‑OTP‑INHERIT) | DO‑axis behavior resolution = **prototype‑chain delegation** (Self, Lieberman 1986) carried ON the supervision topology — **NOT an OTP behavior** (supervisors restart, they don't dispatch); diamonds have NO prefix encoding (tree relation) → ordered `mixins` traversal is the absent second mechanism; Odoo = C3 over `LastOrderedSet` install order, not naive source C3 | H + gate F1 (chain + diamond fixture) | EPIPHANY | INTEGRATION‑MAP §3 + F1 | D‑CANON‑GUID, `[per rt]` state_machine | +| D‑IDENTITY‑PIN | lance‑graph `NodeGuid` (#480) = the **wrapper carving** of the canon — groups 1–2 + 24‑bit `local` already match exactly; Phase B audits groups 3–4 yielding all eight nibbles to HIP/TWIG; `IDENTITY_LAYOUT_VERSION` stamp = the version gate | G (wrapper) / H (group 3–4 audit) | CODED (wrapper) | lance‑graph `identity.rs`; INTEGRATION‑MAP S1 | D‑CANON‑GUID | + --- ## 3. The materialization pipeline — what's ready, what's blocked @@ -286,7 +300,7 @@ on both sides** (the next materialization). | **D‑MORTON, D‑CASCADE, D‑XOR2 (containment)** | `lance-graph-contract/src/hhtl.rs`: `NiblePath { path:u64, depth:u8 }`, `FAN_OUT=16`, `MAX_DEPTH=16` (16 nibbles = 64 bits), `parent()=path>>4`, `child(n)=(path<<4)\|n`, `is_ancestor_of` = a single prefix‑shift kernel, `common_ancestor` = LCA. (q4‑hhtl‑audit) | **the runtime SHIPS the nibble address algebra** — these are CODED runtime‑side, not just EPIPHANY | | **D‑IMMAT, D‑COLUMNAR, ADR‑022** | `soa-three-tier-model.md` invariant: *"zero‑copy from creation to Lance tombstone … no bytes leave the backing store … even then the in‑memory store is unchanged, not serialized and freed."* `MailboxSoA::emit()` + `CollapseGateEmission` **scheduled for removal** | the "immaterialized, never serialized" finding IS the runtime's ONE invariant; the serialization path is being **deleted** | | **D‑COLUMNAR, D‑LANCE (column projection)** | `soa_envelope.rs`: `SoaEnvelope` trait — `columns()->&[ColumnDescriptor]`, `ColumnDescriptor{name_id,kind,elems_per_row,row_offset}` (`repr(C)`), zero‑copy `row_le`/`column_le` views, `as_le_bytes()`, `verify_layout()` gate | the "Morton‑keyed columnar + projection" framing is the `SoaEnvelope` ABI, line‑for‑line | -| **D‑DELTA (delta frames = version‑diff)** | `cycle()->u32` stamp; *"a Lance version IS a coherent LE envelope"* (soa_envelope L16); `last_active_cycle [u32;N]` = per‑row same‑cycle write guard; `DatasetVersion(v)→(v+1)` | a Lance version = a frame; the per‑row cycle stamp = the changed‑cell delta → **D‑DELTA promotes [H]→[G]** | +| **D‑DELTA (delta frames = version‑diff)** | `cycle()->u32` stamp; *"a Lance version IS a coherent LE envelope"* (soa_envelope L16); `last_active_cycle [u32;N]` = per‑row same‑cycle write guard; `DatasetVersion(v)→(v+1)` | a Lance version = a **self‑contained snapshot** ("frame"); the per‑row cycle stamp = a **RECENCY stamp** (WHEN last changed — watermark‑filter, never diff‑reconstruct; label corrected 2026‑06‑10) → **D‑DELTA promotes [H]→[G]** on the mechanism | | **D‑AMORT (amortize‑or‑don't‑spend)** | PR #478 mechanical test: *never‑mutated → const codebook, **keep**; mutated‑after‑init → SoA snapshot, **nudge**.* Read‑only codebooks (role keys, UDFs, `simd_caps`) stay const | the gate's storage instance, **operationalized** — const codebooks = the amortized build‑once structures; SoA = per‑cycle mutable | ### Revision — runtime evidence corrects a finding ⚠ From 243cc90d43a35e6e708a06aa4041e021d5d87696 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Wed, 10 Jun 2026 22:28:43 +0000 Subject: [PATCH 17/18] =?UTF-8?q?docs:=20INTEGRATION-TEST-PLAN=20=E2=80=94?= =?UTF-8?q?=20the=20probe-first=20execution=20companion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Born from the session's own regrounding audit: six turns of synthesis, zero probes run — the workspace rule applies verbatim ('if the probe is NOT RUN, the next deliverable is the probe, not more synthesis'). This plan orders ALL the work probe-first: §0 The three shaky joints (J1 TILE256<->PREFIXBOOK circularity; J2 'lossless for synthesis' scope drift; J3 Parseval != gaussian-preservation) promoted to first-class falsification targets — each with its resolving probe AND its kill condition. A probe without a kill condition is theater. §1 Wave 0 — ground in 48 hours: seven probes runnable against SHIPPED code only (~170 LOC of tests, zero new impl): PHASE-1 (CurveRuler determinism), WHP-1a/1b (Parseval split — transform vs quantized envelope), PHI-1 (phi-stride vs uniform), F2 (quasicryth paper_theorems run), F13 (parity suite verify), F8 (helix fidelity — lance-graph's oldest owed probe, #459). §2 Wave 1 — first impl bricks, each gated: C (SoaEnvelope keystone, F6) · O1 (Class traversal API) · PrefixShapeTable (ROUTE-1) · WHP-3/4 (incl. the permanent two-algebra CI guard) · HILBERT-L4 fix (the PP-13 P0-4 red that blocks every L4 claim). §3 Wave 2 — the conjecture tower gets numbers: 4^4 codebook builder (CODEBOOK-44 + BOOT-1 -> J1) · perturbation encoder v0 (PERT-RHO with reported escalation rate -> J2) · F3 spectral anti-moire · F10-F12 anchor re-measures. §4 Wave 3 — identity-arc phases gated per INTEGRATION-MAP (D/B/O7/ R1-R3 incl. the NodeGuid group-3/4 audit addendum); §5 Wave 4 — consumers; §6 standing rules (every red is a same-day ledger event; thresholds measured never optimism); §7 ownership. CLAUDE.md doc-family updated (the plan is read #3). Docs-only. PII abort-guard: CLEAN. No model identifier. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- CLAUDE.md | 7 +- docs/INTEGRATION-TEST-PLAN.md | 127 ++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 docs/INTEGRATION-TEST-PLAN.md diff --git a/CLAUDE.md b/CLAUDE.md index ade2750..4762fa8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -168,7 +168,12 @@ alignment costs. Until measured: 3×4 stands. `[G]`/`[H]`/`[S]`, append-only). 2. `docs/INTEGRATION-MAP.md` — layers, seams (each with its contract TYPE), the phase DAG, falsification gates F1–F14. -3. `docs/OGAR-AST-CONTRACT.md` — the IR type surface (THINK arm `Class` +3. `docs/INTEGRATION-TEST-PLAN.md` — the probe-first execution + companion: wave-ordered probes (Wave 0 runs entirely against + shipped code), the three falsification joints J1–J3 with explicit + KILL conditions, and the operating rule that no integration brick + lands before its probe is green. +4. `docs/OGAR-AST-CONTRACT.md` — the IR type surface (THINK arm `Class` / DO arm `ActionDef`+`ActionInvocation` / membrane `KausalSpec`). 4. `docs/ARCHITECTURAL-DECISIONS-2026-06-04.md` — ADR-001..025 (ADR-026 pending). diff --git a/docs/INTEGRATION-TEST-PLAN.md b/docs/INTEGRATION-TEST-PLAN.md new file mode 100644 index 0000000..43b86fd --- /dev/null +++ b/docs/INTEGRATION-TEST-PLAN.md @@ -0,0 +1,127 @@ +# INTEGRATION & TEST PLAN — the probe-first execution companion + +> **Status: EXECUTION PLAN v1** (2026-06-10). Companion to +> `DISCOVERY-MAP.md` (what was found) and `INTEGRATION-MAP.md` (how it +> composes). **This doc orders the work: no integration brick lands +> before its probe is green.** It exists because the session's own +> audit found six turns of synthesis and zero probes run — the +> workspace rule applies verbatim: *if the probe is NOT RUN, the next +> deliverable is the probe, not more synthesis.* +> +> Grading as everywhere: `[G]`/`[H]`/`[S]`; every probe row names what +> a PASS grounds and — equally load-bearing — **what a FAIL kills**. +> A probe without a kill-condition is theater. + +--- + +## 0. The three shaky joints (self-audit, 2026-06-10) — first-class falsification targets + +The canon floor (operator-pinned GUID, key-of-key-value, 3×4) is +ground truth by definition. The conjecture tower above it has three +joints that were never checked; each gets a named probe and a kill: + +| # | Joint | The unexamined step | Resolving probe | Kill condition | +|---|---|---|---|---| +| J1 | **TILE256 ↔ PREFIXBOOK circularity** | the address picks the codebook that picks the address — does the recursion bottom out? | **PROBE-BOOT-1** (+ CODEBOOK-44): mint a class codebook from a corpus at BUILD time, assign addresses, re-derive — show fixpoint or document one-shot non-recursive build | no stable bootstrap → D-TILE256 demoted `[S]`; tier = spatial Morton only; CAM-PQ distance stays value-side | +| J2 | **"lossless for synthesis" scope drift** | dither-grade reconstruction ≠ content reconstruction; prose drifts toward implying the latter | **PROBE-PERT-RHO** with the *escalation rate reported* | ρ < anchor on representative tiles → D-PHASE stays dither/anti-moiré only; all codec-savings claims struck | +| J3 | **Parseval ≠ gaussian-preservation** | WH orthogonality conserves L2 *of the transform*; says nothing about the **quantized** magnitude envelope | **PROBE-WHP-1a** (transform, should pass — math) split from **WHP-1b** (L2 drift through `RollingFloor` quantization — the real question) | WHP-1b outside the Pflug band → strike "top gaussian preserved"; keep WH as sign-algebra only | + +--- + +## 1. Wave 0 — ground in 48 hours (runs against SHIPPED code; zero new impl) + +Every row here is executable today; total new code ≈ 170 LOC of tests. + +| Probe | Where (proposal) | LOC | Pass | Fail kills | Grounds | +|---|---|---|---|---|---| +| **PROBE-PHASE-1** | `lance-graph/crates/helix/tests/phase_determinism.rs` | ~40 | `CurveRuler` walk bit-identical across runs/platforms; full 17-permutation verified | the deterministic-phase generator claim → D-PHASE loses its `[G]`-mechanism leg | the generator leg of D-PHASE | +| **PROBE-WHP-1a** | `helix` or `jc` example (scalar) | ~30 | `Σ\|cell\|² = Σ\|M_L\|²` exact for ±1 fields (orthogonality) | the WH framing itself (unlikely — math) | D-WHP transform leg | +| **PROBE-WHP-1b** | same file | ~30 | L2 drift through `RollingFloor` ≤ Pflug band | **"top gaussian preserved" wording (J3)** | the only part of D-WHP that was actually in doubt | +| **PROBE-PHI-1** | `jc` (companion to its `weyl` module) | ~40 | φ-stride probe sets beat uniform-random on star-discrepancy at equal n | the φ leg of the quorum (quorum survives on uniform probes) | quorum placement | +| **F2 (read+run)** | `lance-graph/crates/quasicryth-research` — `cargo test` | 0 | `paper_theorems.rs` green + hierarchy read confirms/refutes generalized-Morton addressability of a hat-equivalent tiling | nothing (red = D-MONOTILE stays `[H]` with a concrete failure shape — still progress) | possibly the biggest single promotion available (D-MONOTILE) | +| **F13 (verify)** | run the existing `simd_dispatch` W1c parity suite | 0 | 1-ULP across AVX-512/NEON/scalar (contract says mandatory — may already be green) | the correctness floor under every other probe | the floor | +| **F8** | helix fidelity probe (owed since #459: "CONJECTURE — NOT RUN") | ~60 | naive-u8 floor ≥ 0.9980 Pearson vs ground truth | helix's clean-room promotion | closes lance-graph's own oldest owed probe | + +**Wave-0 exit:** ≥5 of 7 green → proceed. J3 resolved either way. +Any red is a *result* — recorded in DISCOVERY-MAP, grade moved, prose +corrected (the D-EXCITON pattern: revert with reasons, keep the +`[G]`-real legs). + +## 2. Wave 1 — first implementation bricks (each gated by its probe) + +| Brick | Repo | LOC est | Gate | Depends on | +|---|---|---|---|---| +| **C: `impl SoaEnvelope for MailboxSoA`** (the keystone; zero production impls today) | lance-graph shader-driver | ~150 | **F6**: `verify_layout()` green; `as_le_bytes().as_ptr() == backing` (zero-copy proven) | — (leaf) | +| **O1: `Class` traversal API** (`member_of`/`members`/`group_members`/`includes`/`associations_of`) — methods on the carrier per The Click | OGAR `ogar-vocab` | ~50 + tests | unit tests incl. `through`/`inverse_of` resolution | — (leaf) | +| **PrefixShapeTable** (layout-only sibling of `MultiLaneColumn`) | ndarray `simd_soa` layer | ~150 | **PROBE-ROUTE-1**: batch ≡ scalar on 10⁶ keys; ≥4× at N=1024 | — (leaf; consumer registration comes later) | +| **WHP-3 + WHP-4** against shipped `vsa_bind`/`vsa_bundle` | lance-graph contract tests | ~130 | WHP-3: unbind margin holds to N ≤ √d/4, fails cleanly past; WHP-4: raw-XOR-on-magnitudes FAILS Chapman-Kolmogorov (a deliberately-failing guard) | — | +| **HILBERT-L4 fix** (PP-13 P0-4: re-derive `NEXT_STATE` from Hamilton 2006; exhaustive 4096-cell round-trip) | ndarray `linalg/hilbert.rs` | ~80 | `decode(encode(p,4),4)==p` exhaustive (≈16 ms) | — ; **blocks every L4 cascade claim until green** | + +**Wave-1 exit:** C green unlocks the critical path; the two-algebra +guard (WHP-4) is permanently in CI. + +## 3. Wave 2 — the conjecture tower gets its numbers + +| Brick | Gate(s) | Depends | Kill | +|---|---|---|---| +| **4⁴ hierarchical codebook builder** (4-level 4-ary k-means, 256 leaves) | **CODEBOOK-44**: fidelity within Pflug band of flat-256; **PROBE-BOOT-1**: bootstrap fixpoint (J1) | corpus (synthetic v0 OK) | J1 kill above — D-TILE256 → `[S]` | +| **Perturbation encoder v0** (magnitude-plane + CurveRuler phase; coarse-granularity M) | **PERT-RHO** (J2; escalation rate REPORTED) + **PYR-1** (escalation tier byte-exact) + **WHP-2** (cross-backend roundtrip) | PHASE-1 green | J2 kill above | +| **Spectral anti-moiré** (jc P3 + `hpc::fft`: golden vs Base17, pre/post quantization) | **F3** — promotes D-MOIRE/D-MANTISSA or falsifies; demonstrates D-QUANTGATE's contrast | runtime session owns jc — coordinate | D-MOIRE `[H]`→dead if FFT peak appears | +| **ρ anchors re-measured** | **F10/F11/F12** (depth law; 0.9973/0.965 anchors; θ window) | runtime session | anchors drift → every τ recalibrates | + +## 4. Wave 3 — identity-arc integration (the lance-graph N-phases, now gated) + +Critical path `(C → D) ∥ ((R1 ∥ O7 ∥ B) → R2) → R3`, all gates already +defined in INTEGRATION-MAP §5–6: + +| Phase | Gate | Note | +|---|---|---| +| D: cognitive-write `TripletProjection` + `roundtrip_eq` | **F5** (corrupt-pack must FAIL; NARS (f,c) within 1/1023) | needs C ✅(W1) | +| B: registry mint `(entity_type ↔ NiblePath)` + live `StructuralSignature` | **F4** bijection round-trip at build time | ontology side; also gates F14 | +| O7: `String → Identity` lift in ogar-vocab | unit: parent resolution via registry | the IR's typed-edge prerequisite for R2 | +| **Phase-B addendum (new):** NodeGuid group-3/4 audit | groups 3–4 yield all 8 nibbles to HIP/TWIG (canon-pass consequence) | one layout change + field-isolation matrix per I-LEGACY-API | +| R1/R2/R3: state_machine verify → ActionDef lowering → **F1** (chain + DIAMOND fixture, C3-over-`LastOrderedSet`) | F1 | **externally owned** — the only critical-path leg owned by no present session; coordination risk stays flagged | +| E/F/G: project_graph → MetadataStore migration → EntityKey wiring | per-phase DoD (INTEGRATION-MAP) | after D; F needs B | + +## 5. Wave 4 — consumers & the long tail + +O2 parse-walk completion (EnumDecl lift · DEFINE EVENT→ActionDef · +non-owning post-pass — O1 unblocks the post-pass) → O3 `ogar-python` +(Odoo 17) → quorum certificate type (the #411 `contract::quorum` +scaffold) + **QUORUM-1** → O5 content tiers + **F7** → F9 kv-lance pins +→ X-track debt (X1 rename, X3 ResonanceDto fold, X4 HHTL +route-by-prefix, X5/X6) → F14/X7 wide-model render after B. + +## 6. The standing rules this plan operates under + +1. **Probe before synthesis** (workspace P0, now enforced by wave + structure: a wave does not open until the prior wave's exit + condition is met or its reds are *recorded as results*). +2. **Every red is a ledger event** — grade moves in DISCOVERY-MAP the + same day (the D-EXCITON revert is the template: keep `[G]`-real + legs, strike the dead analogy, name the survivor). +3. **Thresholds are measured, never optimism** (PP-13 P0-2/P0-3: + placeholder thresholds must not gate; relative tolerances for + spectral claims). +4. **Two-algebra guard is permanent CI** (WHP-4 ships as a + deliberately-failing-if-violated test). +5. **Standing watches stay armed**: 3×4-vs-4×3 flip condition; + "correct the operator at any time" mandate (CLAUDE.md). + +## 7. Ownership & coordination + +| Who | Owns | +|---|---| +| this session (OGAR + docs) | Wave 0 helix/jc probes, O1, O2-prep, ledger folds on every result | +| lance-graph session(s) | C, D, B, WHP-3/4, F5/F6, X-track | +| ndarray session(s) | PrefixShapeTable + ROUTE-1, HILBERT-L4 fix, perturbation encoder, CODEBOOK-44 | +| runtime/jc session | F3, F10–F12, R1/R2 (state_machine + binding) | +| operator | merge order #47→#48; PRs for the two crystallization branches; the J1/J2/J3 verdict calls if a kill fires | + +--- + +*Cross-refs: `DISCOVERY-MAP.md` §2.10 (the canon pins this plan +tests) · `INTEGRATION-MAP.md` §5–6 (the DAG + gates F1–F14) · +ndarray `guid-prefix-shape-routing.md` §3–5 · lance-graph +`guid-canon-and-prefix-routing.md` §2–7 · PP-13 verdict (the theater +casebook every threshold rule traces to).* From f930e157fc7b90393f9649a14696480f57394616 Mon Sep 17 00:00:00 2001 From: "Claude (OGAR session)" Date: Thu, 11 Jun 2026 01:45:46 +0000 Subject: [PATCH 18/18] =?UTF-8?q?docs(test-plan):=20Codex=20fix=20on=20#50?= =?UTF-8?q?=20=E2=80=94=20F13=20is=20a=20mandatory=20pass,=20never=20a=20q?= =?UTF-8?q?uorum=20member?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Wave-0 exit '>=5 of 7 green' allowed F13 (the parity floor under every other probe) to be one of the acceptable failures — contradicting the plan's own probe-first rule. Fixed: F13 green is MANDATORY (red F13 halts all waves); quorum (>=4 of the remaining 6) applies to the rest. Generalized: prerequisite probes are mandatory passes, never quorum members. Also folds in the session's first receipt: HILBERT-L4 verified green first-hand (13/13 incl. L4 bijectivity + connectivity; PP-13 P0-4's 'expected 4095' was orientation, not contract) — the Wave-1 fix brick is CLOSED with zero LOC, the suite stays as the standing gate. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY --- docs/INTEGRATION-TEST-PLAN.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/INTEGRATION-TEST-PLAN.md b/docs/INTEGRATION-TEST-PLAN.md index 43b86fd..f153156 100644 --- a/docs/INTEGRATION-TEST-PLAN.md +++ b/docs/INTEGRATION-TEST-PLAN.md @@ -42,10 +42,21 @@ Every row here is executable today; total new code ≈ 170 LOC of tests. | **F13 (verify)** | run the existing `simd_dispatch` W1c parity suite | 0 | 1-ULP across AVX-512/NEON/scalar (contract says mandatory — may already be green) | the correctness floor under every other probe | the floor | | **F8** | helix fidelity probe (owed since #459: "CONJECTURE — NOT RUN") | ~60 | naive-u8 floor ≥ 0.9980 Pearson vs ground truth | helix's clean-room promotion | closes lance-graph's own oldest owed probe | -**Wave-0 exit:** ≥5 of 7 green → proceed. J3 resolved either way. -Any red is a *result* — recorded in DISCOVERY-MAP, grade moved, prose -corrected (the D-EXCITON pattern: revert with reasons, keep the -`[G]`-real legs). +**Wave-0 exit (Codex-corrected on #50):** **F13 green is MANDATORY** — +it is the correctness floor under every other probe; a red F13 HALTS +all waves until fixed and never counts as an acceptable quorum +casualty. Of the remaining six, ≥4 green → proceed. **General rule: a +probe that is a PREREQUISITE of later bricks is a mandatory pass, never +a quorum member.** J3 resolved either way. Any red is a *result* — +recorded in DISCOVERY-MAP, grade moved, prose corrected (the D-EXCITON +pattern: revert with reasons, keep the `[G]`-real legs). + +**First receipt already in (2026-06-10):** the HILBERT-L4 question was +run first-hand while triaging Codex on the ndarray PR — **13/13 green** +incl. `level4_all_indices_unique` (bijective onto [0,4096) — exactly +what cascade addressing needs) and `level4_curve_is_connected`. PP-13 +P0-4's "expected 4095" was an orientation assumption, not the contract. +One claim flipped by execution before Wave 0 formally opened. ## 2. Wave 1 — first implementation bricks (each gated by its probe) @@ -55,7 +66,7 @@ corrected (the D-EXCITON pattern: revert with reasons, keep the | **O1: `Class` traversal API** (`member_of`/`members`/`group_members`/`includes`/`associations_of`) — methods on the carrier per The Click | OGAR `ogar-vocab` | ~50 + tests | unit tests incl. `through`/`inverse_of` resolution | — (leaf) | | **PrefixShapeTable** (layout-only sibling of `MultiLaneColumn`) | ndarray `simd_soa` layer | ~150 | **PROBE-ROUTE-1**: batch ≡ scalar on 10⁶ keys; ≥4× at N=1024 | — (leaf; consumer registration comes later) | | **WHP-3 + WHP-4** against shipped `vsa_bind`/`vsa_bundle` | lance-graph contract tests | ~130 | WHP-3: unbind margin holds to N ≤ √d/4, fails cleanly past; WHP-4: raw-XOR-on-magnitudes FAILS Chapman-Kolmogorov (a deliberately-failing guard) | — | -| **HILBERT-L4 fix** (PP-13 P0-4: re-derive `NEXT_STATE` from Hamilton 2006; exhaustive 4096-cell round-trip) | ndarray `linalg/hilbert.rs` | ~80 | `decode(encode(p,4),4)==p` exhaustive (≈16 ms) | — ; **blocks every L4 cascade claim until green** | +| ~~HILBERT-L4 fix~~ → **CLOSED: VERIFIED GREEN, no fix needed** (run 2026-06-10: 13/13 incl. L4 bijectivity + connectivity; PP-13 P0-4's "expected 4095" was orientation, not contract) | ndarray `linalg/hilbert.rs` | 0 | the exhaustive suite stays as the **standing gate** for any future table change | — | **Wave-1 exit:** C green unlocks the critical path; the two-algebra guard (WHP-4) is permanently in CI. @@ -114,7 +125,7 @@ route-by-prefix, X5/X6) → F14/X7 wide-model render after B. |---|---| | this session (OGAR + docs) | Wave 0 helix/jc probes, O1, O2-prep, ledger folds on every result | | lance-graph session(s) | C, D, B, WHP-3/4, F5/F6, X-track | -| ndarray session(s) | PrefixShapeTable + ROUTE-1, HILBERT-L4 fix, perturbation encoder, CODEBOOK-44 | +| ndarray session(s) | PrefixShapeTable + ROUTE-1, perturbation encoder, CODEBOOK-44 (HILBERT-L4: CLOSED — verified green) | | runtime/jc session | F3, F10–F12, R1/R2 (state_machine + binding) | | operator | merge order #47→#48; PRs for the two crystallization branches; the J1/J2/J3 verdict calls if a kill fires |