Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
## 2026-06-09 — plan addendum: left-prefix parsing confirmed + D-PG-7 deterministic foveated tree-builder

**Main thread (Fable).** User direction validated against identity.rs octets: GUID left half (class+tree) is order-preserving plain bytes ⇒ Cypher label/subtree patterns = byte-prefix predicates on FixedSizeBinary(16) via Lance zone-maps; similarity leg (RaBitQ/CAM-PQ/Binary16K) rides the same row. Two caveats recorded (namespace-first ordering; ≤4-nibble GUID prefix). New M6 + D-PG-7: NiblePath assignment computable by deterministic hierarchical partition ("deterministic Louvain" → concretely ndarray CLAM pole-split, 16-way, capacity-bounded ⇒ foveation), with the iron requirement APPEND-STABLE (bootstrap once; minted paths never move; layout_version gates changes). Query-time twin noted (cascade / bgz-tensor HHTL cache). Plan §8 + STATUS_BOARD row. Commit: this.

## 2026-06-09 — polyglot query-membrane research: 2 sweeps + spot-verification → plan v1 (D-PG-1..6)

**Main thread (Fable 5 1M) + 2 Explore sweeps (Sonnet).** Researched "parse mailboxes via SurrealDB's AST adapter as a normal cold path; ontology = Christmas tree, decorations materialize at HHTL addresses" + user-added scope (Node Container answers DataFusion UDF + SurrealQL DDL AST + Neo4j/Cypher). Verified at file:line: fork keys storekey-encoded ORDER-PRESERVING (arrays incl.), record-ranges lower to `stream_keys_vals(beg..end)` (pipeline.rs:223) → HHTL subtree = one native range scan under `addr64 = path << 4·(16−depth)`; kv-lance FULLY in-tree (get :646 / keys :824 / scan :848, MVCC+timeline, ~6k test lines) — `surreal_container` BLOCKED(C/D) stale; typed `surrealdb-ast` crate + C16b DDL builders (`new_for_ddl`→`ToSql`, DB-free; consumer op-surreal-ast/nexgen) = the AST-adapter surface; frontend slot = ArenaIR strategy registry (mod.rs:57-60). **Agent-claim correction:** sweep claimed `MailboxSoA<N>` impls `SoaEnvelope` — spot-grep disproved (only TestEnvelope; identity N3 LIVE → D-PG-2). Ruling respected (LanceDB leads; SurrealDB = view). Deliverable: `.claude/plans/polyglot-container-query-membrane-v1.md` + INTEGRATION_PLANS prepend + STATUS_BOARD D-PG-1..6 (all Queued). No code. No epiphany entries (council gate available on request). Commit: this.

## 2026-06-09 — D-IDENTITY-2 Phase B first brick: frugal north-star mint (dedup + bijection) landed

**Main thread (Fable).** Implemented moves 1+2+3 of the identity plan's Phase B seam in `lance-graph-ontology` (registry.rs +242, namespace.rs, bridge.rs): (1) dedup-by-URI mint — a canonical class URI already in the dictionary REUSES its global `entity_type` (new row, new bridge/namespace, same template id); fresh mints stay monotone append-order with gaps, u16-overflow-guarded. (2) `entity_type↔NiblePath` bijection pair table + `register_class_path` (both-way conflict-rejecting, EMPTY-sentinel guard, idempotent same-pair) + `niblepath_of`/`entity_type_of`/`rows_with_entity_type`. (3) round-trip tests. +5 tests (dedup-shares-id, monotone-with-gaps, checksum-reappend-keeps-id, bijection-round-trips, bijection-conflicts-rejected); 14 registry tests green; crate suites green. 3 stale-doc fixes (namespace.rs "dense within the namespace" → GLOBAL; bridge.rs "dense index" → compare-only). My 3 files clippy/fmt-clean; pre-existing crate-wide `-D warnings` (oxrdf/doc-overindent in untouched files) + fmt drift (54 files) left as-is per surgical-diff discipline. Board: STATUS_BOARD identity section (D-IDENTITY-1..4), TD-PAIRTABLE-1, plan LANDED note. Deferred: move 4 (gate positional helper, D-IDENTITY-3).

## 2026-06-09 — D-IDENTITY Phase B: global entity_type ratified + mint trace correction

