Skip to content

D-GV2-2: per-family Codebook registry (guid-v2-tail)#561

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/jirak-math-theorems-harvest-rfii13
Jun 20, 2026
Merged

D-GV2-2: per-family Codebook registry (guid-v2-tail)#561
AdaWorldAPI merged 3 commits into
mainfrom
claude/jirak-math-theorems-harvest-rfii13

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Continues the guid-v2-tail arc after #560 merged. Ships D-GV2-2 (the type + in-memory registry tier): per-family codebook scopingfamily → Codebook, the finer sibling of classid → ClassView. Zero-dep, feature-gated guid-v2-tail (default OFF, additive).

contract::codebook

  • Codebook — insertion-ordered index ↔ label interning, 1-byte index, CODEBOOK_CAP = 256. intern() returns None on overflow — the split-the-family signal (mint a sub-family, never widen the byte).
  • FamilyCodebookRegistryfamily(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 & 0xFF aliasing). It is:

  • the finer sibling of classid → ClassView (classid·…·family → codebook, longest-prefix);
  • the family node's episodic-basin content (E-MIXIN-IS-AN-ADDRESS-REFERENCE-NOT-A-COPY — members reference it by 1 byte, the vocabulary lives once);
  • the 256×256 Morton tile per family (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 warnings clean both configs.

Deferred

The LazyLock/Lance-backed persistence + OntologyRegistry integration in lance-graph-ontology (the heavyweight runtime tier). Next in the arc: D-GV2-3 (soa_graph per-family edge resolution under v2) + D-GV2-4 (aiwar re-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

…-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
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 323cb00f-d384-45bb-9ecb-30b0b05ed45b

📥 Commits

Reviewing files that changed from the base of the PR and between c05394f and dcf5505.

📒 Files selected for processing (7)
  • .claude/board/AGENT_LOG.md
  • .claude/board/INTEGRATION_PLANS.md
  • .claude/board/ISSUES.md
  • .claude/plans/guid-v2-tail-per-family-codebook-v1.md
  • .claude/plans/ogar-vocab-contract-codebook-migration-v1.md
  • crates/lance-graph-contract/src/codebook.rs
  • crates/lance-graph-contract/src/lib.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/lance-graph-contract/src/codebook.rs Outdated
claude added 2 commits June 20, 2026 19:58
…+ 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
@AdaWorldAPI AdaWorldAPI merged commit df21a20 into main Jun 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants