Skip to content

Commit 1def205

Browse files
authored
Merge pull request #481 from AdaWorldAPI/claude/nice-edison-g4rhhl
chore(contract): address #480 CodeRabbit review + CI status badges
2 parents 62bca5e + f947669 commit 1def205

6 files changed

Lines changed: 207 additions & 6 deletions

File tree

.claude/board/AGENT_LOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
## 2026-06-09 — D-IDENTITY Phase B: global entity_type ratified + mint trace correction
2+
3+
**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.
4+
5+
## 2026-06-09 — D-IDENTITY decisions: OGAR mirror (ratified) + north-star template model
6+
7+
**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.
8+
9+
## 2026-06-09 — D-IDENTITY-1 review-fix (#480 CodeRabbit) + CI badges
10+
11+
**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.
12+
113
## 2026-06-09 — D-IDENTITY-1 (Phase A) + 2 cross-repo sweeps — identity-architecture
214

3-
**Orchestrator:** Opus main thread (autoattended). **Outcome:** Shipped Phase A.
15+
**Orchestrator:** Opus main thread (autoattended). **Outcome:** Shipped Phase A — commit `947c1e4`, PR #480 (merged `62bca5e`).
416
- **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.
517
- **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.
618
- **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.

.claude/board/EPIPHANIES.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## 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
2+
3+
**Status:** FINDING (traced, ratified: `entity_type` = global shared template id)
4+
**Confidence:** High (read the mint, not the doc comment)
5+
6+
**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.
7+
8+
**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)`.
9+
10+
**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.
11+
12+
**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.
13+
14+
**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).
15+
16+
## 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
17+
18+
**Status:** FINDING (cross-session convergence — OGAR/SurrealDB session + identity-contract session, independently)
19+
**Confidence:** High
20+
21+
**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.
22+
23+
**The new synthesis it surfaces:** `NiblePath::is_ancestor_of` (a single HHTL bit-shift on the GUID routing prefix) is simultaneously THREE relations:
24+
- **OWL `subClassOf`** (ontology inheritance) — OGAR-AST-CONTRACT §1.
25+
- **OTP supervision edge** (ractor parent-routing / delegation through `OrchestrationBridge`) — the other session's "supervisor-edge is now [G] mechanical" finding.
26+
- **North-star template specialization** (a domain class descends from its shared template) — E-OGAR-NORTHSTAR-1.
27+
28+
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.
29+
30+
**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.
31+
32+
**Cross-ref:** E-OGAR-NORTHSTAR-1; E-IDENTITY-WHITEBOX-1; identity-architecture DECISION-2 + north-star guard; `hhtl.rs::is_ancestor_of`.
33+
34+
## 2026-06-09 — E-OGAR-NORTHSTAR-1 — ontology cache = OGAR mirror with a reusable north-star template spine (namespace specializes, entity_type is shared)
35+
36+
**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)
37+
**Confidence:** High (both halves ratified; mint trace confirms global append-order is already the live mint)
38+
39+
**Two decisions, one architecture.**
40+
41+
(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.
42+
43+
(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.
44+
45+
**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.
46+
47+
**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.
48+
49+
**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.
50+
51+
**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).
52+
153
## 2026-06-09 — E-IDENTITY-WHITEBOX-1 — structured identity + round-trip converts the substrate from black-box to CI-falsifiable
254

355
**Status:** FINDING (Phase A landed: `identity::NodeGuid` composed, 15 tests green)

.claude/plans/cognitive-write-roundtrip-substrate-v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ u16 ⊕ `MetaWord` u32) and deliberately EXCLUDES the lossy CAM-PQ fingerprint
4141

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

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

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

90-
```
90+
```text
9191
Class (shape, subClassOf) ──► triples: (subj rdf:type ogit:ObjectType), (field depends_on …) THINK
9292
ActionDef (DO, object_class→Class, OdooMethodKind, KausalSpec) ──► triples: (amount_total emitted_by _compute_amount) DO
9393
│ │

0 commit comments

Comments
 (0)