**Main thread (Opus→Fable mid-session).** Decision-gate ratified `entity_type` = GLOBAL shared template id (DECISION-3). Pre-change trace overturned two beliefs: (a) `namespace.rs:12` "dense within the namespace" is STALE — live mint `registry.rs:476` is already global append-order; (b) registry is NOT template-deduped (own claim, corrected in-place in the plan). Blast radius of global/sparse ids traced benign (~16 readers, none dense-index). Synthesis: bijection IS the dedup — one `NiblePath ↔ entity_type` pair table = template registry + dedup index + bijection witness. Plan: DECISION-3 + CORRECTION + refinement. Epiphany: E-MINT-TRACE-1; E-OGAR-NORTHSTAR-1 Status updated. Rides in #481. Next: implement first brick (pair-table mint + round-trip test) in lance-graph-ontology.
**Main thread (Opus→Fable mid-session).** Decision-gate ratified `entity_type` = GLOBAL shared template id (DECISION-3). Pre-change trace overturned two beliefs: (a) `namespace.rs:12` "dense within the namespace" is STALE — live mint `registry.rs:476` is already global append-order; (b) registry is NOT template-deduped (own claim, corrected in-place in the plan). Blast radius of global/sparse ids traced benign (~16 readers, none dense-index). Synthesis: bijection IS the dedup — one `NiblePath ↔ entity_type` pair table = template registry + dedup index + bijection witness. Plan: DECISION-3 + CORRECTION + refinement. Epiphany: E-OGAR-NORTHSTAR-1 Status updated. Rides in #481. Next: implement first brick (pair-table mint + round-trip test) in lance-graph-ontology.

## 2026-06-09 — D-IDENTITY decisions: OGAR mirror (ratified) + north-star template model

Expand Down
37 changes: 2 additions & 35 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,7 @@
## 2026-06-09 — E-MINT-TRACE-1 — the live mint is already global (registry.rs:476); the "namespace-local" doc is stale; dedup is net-new; the bijection IS the dedup

**Status:** FINDING (traced, ratified: `entity_type` = global shared template id)
**Confidence:** High (read the mint, not the doc comment)

**Trace before change paid twice.** (1) `namespace.rs:12` documents `entity_type_id` as "dense **within the namespace**" — but the actual mint is `registry.rs:476 entity_type_id = (rows.len()+1)`: **global append-order across all namespaces**. The doc comment is stale; the GLOBAL semantics DECISION-2/3 want are already the live behavior. (2) It corrected this session's own claim, minutes old: the registry is **not** template-deduped — every append mints a fresh id (`enumerate_first_with_entity_type_id` is defensive, not reuse evidence). Frugal dedup + the `entity_type↔NiblePath` pairing are net-new.

**Blast radius traced benign:** ~16 `entity_type_id()` readers store-as-column-value or compare; none dense-index an array BY entity_type. Global/sparse ids break nothing. Dedup consequence: per-id row lookup becomes namespace-ambiguous ⇒ resolve by `(namespace, entity_type)`.

**The synthesis that shrinks Phase B:** the bijection IS the dedup. One pair table `NiblePath ↔ entity_type` in the registry: path present ⇒ reuse the template id (new row, new namespace); absent ⇒ mint fresh (monotone, never reused) + record the pair. The pair table is simultaneously the template registry, the dedup index, and the bijection witness the round-trip test proves. Moves 1+2 of the Phase B seam are one mechanism.

**Process lesson (generalizes):** doc comments describe intent at write-time; the mint line is the contract. For any "is this id local or global / dense or sparse" question, read the assignment site and grep for dense-indexing consumers before believing prose.

**Cross-ref:** identity-architecture plan DECISION-3 + Phase B grounded seam (CORRECTION block); E-OGAR-NORTHSTAR-1 (Status updated); I-LEGACY-API-FEATURE-GATED (the positional `contract/ontology.rs:85` helper is the v1 path to gate).

## 2026-06-09 — E-ANCESTRY-TRINITY-1 — NiblePath::is_ancestor_of is ONE bit-shift read three ways: subClassOf = supervision-edge = north-star template specialization

**Status:** FINDING (cross-session convergence — OGAR/SurrealDB session + identity-contract session, independently)
**Confidence:** High

