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 — 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.

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

**Main thread (Opus).** Recorded two architecture decisions for the identity arc (no code; plan + epiphany): (1) ontology cache = OGAR one-way OGIT mirror, append-only immutable ClassIds (ratified via decision-gate) — ownership, not drift-prevention; (2) ClassId space organized as a shared north-star template spine (`entity_type`/`NiblePath` = DOLCE-rooted shape reused across domains; `namespace` = domain), realized by the existing octet split + FieldMask inherit/delta + NiblePath ancestry. Plan: identity-architecture DECISION-2 + north-star guard + Phase B refinement. Epiphany: E-OGAR-NORTHSTAR-1. Rides in PR #481.

## 2026-06-09 — D-IDENTITY-1 review-fix (#480 CodeRabbit) + CI badges

**Follow-up PR** off merged `main`. Addressed CodeRabbit #480: `from_packed` edge-case test (depth>MAX, high-bit reject, `(0,0)` sentinel, MAX_DEPTH `>>64`-guard boundary, `packed∘from_packed` identity); stale "open DECISION" line → RESOLVED; AGENT_LOG SHA (`947c1e4`); MD040/MD058 in the two plan docs. **Skipped** MD028 (LATEST_STATE) — the blank-between-entries IS the append-only style. Added the **no-content-drift-for-existing** invariant to the plan (sole drift surface = ontology cache not mapped from its authoritative source). Native CI badges (rust-test/style/build) → README. 600 contract lib tests (+1), clippy/fmt clean.

## 2026-06-09 — D-IDENTITY-1 (Phase A) + 2 cross-repo sweeps — identity-architecture

**Orchestrator:** Opus main thread (autoattended). **Outcome:** Shipped Phase A.
**Orchestrator:** Opus main thread (autoattended). **Outcome:** Shipped Phase A — commit `947c1e4`, PR #480 (merged `62bca5e`).
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- **Sweep A** (Opus general-purpose): lance-graph + ndarray identity-type inventory → the 128-bit identity space is EMPTY (only `[u8;16]` is `atoms::I4x32`, a style vector); every GUID field already exists as a committed scalar → compose-don't-reinvent.
- **Sweep B** (Opus general-purpose): MedCare-rs + smb-office-rs store keys → `EntityKey(&[u8])` already carries any-length keys (smb-bridge `key_to_filter` length-branches on Mongo+Lance); transport solved. MedCare needs one `external_ref` (or reuse DMS `sha256`); smb maps directly.
- **Phase A:** `lance_graph_contract::identity::NodeGuid` (UUIDv8, composed from SchemaPtr⊕NiblePath⊕StructuralSignature⊕local) + `NiblePath::from_packed`. 599 contract lib tests (+15), clippy `-D` clean, fmt clean.
Expand Down
52 changes: 52 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
## 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)

**Two decisions, one architecture.**

(1) **OGAR mirror (ratified).** The ontology cache's source of truth is OGAR — a one-way mirror of OGIT (+ OWL / Wikidata class-backbone / HHTL) with an append-only immutable ClassId space (protobuf-field-number discipline: mint once, never renumber, tombstone deprecations). Chosen for OWNERSHIP + dissolving the upstream dependency — and, pre-production, immutable ClassIds upgrade NodeGuid from "stable within an OGIT version" to "stable forever." Explicitly NOT a drift fix: content-drift for existing entities does not exist once the cache is mapped from a source (Stefan's correction, twice). The mirror buys ownership, not drift-immunity.

(2) **North-star template spine (recommended model).** The ClassId space is NOT a flat domain×shape explosion. `entity_type`/`NiblePath` is a SHARED, DOLCE-rooted SHAPE template (small spine, reused across domains); `namespace:u8` selects the domain (healthcare / Odoo / WoA-rs / OpenProject-nexgen-rs / OWL / Wikidata). A domain reuses a template by default (switch namespace, inherit the field-set), specializes via NiblePath-descent + FieldMask delta, and mints a new ClassId only for a genuinely novel shape.

**It's the intended reading of the NodeGuid octet split, not new machinery.** `namespace:u8 | entity_type:u16 | kind:u8` already separates domain from shape; `FieldMask + inherit` (parent-OR-delta, class_view.rs) already IS template-reuse-with-delta; `NiblePath::is_ancestor_of` already IS template→specialization ancestry; `dolce_category_id` already roots the spine. The mechanism exists; the curated template ontology + domain→template mappings are the OGAR / Phase B content.

**Frugality is double:** (a) the ClassId space is shape-sized (templates), not domain×shape-sized — fits u16 with room; (b) the shape codebook / palette / shape_hash is encoded ONCE per template and shared 256 ways, and cross-domain alignment is free (same entity_type ⇒ same shape). Reusable templates compose WITH immutability (they ARE the immutable spine) — frugality and stability reinforce, they don't trade off. Per-domain precision is preserved by the FieldMask delta, so "lazy" here is DRY, not sloppy; the only real cost is curation (the template boundaries), which is OGAR's editorial job.

**Phase B becomes:** stand up OGAR as the OGIT mirror + north-star template registry; seed entity_type↔NiblePath from it; the build-time round-trip proves the bijection. The surrealdb-coords blocker (N8 / Phase H) is unrelated and remains.

**Cross-ref:** identity-architecture plan DECISION-2 + the north-star guard; E-IDENTITY-WHITEBOX-1 (NodeGuid composition); I-VSA-IDENTITIES (closed template vocabulary interns; Wikidata's open instance mass stays content, never a ClassId).

## 2026-06-09 — E-IDENTITY-WHITEBOX-1 — structured identity + round-trip converts the substrate from black-box to CI-falsifiable

**Status:** FINDING (Phase A landed: `identity::NodeGuid` composed, 15 tests green)
Expand Down
4 changes: 2 additions & 2 deletions .claude/plans/cognitive-write-roundtrip-substrate-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ u16 ⊕ `MetaWord` u32) and deliberately EXCLUDES the lossy CAM-PQ fingerprint

### MAP 1 — the round-trip (the whole point)

```
```text
WRITE (project = encode) READ-BACK (decompile = decode)
Vec<Triple> Vec<Triple>
│ intern (s,p,o) → ids (dict) ▲ dict reverse: ids → (s,p,o)
Expand Down Expand Up @@ -87,7 +87,7 @@ u16 ⊕ `MetaWord` u32) and deliberately EXCLUDES the lossy CAM-PQ fingerprint

### MAP 5 — THINK/DO (Semantik/Pragmatik) both round-trip as triples

```
```text
Class (shape, subClassOf) ──► triples: (subj rdf:type ogit:ObjectType), (field depends_on …) THINK
ActionDef (DO, object_class→Class, OdooMethodKind, KausalSpec) ──► triples: (amount_total emitted_by _compute_amount) DO
│ │
Expand Down
Loading
Loading