Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 2026-06-20 (cont.¹³) — clean separation: NEW `lance-graph-ogar` activation crate (OGAR AR surface), #563 merged

**Main thread (Opus), autoattended.** Operator: "what about clean separation — lance-graph-ontology OGIT / lance-graph-ogar OGAR" + correction "OGAR isn't just vocab, it's classes, ClassView, active-record shape" + "563 merged". Rebased jirak onto new main (ff1a3452 = merged #563, so `contract::ogar_codebook` is now ON main).

**Discovery (consult-don't-guess):** OGAR is the Active-Record Core and ALREADY speaks the contract — `ogar-class-view::OgarClassView` already `impl lance_graph_contract::ClassView` (32 promoted concepts → ObjectView/render_rows), git-depping `lance-graph-contract@main`. `ogar-vocab::Class` = the AR shape (attrs + family Associations); `canonical_concept_id == ClassId == NodeGuid.classid` low u16. So the AR bridge already exists OGAR-side; the lance-graph side just needs ACTIVATION, not a new bridge. Also: `ogar-ontology` is zero-dep; `ogar-adapter-surrealql` default = light `emit()` DDL (no surrealdb); its `surrealdb-parser` feature (the `unmap()` half, rust 1.95+) is the only heavy part.

**NEW `crates/lance-graph-ogar`** (operator chose "Full AR surface"): re-exports ogar-vocab + ogar-class-view + ogar-ontology + ogar-adapter-surrealql under stable names + `OgarClassView`/`Class` + `contract` passthrough; hosts the **parity-guard** (`parity::assert_codebook_parity`: bijective `contract::ogar_codebook::CODEBOOK ⇄ ogar_vocab::class_ids::ALL` + domain agreement) that FAILS THE BUILD on codebook drift. Features: `default = []` (light: all four crates, emit-only), `surrealql-parser` (the surrealdb parser half), `serde` passthrough. **EXCLUDED** from the workspace with its own `[workspace]` root; **git-deps OGAR@main + lance-graph-contract@main = ONE contract source** (same as ogar-class-view's) so the `impl ClassView` matches the trait the guard checks — NO `[patch]` (the symbiont alignment; a path+git mix would be two distinct contract types). This is the clean separation: `lance-graph-ontology = OGIT` (TTL spine), `lance-graph-ogar = OGAR` (AR surface), `contract` = zero-dep traits + the OGAR-absent `ogar_codebook` mirror.

**Auto-activation = Cargo presence** (no runtime detection): a build pulling `lance-graph-ogar` (golden image via symbiont, or q2/medcare) gets the REAL OGAR Class/ClassView/codebook + full `from_alias` normalizer + the drift fuse; a build without it carries the contract's zero-dep mirror + the bare `ClassView` trait (OGAR stays headless-capable — depending on the zero-dep contract is the compile-time handshake, not "needing lance-graph").

Verified: `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml` **3/3** (parity bijection ≥32 concepts, classid↔codebook-id identity, OgarClassView-is-a-ClassView); `lance-graph-contract` resolved to ONE source (git main #ff1a3452); clippy `-D warnings --all-targets` + fmt clean. Added to workspace `exclude` (next to symbiont). New PR off main (jirak). EPIPHANY `E-OGAR-IS-AR-CORE-AUTOACTIVATED-BY-CARGO-PRESENCE`; plan D-OVC-5.

## 2026-06-20 (cont.¹²) — D-OVC realign LANDED: contract classids follow OGAR 0xDDCC + ogar_codebook mirror

**Main thread (Opus), autoattended.** Operator "562 merged, Rebase" + earlier `AskUserQuestion` greenlight (realign 0xDDCC / wire-compat / FMA=Health 0x0901). Rebased the jirak branch onto new main (6075d007, post #561+#562; #562 = bridge-codebook-convergence, different files — no conflict) and executed the migration plan's D-OVC deliverables, resolving ISS-CLASSID-OGAR-DRIFT.
Expand Down
18 changes: 18 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 2026-06-20 — E-OGAR-IS-AR-CORE-AUTOACTIVATED-BY-CARGO-PRESENCE — OGAR is the Active-Record Core (Class + ClassView), not "just vocab"; it already `impl`s the contract's `ClassView`, so a lance-graph-side `lance-graph-ogar` crate AUTO-ACTIVATES the real AR surface wherever it is compiled in (Cargo presence = the switch, no runtime detection), guarded against drift by a parity fuse — while OGAR stays headless-capable and the contract stays zero-dep

**Status:** FINDING (operator clean-separation lock, 2026-06-20; shipped `crates/lance-graph-ogar`).

Two corrections crystallised the design:

1. **OGAR ≠ codebook.** OGAR = *Open Graph of Active Record*: the unit is the **`Class`** (canonical concept + typed attributes + family-edge `Association`s) and its **`ClassView`**. The `u16` codebook id is ONE facet of a Class's identity (`canonical_concept_id == ClassId == NodeGuid.classid` low u16). A bridge that only carried the id would be exactly the "make OGAR stupid" failure the operator warned against.
2. **The AR bridge already exists, OGAR-side.** `ogar-class-view::OgarClassView` already `impl lance_graph_contract::ClassView` (32 promoted concepts → `ObjectView`/`render_rows`), git-depping `lance-graph-contract@main`. So OGAR already *speaks the contract*; depending on the **zero-dep** contract is the compile-time handshake, NOT "needing lance-graph" (contracts compile types, never serialize). OGAR stays fully headless.

**The clean separation (two crates, two responsibilities):**
- `lance-graph-ontology` = **OGIT** (TTL/RDF hydration — the ontology SOURCE).
- `lance-graph-ogar` = **OGAR** (re-export + activation of the full AR surface: ogar-vocab Class/codebook + ogar-class-view ClassView + ogar-ontology + ogar-adapter-surrealql).
- `lance-graph-contract` keeps the **zero-dep `ogar_codebook` mirror** as the OGAR-ABSENT baseline + the `ClassView`/`ObjectView` traits OGAR implements.

**Auto-activation = Cargo presence (no runtime detection).** A build graph that pulls `lance-graph-ogar` (golden image via symbiont, or q2/medcare) gets the REAL OGAR Class/ClassView/codebook + full `from_alias` normalizer + the **parity-guard** (`assert_codebook_parity`: bijective `mirror ⇄ ogar_vocab::class_ids::ALL` + domain agreement) that FAILS THE BUILD on drift. A build without it carries the lean mirror + the bare `ClassView` trait and never knows the difference. **One contract source** is the load-bearing constraint: `lance-graph-ogar` AND `ogar-class-view` both resolve `lance-graph-contract` to git `#main` (no `[patch]`, the symbiont alignment), so the `impl ClassView` matches the trait the guard checks (path + git copies would be two distinct types). The crate is `exclude`d from the workspace (git OGAR deps), built via `--manifest-path`.

Verified: `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml` 3/3 (parity bijection over ≥32 concepts + classid↔codebook-id identity + OgarClassView-is-a-ClassView), clippy `-D warnings` + fmt clean; resolved `lance-graph-contract` to ONE source (git main #ff1a3452 = merged #563). Cross-ref: AGENT_LOG 2026-06-20 (cont.¹³), plan `ogar-vocab-contract-codebook-migration-v1` D-OVC-5; the `from_alias`-vs-`from_canonical` split (E-... ogar_codebook mirror, #563).

## 2026-06-20 — E-UNIFORM-MORTON-TILE-PYRAMID — making every GUID tier the same size (8×u16) makes the KEY, the per-family CODEBOOK, the VALUE tile, and the PERTURBATION pyramid all the SAME 2bit×2bit 4×4 Morton-tile primitive — so one kernel (Morton + AMX 4×4 BF16 GEMM), one distance (Morton common-prefix = HHTL hop), and one codebook shape (256×256 per tier) govern the whole substrate

**Status:** FINDING (operator design lock, GUID-v2-tail, 2026-06-20).
Expand Down
4 changes: 3 additions & 1 deletion .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

---

> **2026-06-20 — IN PR (`claude/jirak-math-theorems-harvest-rfii13`)** — **D-OVC: contract classids realigned to OGAR `0xDDCC` + `contract::ogar_codebook` wire-compat mirror.** Resolved ISS-CLASSID-OGAR-DRIFT (operator-signed). **Realigned (layout-preserving const values, no `ENVELOPE_LAYOUT_VERSION` bump):** `CLASSID_OSINT 0x0007 → 0x0700` (OSINT domain root, `>>8 == 0x07`), `CLASSID_FMA 0x0008 → 0x0901` (anatomy concept in Health domain, `0x0900` = root). **Minted:** `CLASSID_PROJECT = 0x0100` + `CLASSID_ERP = 0x0200` with `ReadMode::{PROJECT, ERP}` (Cognitive/CoarseOnly) registered in `BUILTIN_READ_MODES`; `soa_graph::{PROJECT, ERP}` DomainSpecs. **NEW `contract::ogar_codebook`** (zero-dep, **wire-compat — NO OGAR↔contract dependency**): `ConceptDomain` (7 domains, `id>>8` route), `canonical_concept_domain`, `classid_concept_domain` (D-OVC-4 classid→domain), `source_domain_concept`, `CODEBOOK` (26 project `0x01XX` + 6 commerce `0x02XX`, mirrored from OGAR `ogar-vocab` `lib.rs:1073`), `canonical_concept_id`, `LabelDTO::from_canonical` + `id_le`. Drift-guard test pins the shared `0xDDCC` ids. Contract **710** lib (default) / **716** (`guid-v2-tail`), callcenter `--features query` **211** green; clippy `-D warnings` + fmt clean both configs. Refs: AGENT_LOG 2026-06-20 (cont.¹²), plan `ogar-vocab-contract-codebook-migration-v1.md` (D-OVC-1/2/4 SHIPPED, D-OVC-3 PARTIAL), ISSUES `ISS-CLASSID-OGAR-DRIFT` (RESOLVING).
> **2026-06-20 — IN PR (`claude/jirak-math-theorems-harvest-rfii13`)** — **Clean separation: NEW `lance-graph-ogar` activation crate (OGAR Active-Record surface).** The OGAR half of `ontology=OGIT / ogar=OGAR`. OGAR is the AR Core and ALREADY `impl`s the contract: `ogar-class-view::OgarClassView impl lance_graph_contract::ClassView` (32 concepts), `ogar-vocab::Class` = AR shape, `canonical_concept_id == ClassId`. NEW `crates/lance-graph-ogar` (EXCLUDED, own `[workspace]`, git-deps OGAR@main + lance-graph-contract@main = ONE source, no `[patch]`) re-exports the full AR surface (ogar-vocab + ogar-class-view + ogar-ontology + ogar-adapter-surrealql) + a **parity-guard** (`assert_codebook_parity`: bijective `ogar_codebook::CODEBOOK ⇄ ogar_vocab::class_ids::ALL` + domain agreement, FAILS build on drift). Features: `default` (light, emit-only), `surrealql-parser` (parser half), `serde`. **Auto-activation = Cargo presence**: pull the crate → real OGAR AR + drift fuse; don't → contract's zero-dep mirror + bare ClassView trait (OGAR stays headless). `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml` **3/3** green, clippy + fmt clean, contract = ONE source (git main #ff1a3452). Refs: AGENT_LOG 2026-06-20 (cont.¹³), EPIPHANIES `E-OGAR-IS-AR-CORE-AUTOACTIVATED-BY-CARGO-PRESENCE`, plan D-OVC-5. **(#563 D-OVC contract realign now MERGED to main.)**
>
> **2026-06-20 — MERGED #563 (`claude/jirak-math-theorems-harvest-rfii13`)** — **D-OVC: contract classids realigned to OGAR `0xDDCC` + `contract::ogar_codebook` wire-compat mirror.** Resolved ISS-CLASSID-OGAR-DRIFT (operator-signed). **Realigned (layout-preserving const values, no `ENVELOPE_LAYOUT_VERSION` bump):** `CLASSID_OSINT 0x0007 → 0x0700` (OSINT domain root, `>>8 == 0x07`), `CLASSID_FMA 0x0008 → 0x0901` (anatomy concept in Health domain, `0x0900` = root). **Minted:** `CLASSID_PROJECT = 0x0100` + `CLASSID_ERP = 0x0200` with `ReadMode::{PROJECT, ERP}` (Cognitive/CoarseOnly) registered in `BUILTIN_READ_MODES`; `soa_graph::{PROJECT, ERP}` DomainSpecs. **NEW `contract::ogar_codebook`** (zero-dep, **wire-compat — NO OGAR↔contract dependency**): `ConceptDomain` (7 domains, `id>>8` route), `canonical_concept_domain`, `classid_concept_domain` (D-OVC-4 classid→domain), `source_domain_concept`, `CODEBOOK` (26 project `0x01XX` + 6 commerce `0x02XX`, mirrored from OGAR `ogar-vocab` `lib.rs:1073`), `canonical_concept_id`, `LabelDTO::from_canonical` + `id_le`. Drift-guard test pins the shared `0xDDCC` ids. Contract **710** lib (default) / **716** (`guid-v2-tail`), callcenter `--features query` **211** green; clippy `-D warnings` + fmt clean both configs. Refs: AGENT_LOG 2026-06-20 (cont.¹²), plan `ogar-vocab-contract-codebook-migration-v1.md` (D-OVC-1/2/4 SHIPPED, D-OVC-3 PARTIAL), ISSUES `ISS-CLASSID-OGAR-DRIFT` (RESOLVING).
>
> **2026-06-20 — IN PR (`claude/jirak-math-theorems-harvest-rfii13`)** — **codex roll-up + 16-family-adapter edges + Callcenter DataFusion/Gremlin + aiwar POC.** Follow-up to merged #557. (1) Both codex P1 fixes rolled in: classid filter (`project_snapshot`/`nearest_anchor` only project `classid == domain.classid` rows) + the operator's **16×8-bit family-node adapter** edge model — the `EdgeBlock` reads as 16 family adapters (each byte → a FAMILY by `family & 0xFF`, collision-aware skip), dissolving the >255-member aliasing; member-by-identity resolution removed (`E-FAMILY-ADAPTER-EDGES-ARE-RENDER-STABLE`). (2) `lance-graph-callcenter`: NEW `graph_table` (`query-lite`, `GraphSnapshot` → `nodes`/`edges` arrow MemTable `TableProvider`s + `register_graph(SessionContext)`) + NEW `graph_gremlin` (always-on Gremlin/SurrealQL traversal kernel). (3) `contract::aiwar` + example: `AiwarClassView` (category ⇒ family) + `aiwar_node_rows` ingest the real `aiwar-neo4j-harvest/data/aiwar_graph.json` (221 entities → 281 nodes / 60 family hubs / 481 edges). Contract 703 lib + callcenter 10 graph tests green; contract clippy `--all-targets -D warnings` clean. q2 wires the GraphSnapshot → Quadro-2 visual. Refs: AGENT_LOG 2026-06-20 (cont.⁷), EPIPHANIES `E-FAMILY-ADAPTER-EDGES-ARE-RENDER-STABLE`, TECH_DEBT `TD-CALLCENTER-QUERY-CLIPPY`.
>
Expand Down
16 changes: 16 additions & 0 deletions .claude/plans/ogar-vocab-contract-codebook-migration-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ class-identity codebook. Reconcile onto OGAR's `0xDDCC` scheme:
on the low-u16 `0xDDCC` high byte; tests assert all five classids resolve to their
`ConceptDomain`. q2's `LabelDTO`/`canonical` display-label consumption is the q2-side
leg (this crate exports the type + ids).
- **D-OVC-5** ✅ **SHIPPED — clean separation `ontology=OGIT / ogar=OGAR`.** NEW
`crates/lance-graph-ogar` (EXCLUDED, own `[workspace]`, git-deps OGAR@main +
lance-graph-contract@main = ONE source, no `[patch]`): re-exports the **full OGAR
Active-Record surface** (`ogar-vocab` Class/codebook + `ogar-class-view`
`OgarClassView impl ClassView` + `ogar-ontology` + `ogar-adapter-surrealql`) +
the **codebook parity-guard** (`parity::assert_codebook_parity` — bijective
`ogar_codebook::CODEBOOK ⇄ ogar_vocab::class_ids::ALL` + domain agreement, fails
the build on drift). **Auto-activation = Cargo presence** (no runtime detection):
pulling the crate (golden image via symbiont, or q2/medcare) lights up the real
OGAR AR surface + the drift fuse; OGAR stays headless-capable (its only
lance-graph dep is the zero-dep contract — the compile-time handshake). Features
`default` (light emit-only) / `surrealql-parser` (the heavy `unmap()` parser
half, rust 1.95+) / `serde`. Verified 3/3 + clippy + fmt clean. This realizes the
§5-decision-2 "(a) consolidation" path the wire-compat baseline deferred — both
now coexist: contract mirror = OGAR-absent baseline, `lance-graph-ogar` = the
OGAR-present activation. EPIPHANY `E-OGAR-IS-AR-CORE-AUTOACTIVATED-BY-CARGO-PRESENCE`.

## 5 — Decisions needed (operator) — ✅ RESOLVED 2026-06-20

Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ exclude = [
# the default build). Verify via `cargo build --manifest-path crates/symbiont/Cargo.toml`
# or `docker build -f crates/symbiont/Dockerfile -t symbiont .`.
"crates/symbiont",
# OGAR (Open Graph of Active Record) activation crate — re-exports OGAR's full
# AR surface (ogar-vocab Class/codebook + ogar-class-view impl ClassView +
# ogar-ontology + ogar-adapter-surrealql) and hosts the codebook parity-guard.
# EXCLUDED (own [workspace], git-deps OGAR + lance-graph-contract@main = one
# source, no [patch]) so OGAR never enters the default build; the lance-graph
# half of the OGIT(ontology)/OGAR(ogar) clean separation. Verify via
# `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml`.
"crates/lance-graph-ogar",
]
resolver = "2"

Expand Down
7 changes: 7 additions & 0 deletions crates/lance-graph-ogar/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Activation crate (re-resolves OGAR + lance-graph-contract to branch `main` on
# every build) — do NOT commit Cargo.lock. Pinning would freeze the git-deps to
# specific revs (the snapshot anti-pattern); the activation must reflect the
# CURRENT OGAR AR surface + contract codebook so the parity-guard checks live
# state. Same rationale as crates/symbiont/.gitignore (E-GOLDEN-IMAGE-IS-A-LIVING-HARNESS).
/Cargo.lock
/target
67 changes: 67 additions & 0 deletions crates/lance-graph-ogar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# lance-graph-ogar — the OGAR (Open Graph of Active Record) activation crate.
# EXCLUDED from the lance-graph workspace (own [workspace] root below).
#
# Clean separation (operator, 2026-06-20):
# lance-graph-ontology = OGIT (TTL/RDF hydration spine)
# lance-graph-ogar = OGAR (Active-Record Class / ClassView / adapters)
#
# This crate is the lance-graph-side ACTIVATION + re-export of OGAR's full AR
# surface. OGAR is the Active-Record Core and already speaks the contract:
# ogar-vocab::Class = the calcified AR shape (attributes + family
# Associations); `canonical_concept_id` == ClassId
# ogar-class-view::OgarClassView impl lance_graph_contract::ClassView
# (32 promoted concepts → ObjectView/render_rows)
# ogar-ontology = prefix conventions + NiblePath identity routing
# ogar-adapter-surrealql = emit(Class) -> SurrealQL DDL (the DO arm)
#
# Auto-activation = Cargo presence: a build graph that pulls THIS crate gets the
# real OGAR Class/ClassView/codebook + the parity-guard (lib.rs) that fails the
# build if `lance_graph_contract::ogar_codebook`'s lean mirror ever drifts from
# `ogar_vocab::CODEBOOK`. A build WITHOUT this crate uses the contract's zero-dep
# mirror + the bare ClassView trait (headless OGAR app, or a self-supplied impl).
# OGAR never depends on the lance-graph ENGINE — only on the zero-dep contract.
#
# ONE contract source: this crate AND ogar-class-view both resolve
# `lance-graph-contract` to git `AdaWorldAPI/lance-graph#main` (which carries
# `ogar_codebook` since PR #563) — so `OgarClassView`'s `impl ClassView` is for
# the SAME contract the parity-guard checks. No [patch] needed (the symbiont
# pattern: align on one source rather than redirect).
#
# Build/verify: cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml
# Full DO arm : cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml \
# --features surrealql-parser (pulls surrealdb-ast/parser, rust 1.95+)

[package]
name = "lance-graph-ogar"
version = "0.1.0"
edition = "2021"
publish = false
description = "OGAR (Open Graph of Active Record) activation crate: re-exports ogar-vocab Class/codebook + ogar-class-view (impl lance_graph_contract::ClassView) + ogar-ontology + ogar-adapter-surrealql, with a codebook parity-guard against the contract's zero-dep ogar_codebook mirror. Auto-activates the real OGAR AR surface wherever it is compiled into the build (golden image / AR-aware consumers)."
license = "Apache-2.0"

# Own workspace root — keeps this crate out of the parent lance-graph workspace.
[workspace]

[features]
default = []
# The unmap(SurrealQL) -> Class half of the DO arm: pulls surrealdb-ast +
# surrealdb-parser (heavy; rust-version 1.95+). The emit() DDL formatter half is
# always available (no surrealdb deps).
surrealql-parser = ["ogar-adapter-surrealql/surrealdb-parser"]
# serde passthrough for the OGAR IR types.
serde = ["ogar-vocab/serde", "ogar-adapter-surrealql/serde"]

[dependencies]
# Contract surface (zero-dep): ClassView / ObjectView / ClassId / NodeGuid + the
# ogar_codebook wire-compat mirror the parity-guard checks. git main == the SAME
# source ogar-class-view git-deps, so there is exactly ONE lance-graph-contract.
lance-graph-contract = { git = "https://github.com/AdaWorldAPI/lance-graph", branch = "main" }
Comment thread
AdaWorldAPI marked this conversation as resolved.
Outdated

# ── OGAR Active-Record forks: git deps @ main (the canonical superset; matches
# symbiont's pins so they resolve to ONE source in the golden image) ──
ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" }
ogar-class-view = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" }
ogar-ontology = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" }
# default features only = the light emit() DDL formatter (no surrealdb tree);
# the parser half is opt-in via this crate's `surrealql-parser` feature.
ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" }
Loading
Loading