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
33 changes: 33 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
## 2026-06-26 — E-V3-BASINS-ARE-MEREOLOGY-NOT-LABELS — the 6 V3 basins (+ relative location) are a structural ADDRESS (mereology / HHTL X;Y coordinates), never flat labels

**Status:** FINDING `[H]` (operator directive 2026-06-26; impl in the FMA-V3 +
CPIC-V3 mint, branch `claude/fma-cpic-v3-mint`). Sharpens `E-FACET-8-8-ALWAYS`
on the *consumer-projection* side and is a direct application of
`I-VSA-IDENTITIES` Test-0 (register-laziness).

**The claim.** The V3 identity's 6 `(part_of:is_a)` tiles — HEEL·HIP·TWIG·LEAF
(routing) + family·identity (basin tail) — plus the *relative location within
each basin* are a **substantial address** (6 × 16 bits of hierarchical
coordinate). Spending that address on **labels** (a flat type tag a `HashMap` /
`enum` would carry) wastes it — the exact register-laziness `I-VSA-IDENTITIES`
Test-0 forbids ("does this thing have a natural name/ID? then use the register,
not the rich carrier"). The basins must instead carry **mereology / membership**:
*where a thing sits in the part-of hierarchy* (AST node position, basin
location), readable equivalently as HHTL `(X;Y)` coordinates per tile (`part_of`
= X = hi byte, `is_a` = Y = lo byte).

**The canonical case — genes (Genetics / CPIC-V3).** A gene's identity is its
**genomic position**: `genome → chromosome → region → locus → gene` is the
part-of cascade; the **human genome is the fixed schema view** the position is
taken against (hence `ValueSchema::Compressed` — a fixed reference frame, not a
hot lifecycle). Phase 2 then carries gene **expression as the coordinate
*value*** on top of that positional address. "All expression" rides the basins
as `(X;Y)`, the genome is the codebook.

**Litmus.** Before assigning meaning to a V3 basin: *is this a coordinate
(where-it-is) or a name (what-it's-called)?* Name → it belongs in the content
store / ClassView, not the basin. Coordinate / membership → the basin is exactly
right, and the 6-tier address is the payoff. Cross-ref `E-FACET-8-8-ALWAYS`
(content-blind 8:8, consumer projects), `I-VSA-IDENTITIES` Test-0, CANON
"basin location" (`family` = basin), `CLASSID_CPIC_V3` doc-comment.

## 2026-06-25 — E-FACET-8-8-ALWAYS — the homogeneous facet is ALWAYS 8:8 (content-blind, consumer-projected); it amortizes to a 2bit×2bit Morton tile cascade

**Status:** FINDING `[H]` (operator-locked 2026-06-25; impl PR #613). Refines
Expand Down
8 changes: 8 additions & 0 deletions .claude/board/ISSUES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Issues Log — Open + Resolved (double-entry, append-only)

## 2026-06-26 — ISS-OGAR-GENETICS-MIRROR-PENDING — contract mirror gained `ConceptDomain::Genetics` (0x0E) ahead of OGAR; the `domains_agree` arm + OGAR side follow

**Status:** OPEN (tracked) · Owner: OGAR `ogar-vocab` + `lance-graph-ogar` · Surfaced by: CodeRabbit on #618. The same cross-repo-arc shape as `ISS-OGAR-AUTH-MIRROR-DRIFT` / `E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC`, but **domain-only** so it does not break in isolation.

#618 added `ConceptDomain::Genetics` + `0x0E => Genetics` to the contract mirror (`ogar_codebook.rs`) so CPIC-V3 `0x1000_0E00` routes Genetics (operator-allocated 2026-06-26). OGAR's `ogar_vocab::ConceptDomain` has **no Genetics variant yet**, and `lance-graph-ogar::parity::domains_agree` (`lib.rs:128-148`) still stops at `HR`/`Unassigned`. **Why it's safe in isolation (not a build break like the Auth drift):** the addition is a *domain enum variant + route*, NOT a CODEBOOK **concept** — `mirror::CODEBOOK.len()` is unchanged, so the compile-time `COUNT_FUSE` still holds, and `assert_codebook_parity` iterates CODEBOOK concept-ids (none at `0x0E`), so `domains_agree(0x0E00)` is never called. `domains_agree` is a `matches!` (never exhaustiveness-checked), so adding `C::Genetics` does not break compile either; the `(O::Genetics, C::Genetics)` arm **cannot** be added today because `O::Genetics` does not exist.

**Resolution (the coordinated arc, when Genetics concepts are minted):** (1) OGAR `ogar-vocab` adds `ConceptDomain::Genetics` + `0x0E => Genetics` + any Genetics concept rows; (2) the contract mirror's `CODEBOOK` gains the matching concept rows (keeping `COUNT_FUSE` balanced); (3) `lance-graph-ogar::parity::domains_agree` gains the `(O::Genetics, C::Genetics)` arm. Per `E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC`, those three land together, never split. Until then the drift guard correctly reflects "contract ahead of OGAR on the Genetics domain."

## 2026-06-23 — ISS-OGAR-AUTH-MIRROR-DRIFT — `0x0B` AuthStore mint broke the contract mirror's COUNT_FUSE in every consumer

**Status:** RESOLVED 2026-06-23 (this commit). OGAR `ogar-vocab` PR #110 minted the `0x0B` AuthStore family (4 concepts: auth_store 0x0B01, auth_zitadel 0x0B02, auth_zanzibar 0x0B03, auth_ory_keto 0x0B04) and merged to OGAR `main`, taking `ogar_vocab::class_ids::ALL` from 39 → 43. The paired `lance-graph-contract::ogar_codebook::CODEBOOK` mirror was NOT updated in the same arc, so the compile-time `COUNT_FUSE` in `lance-graph-ogar` (`assert!(mirror::CODEBOOK.len() == ogar_vocab::class_ids::ALL.len())`) fired `error[E0080]` (`vendor/lance-graph/crates/lance-graph-ogar/src/lib.rs:113`) in **every** consumer vendoring the OGAR git dep — medcare CI went red on `cargo build`. **Resolution:** added the 4 auth rows + `ConceptDomain::Auth` + `0x0B => Auth` to the mirror, and the `(O::Auth, C::Auth)` arm to `lance-graph-ogar::parity::domains_agree` (else the runtime `assert_codebook_parity` test panics). 43 == 43 restored; `cargo test -p lance-graph-contract` green. **Process fix (see EPIPHANIES E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC):** an OGAR concept mint is a cross-repo arc — the OGAR entry + the contract mirror + the `domains_agree` arm land together, never split across sessions. **Merge note (2026-06-23):** main landed #595 (auth sync) + #597 (PRODUCT + ACCOUNTING_ACCOUNT, OGAR #111) first; on merge this branch took main's superset `ogar_codebook.rs` (45 concepts incl. the `AppPrefix` render layer), so the auth mirror rows here are subsumed — the `domains_agree` Auth arm + this finding stand.
Expand Down
2 changes: 2 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ Membrane consumers can now pull BOTH halves of a render `classid` BBB-safely fro

## Current Contract Inventory (lance-graph-contract)

> **2026-06-26 — ADDED (Phase 1 COMPLETE — FMA-V3 + CPIC-V3 mints + Genetics domain)**: the two remaining V3 identity classes that close Phase 1. `NodeGuid::{CLASSID_FMA_V3 = 0x1000_0A01, CLASSID_CPIC_V3 = 0x1000_0E00}` + `ReadMode::{FMA_V3, CPIC_V3}` (both `{V3, Compressed, CoarseOnly}`) + `BUILTIN_READ_MODES` entries, all gated `guid-v3-tail` — mirroring the OSINT-V3 (#613) pattern: the `0x1000` gen-marker in the HIGH u16, canon domain preserved in the LOW u16 so `classid_concept_domain` still routes (`0x0A01 → Anatomy`, `0x0E00 → Genetics`). **NEW Genetics domain `0x0E`** in `ogar_codebook::ConceptDomain` (+ `0x0E => Genetics` route, parity test pins `0x0E00 → Genetics`) — **operator-allocated 2026-06-26** (`0x0D` was already HR); mirror target `ogar_vocab::ConceptDomain::Genetics` (OGAR catches up under the drift guard). **Genetics framing (operator directive, `I-VSA-IDENTITIES` Test-0):** the 6 V3 basins are genomic **mereology, not labels** — a gene's identity is its *position* in the part-of hierarchy (genome → chromosome → region → locus → gene), readable as HHTL `(X;Y)` coordinates per `(part_of:is_a)` tile; the human genome is the **fixed schema view** (hence `Compressed`, a fixed reference frame), and Phase 2 shapes gene **expression as the coordinate value**. The Phase-1 V3 set (OSINT + FMA + CPIC) is now **complete → unblocks the atomic Canon:Custom flip + Phase 2** (plan §2.3 sequencing). Confirm test `read_mode_fma_v3_and_cpic_v3_route_their_domains` (gated `guid-v3-tail`): both route their domain, resolve `tail_variant == V3`, distinct classids. Additive, layout-preserving, default-V1; **739** lib green default / **750** `guid-v3-tail`, clippy `--all-targets -D warnings` + fmt clean. Plan `soa-value-tenant-migration-v2.md` §2.2 (FMA/CPIC rows wired; Genetics `0x0E`). Branch `claude/fma-cpic-v3-mint`.
>
> **2026-06-25 — ADDED (Phase 1 identity→V3, the `mint_for` tail-variant carrier)**: `lance_graph_contract::canonical_node::NodeGuid::mint_for(tail_variant, classid, heel, hip, twig, leaf, family, identity)` (`const`, feature `guid-v2-tail`) — the **key-side symmetric spine** of `soa-value-tenant-migration-v2.md` §2.1: a consumer mints its identity BY ITS CLASSID's tail (`mint_for(classid_read_mode(c).tail_variant, …)`), never hardcoding `new` vs `new_v2` — the exact analog of the Phase-2 value-side `to_node_row(classid_read_mode(c).value_schema, …)`, same `classid_read_mode(c)` lookup, sibling field. Migrating a class's identity to V3 becomes a one-line `tail_variant` flip in the registry, zero consumer rewrite ("extend the one `ReadMode`, never a public `new_v3`"). Dispatch: `V1 → new` (u24·u24 tail; `leaf` ignored — V1 has no LEAF tier), `V2 | V3 → new_v2` (the shared `leaf·family·identity` 3×u16 tail — V3 differs only in how the bytes are *read*, the `(part_of:is_a)` tile, not how they are *stored*, so it mints through the same constructor). **No silent truncation** (the footgun v2 removes): the V2/V3 arm `assert!`s `family`/`identity` fit `u16`, mirroring `new`'s own 24-bit guard. **`Cargo.toml`: `guid-v3-tail = ["guid-v2-tail"]`** — V3's mint path dispatches to `new_v2`, so the tail constructor must exist whenever a V3 classid can be minted (honest gating per `I-LEGACY-API-FEATURE-GATED`). **End-to-end confirm** (`mint_for_osint_v3_is_end_to_end_routable`, gated `guid-v3-tail`): mint OSINT-V3 via the carrier → `read_mode().tail_variant == V3` → `from_guid_prefix_v3` routes non-empty at depth 16 (the full HEEL·HIP·TWIG·LEAF cascade) **while** the v1 `from_guid_prefix` still returns `None` (the Codex-P2 EMPTY-fold is gone, both directions proven) → `decode_v2` reads the tiers back; plus `mint_for_dispatches_to_the_right_constructor_per_tail` (gated `guid-v2-tail`: V1==`new`, V2==V3==`new_v2`). Additive, zero-dep, latent-default-V1 (zero re-mint of the V1/V2 corpus, RESERVE-DON'T-RECLAIM); 737 lib green default / 744 `guid-v2-tail` / 747 `guid-v3-tail`, clippy `--all-targets -D warnings` + fmt clean. Plan: `soa-value-tenant-migration-v2.md` §2 (Phase 1). Branch `claude/identity-v3-mint`.
>
> **2026-06-25 — MODULARIZED (follow-up to #613) — `lance_graph_contract::facet`**: extracted `FacetTier` / `FacetCascade` from `canonical_node` into a dedicated, reusable `facet` module (a *reading*, NOT part of the locked node layout — the cleaner factoring; `canonical_node` re-exports both for the historical path). **Reusable lane API rounded out:** `as_u128`/`from_u128` (single-register view), `rows()` (the 4 dword rows `{domain}{schema}` / `HEEL:HIP` / `TWIG:LEAF` / `family:identity`), `prefix_distance`/`shared_prefix_tiles` (the **granularity-free LCP redout** — `vpxor`+`tzcnt`; 8:8 vs nibble is a free `>>` on the count, measured), `row_match_mask` (`vpcmpeqd`-lane), plus `as_bytes`/`ref_from_bytes` — a **zero-cost reinterpret** (`#[repr(C, align(16))]`; `as_bytes` measured to lower to `mov rax,rdi`, a literal no-op; fields read straight through as single loads). One register → row(`u32`)/tile(`u16`)/prefix(bit)/nibble(Morton) lenses, each one SIMD op (module docs). Lab-test write-up deferred. Additive, zero-dep; 741 lib green (default + `guid-v3-tail`), clippy `-D warnings` + fmt clean. EPIPHANIES `E-FACET-8-8-ALWAYS`. Branch `claude/facet-module`.
Expand Down
Loading
Loading