**The convergence.** A parallel CCA2A session (OGAR / nexgen op-surreal-ast / SurrealDB RecordId) pulled #480 and independently re-derived the OGAR↔lance-graph membrane as **"the registry mint of `(entity_type, NiblePath)` per class"** — exactly DECISION-2 (OGAR mirror) committed from this side in #481. Two sessions, opposite directions, same membrane.

**The new synthesis it surfaces:** `NiblePath::is_ancestor_of` (a single HHTL bit-shift on the GUID routing prefix) is simultaneously THREE relations:
- **OWL `subClassOf`** (ontology inheritance) — OGAR-AST-CONTRACT §1.
- **OTP supervision edge** (ractor parent-routing / delegation through `OrchestrationBridge`) — the other session's "supervisor-edge is now [G] mechanical" finding.
- **North-star template specialization** (a domain class descends from its shared template) — E-OGAR-NORTHSTAR-1.

They are the SAME relation: the north-star template hierarchy IS the routing/supervision hierarchy IS the subClass hierarchy — one bit-shift, three names. Consequence: reusing a template (inherit + switch namespace), being-supervised-by, and being-a-subclass-of are the same arithmetic; there is no separate routing structure to maintain.

**Coordination:** the OGAR session is on #480 (Phase A); #481 carries the OGAR-side answer it needs — OGAR = OGIT mirror, immutable ClassIds, north-star spine, `namespace`=domain. Its proposed `D-IDENT` paired-note + `D-IDENTITY-PIN` should absorb the `namespace`=domain + north-star framing on next pull.

**Cross-ref:** E-OGAR-NORTHSTAR-1; E-IDENTITY-WHITEBOX-1; identity-architecture DECISION-2 + north-star guard; `hhtl.rs::is_ancestor_of`.

## 2026-06-09 — E-OGAR-NORTHSTAR-1 — ontology cache = OGAR mirror with a reusable north-star template spine (namespace specializes, entity_type is shared)

**Status:** DECISION (OGAR mirror RATIFIED via decision-gate; north-star template model RATIFIED 2026-06-09 "frugal it is"; `entity_type` = GLOBAL shared template id RATIFIED via decision-gate — see E-MINT-TRACE-1)
**Confidence:** High (both halves ratified; mint trace confirms global append-order is already the live mint)
**Status:** DECISION (OGAR mirror RATIFIED via decision-gate; north-star template model RATIFIED 2026-06-09 "frugal it is"; `entity_type` = GLOBAL shared template id RATIFIED via decision-gate)
**Confidence:** High (both halves ratified; the live mint is global append-order across namespaces)

**Two decisions, one architecture.**

Expand Down
16 changes: 16 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2026-06-09 — polyglot-container-query-membrane-v1 (Node Container answers Cypher + SurrealQL AST + DataFusion UDF over one HHTL address space; mailbox = a normal cold path)

