D-GV2-2: per-family Codebook registry (guid-v2-tail)#561
Conversation
…-tail) Continues the v2 arc after #560 merged. The type + in-memory registry tier of the family→Codebook scoping (the Lance-backed/OntologyRegistry tier is deferred). Zero-dep, feature-gated (default OFF). contract::codebook: - Codebook — insertion-ordered index↔label interning, 1-byte index, CODEBOOK_CAP=256; intern() returns None on overflow (the split-the-family signal, never widen the byte). - FamilyCodebookRegistry — family(u16) → Codebook; intern(family,label), resolve(family,index) for cross-family decode. Per-family scoping: the SAME label gets INDEPENDENT indices in different families (no global codebook contamination — this is what dissolves the aiwar "60 noisy families"). The finer sibling of classid→ClassView; the family node's episodic-basin content (E-MIXIN-IS-AN-ADDRESS-REFERENCE-NOT-A-COPY); the 256×256 Morton tile (≤256 leaves for the 1-byte in-family index, E-UNIFORM-MORTON-TILE-PYRAMID). 3 tests (dedup/sequential, overflow-split, per-family scoping). --features guid-v2-tail green; default build clean (codebook absent); clippy -D warnings clean both. Plan D-GV2-2 marked PARTIAL; AGENT_LOG updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
|
Warning Review limit reached
More reviews will be available in 2 minutes and 18 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be1d2f64b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…+ canon conflict Operator asked to DO the ontology-schema migration documentation. Grounded in OGAR crates/ogar-vocab/src/lib.rs (the real codebook): it already defines CODEBOOK (domain-encoded 0xDDCC), ConceptDomain + canonical_concept_domain, source_domain_concept(project|erp), canonical_concept_id, and LabelDTO — and its own note says LabelDTO "long-term belongs in lance-graph-contract; codebook id == NodeGuid.classid low u16." Surfaces a canon CONFLICT: merged CLASSID_OSINT=0x0007 routes to OGAR's Reserved domain (OSINT is 0x07XX); CLASSID_FMA=0x0008 sits in OGAR's OCR block (FMA/anatomy is clinical → Health 0x09XX). Root cause: 0x0007 minted from the early "OSINT is 0x0007" guess before ogar-vocab's 0xDDCC layout was consulted. New .claude/plans/ogar-vocab-contract-codebook-migration-v1.md (D-OVC-1..4): host the codebook/ConceptDomain/LabelDTO in contract, classids follow 0xDDCC (mint project 0x01XX + ERP 0x02XX; realign OSINT→0x0700, FMA→Health). The per-family codebook (D-GV2-2) is the finer scope of the same idea. NO code minted/rewritten: realigning merged OSINT/FMA rewrites canon (#557/#560 + CLAUDE.md canon block) → operator sign-off required (plan §5, three decisions). INTEGRATION_PLANS prepended; ISSUES ISS-CLASSID-OGAR-DRIFT filed; AGENT_LOG updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
… sentinel) #561 codex P2: Codebook::intern assigned the first label index 0, which collides with EdgeBlock's all-zero empty-slot sentinel (soa_graph skips byte==0), so references to the first codebook entry were silently dropped. Reserve index 0 everywhere: entries are now 1-based (1..=255), CODEBOOK_CAP = 255, label(0) -> None. Same reserve-0 rule as the 0xDDCC codebook (CC=0x00 = domain root). 3 codebook tests updated; green; clippy clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
What
Continues the
guid-v2-tailarc after #560 merged. Ships D-GV2-2 (the type + in-memory registry tier): per-family codebook scoping —family → Codebook, the finer sibling ofclassid → ClassView. Zero-dep, feature-gatedguid-v2-tail(default OFF, additive).contract::codebookCodebook— insertion-orderedindex ↔ labelinterning, 1-byte index,CODEBOOK_CAP = 256.intern()returnsNoneon overflow — the split-the-family signal (mint a sub-family, never widen the byte).FamilyCodebookRegistry—family(u16) → Codebook;intern(family, label),resolve(family, index)for cross-family decode. Per-family scoping: the same label gets independent indices in different families.Why
This is what dissolves the aiwar "60 noisy families" at the root: the noise was one global codebook mixing every family's vocabulary. Scoped per family, each vocabulary is small + clean, and a within-family reference is an exact 1-byte index (no
& 0xFFaliasing). It is:classid → ClassView(classid·…·family → codebook, longest-prefix);E-MIXIN-IS-AN-ADDRESS-REFERENCE-NOT-A-COPY— members reference it by 1 byte, the vocabulary lives once);256 = 4⁴,E-UNIFORM-MORTON-TILE-PYRAMID), ≤256 leaves for the 1-byte index.Tests
cargo test -p lance-graph-contract --lib --features guid-v2-tail— 3 new (dedup/sequential indices, overflow→split signal, per-family scoping + cross-family resolve). Default build clean (codebook absent); clippy-D warningsclean both configs.Deferred
The
LazyLock/Lance-backed persistence +OntologyRegistryintegration inlance-graph-ontology(the heavyweight runtime tier). Next in the arc: D-GV2-3 (soa_graphper-family edge resolution under v2) + D-GV2-4 (aiwarre-keyed on the v2 tier → clean 5–6 hubs).Plan:
.claude/plans/guid-v2-tail-per-family-codebook-v1.md(D-GV2-2 marked PARTIAL). Board updated in-commit.🤖 Generated with Claude Code
Generated by Claude Code