**Status:** RESEARCH MAP + PLAN. Grounded by two parallel sweeps (lance-graph + surrealdb fork) with main-thread spot-verification; one agent claim caught false (SoaEnvelope has ZERO real impls — identity N3 stands live). **Plan file:** `.claude/plans/polyglot-container-query-membrane-v1.md`.
**Owns:** 6 deliverables D-PG-1..6.
- D-PG-1: `addr64 = path << 4·(16−depth)` codec + order-preservation property test (subtree ⇔ contiguous range ⇔ `is_ancestor_of`) — the falsifiable first brick
- D-PG-2: `SoaEnvelope` impl for `MailboxSoA<N>` (= identity-plan N3) + LE parity test
- D-PG-3: read-only mailbox `Transactable` adapter (get/keys/keysr/scan/scanr over phase-pinned snapshot) + hot==cold differential test
- D-PG-4: `SurrealqlParse` strategy → ArenaIR (frontend #5, same slot as sparql_parse)
- D-PG-5: DDL ⇄ registry bridge (DEFINE TABLE/FIELD ⇄ dedup-by-URI mint + MappingRow/FieldMask; C16b builders as exchange format)
- D-PG-6 (optional): `surreal_container` unblock → Rubicon kanban VIEW over leading LanceDB (ruling-compliant; off critical path)
**Key findings:** surrealdb fork keys are storekey-encoded (order-preserving, arrays included) and record-ranges lower to native KV byte-range scans (`stream_keys_vals`, pipeline.rs:223); kv-lance is FULLY implemented in-tree (18/19 Transactable methods + MVCC/timeline) — `surreal_container` BLOCKED(C/D) is stale; the fork's typed `surrealdb-ast` crate + C16b DDL builders (`new_for_ddl` → `ToSql`, database-free) are the AST-adapter surface.
**Ruling respected:** LanceDB leads; SurrealDB is a view/dialect (handover 2026-05-28 §2, E-RUBICON-RACTOR).
**Companion plans:** `identity-architecture-exists-vs-needs-v1` (addresses), `bindspace-singleton-to-mailbox-soa-v1` (mailbox, #418).

---

## 2026-06-07 — singleton-to-snapshot-nudge-v1 (workspace-wide audit: every shared-mutable singleton → per-owner MailboxSoA + Arc-swap COW snapshot; read-only codebooks explicitly left as-is)

**Status:** PROPOSAL. Design-spec + audit only, no code beyond the AttentionMatrix correctness fix. **Plan file:** `.claude/plans/singleton-to-snapshot-nudge-v1.md`.
Expand Down
29 changes: 29 additions & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,3 +799,32 @@ When a deliverable is abandoned:
|---|---|---|---|
| D-EW64-3 | `EpisodicEdges64::{coldest, contains}` — MRU cold-tier read surface | In PR | contract lib 545 green; clippy clean |
| D-EW64-4 | `DemotionSink` trait + `promote_into` — hot→cold exit seam (impls gated OQ-11.6) | In PR | contract lib 545 green; clippy clean |

---

## identity-architecture-exists-vs-needs-v1 — structured NodeGuid + frugal north-star OGAR mint

Plan path: `.claude/plans/identity-architecture-exists-vs-needs-v1.md`. Epiphanies: E-IDENTITY-WHITEBOX-1, E-OGAR-NORTHSTAR-1. Rides in the open identity PR on `claude/nice-edison-g4rhhl`.

| D-id | Title | Crate(s) / repo | ~LOC | Risk | Status | PR / Evidence |
|---|---|---|---|---|---|---|
| D-IDENTITY-1 | `identity::NodeGuid` (UUIDv8) + `NiblePath::from_packed` — byte layout, version/variant gates, field-isolation matrix | `lance-graph-contract` | ~250 | LOW | **Shipped** | Phase A; +15 contract tests, clippy-D clean |
| D-IDENTITY-2 | Frugal north-star mint: dedup-by-URI global template id + `entity_type↔NiblePath` bijection pair table + round-trip tests (moves 1+2+3) | `lance-graph-ontology` | ~250 | LOW | **In PR** | dedup + `register_class_path`/`niblepath_of`/`entity_type_of`/`rows_with_entity_type`; +5 tests, 14 registry green |
| D-IDENTITY-3 | Gate legacy positional `contract/ontology.rs:85 entity_type_id` per I-LEGACY-API-FEATURE-GATED (move 4) | `lance-graph-contract` / -ontology | ~80 | MED | **Queued** | needs consumer audit first |
| D-IDENTITY-4 | Pair-table Lance persistence (re-register-on-hydration → persisted) | `lance-graph-ontology` | ~60 | LOW | **Queued** | TECH_DEBT TD-PAIRTABLE-1 |

---

## polyglot-container-query-membrane-v1 — three dialects, one HHTL address space, mailbox as cold path

Plan path: `.claude/plans/polyglot-container-query-membrane-v1.md`. Research grounded 2026-06-09; rides on `claude/nice-edison-g4rhhl`.

| D-id | Title | Crate(s) / repo | ~LOC | Risk | Status | PR / Evidence |
|---|---|---|---|---|---|---|
| D-PG-1 | `addr64` left-aligned HHTL codec + order-preservation property test (subtree ⇔ contiguous range) | `lance-graph-contract` | ~120 | LOW | **Queued** | first brick; everything stands on it |
| D-PG-2 | `SoaEnvelope` impl for `MailboxSoA<N>` (= identity N3, confirmed live) + LE parity test | `cognitive-shader-driver` | ~150 | LOW | **Queued** | gap re-verified 2026-06-09 (§2.4 of plan) |
| D-PG-3 | Read-only mailbox `Transactable` adapter (5 methods, phase-pinned) + hot==cold differential test | shader-driver + fork contract | ~250 | MED | **Queued** | gated on D-PG-1,2 |
| D-PG-4 | `SurrealqlParse` strategy → ArenaIR (SELECT point/range) + selector rule | `lance-graph-planner` | ~300 | MED | **Queued** | slot proven by sparql_parse |
| D-PG-5 | DDL ⇄ registry bridge (DEFINE walker → mint; reverse via C16b `ToSql`) | `lance-graph-ontology` | ~250 | MED | **Queued** | gated on fork C16c |
| D-PG-6 | (optional) `surreal_container` unblock → kanban view over LanceDB | `surreal_container` | ~200 | LOW | **Queued** | ruling-compliant; OQ-PG1 open |
| D-PG-7 | Deterministic foveated tree-builder (CLAM-style 16-way bootstrap + append-stable insertion → `register_class_path`) | `lance-graph-ontology` + ndarray CLAM | ~300 | MED | **Queued** | plan §8 addendum; gated on D-PG-1; determinism + append-stability property tests mandatory |
13 changes: 13 additions & 0 deletions .claude/board/TECH_DEBT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2649,3 +2649,16 @@ files; 217 tests green. Fixes are hand-applied (NOT `clippy --fix`, which mangle
`reader_state.rs` into stranded-comment match guards). The CI clippy step for
deepnsm was promoted Tier-B advisory → Tier-A gating in
`.github/workflows/style.yml`.

## TD-PAIRTABLE-1 — entity_type↔NiblePath pair table is in-memory only
**Status:** Open (2026-06-09, D-IDENTITY-2)

The `path_by_type` / `type_by_path` bijection tables on `RegistryState`
(registry.rs) are NOT persisted to the Lance cache. `absorb_row` (the
`OntologyRegistry::open` replay path) reconstructs `rows` + the by-name/by-uri
indices but leaves the pair tables empty; callers must re-`register_class_path`
after hydration (the OGAR/hydrator seed step does this). Persisting the pairs
(two extra Lance columns, or derive from a NiblePath column on MappingRow) is
the Paid state. Low risk: dedup itself survives replay (the deduped
`entity_type` is baked into each persisted `schema_ptr`); only the path
bijection needs re-seeding. Pair: D-IDENTITY-4.
18 changes: 18 additions & 0 deletions .claude/plans/identity-architecture-exists-vs-needs-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@ test proves.
**First brick:** moves 1+2+3 together (mint + pairing + round-trip); the legacy-gate (4)
follows once nothing canonical reads the positional helper.

> **LANDED (2026-06-09, D-IDENTITY-2).** Moves 1+2+3 shipped in
> `lance-graph-ontology` (registry.rs + namespace.rs + bridge.rs):
> dedup-by-URI mint (one global template id, reused across bridges /
> namespaces; monotone-with-gaps, never renumbered), the
> `entity_type ↔ NiblePath` bijection pair table (`register_class_path` /
> `niblepath_of` / `entity_type_of`, both-way conflict-rejecting +
> EMPTY-sentinel guard), `rows_with_entity_type` for the multi-row
> reading, and the three stale-doc corrections. 5 new tests
> (`same_uri_…_shares_one_template_id`, `fresh_mint_is_monotone_with_gaps`,
> `changed_checksum_reappend_keeps_the_template_id`,
> `class_path_bijection_round_trips_both_ways`,
> `class_path_bijection_conflicts_are_rejected`); 14 registry tests green,
> crate suites green, my 3 files clippy/fmt-clean (pre-existing crate-wide
> `-D warnings` + fmt drift in untouched files left as-is). **Deferred:**
> move 4 (gate `contract/ontology.rs:85` positional helper — needs the
> consumer audit first); pair-table Lance persistence (TECH_DEBT — in-memory
> only, re-registered on hydration).

## Honest ledger

- **[G] (exists, reuse):** all 6 layers above — `NiblePath`, `SchemaPtr`, `ClassId`,
Expand Down
Loading
Loading