feat(contract): FMA-V3 + CPIC-V3 mints + Genetics domain — Phase 1 V3 set complete#618
Conversation
… set complete The two remaining V3 identity classes that close Phase 1 (identity → V3), mirroring the OSINT-V3 (#613) pattern. With the V3 set complete, the atomic Canon:Custom half-order flip and Phase 2 (value tenants) are unblocked (plan §2.3 sequencing). Mints (gated guid-v3-tail), both register in BUILTIN_READ_MODES: - CLASSID_FMA_V3 = 0x1000_0A01 -> ReadMode::FMA_V3 {V3, Compressed, CoarseOnly} - CLASSID_CPIC_V3 = 0x1000_0E00 -> ReadMode::CPIC_V3 {V3, Compressed, CoarseOnly} The 0x1000 gen-marker sits in the HIGH u16; the canon domain is preserved in the LOW u16, so classid_concept_domain still routes (0x0A01 -> Anatomy, 0x0E00 -> Genetics) — same scheme as OSINT-V3. Genetics domain (operator-allocated 2026-06-26, 0x0D was already HR): ConceptDomain::Genetics + `0x0E => Genetics` route; parity test pins 0x0E00 -> Genetics. 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); Phase 2 carries expression as the coordinate value. Recorded as EPIPHANIES E-V3-BASINS-ARE-MEREOLOGY-NOT-LABELS. Confirm test read_mode_fma_v3_and_cpic_v3_route_their_domains (gated guid-v3-tail). Additive, layout-preserving, default-V1; 739 lib green default / 750 guid-v3-tail, clippy --all-targets -D warnings + fmt clean. Board: LATEST_STATE Contract Inventory + EPIPHANIES updated (same commit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
|
Warning Review limit reached
More reviews will be available in 44 minutes and 21 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 review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. 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 (2)
📝 WalkthroughWalkthroughThe PR adds a Genetics concept-domain mapping, wires the missing FMA-V3 and CPIC-V3 classids and read modes into the canonical-node registry, and updates the board notes and tests to reflect the new V3 routing. ChangesV3 Tail Identity and Genetics Routing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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: cd886beb9f
ℹ️ 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".
| m.insert(NodeGuid::CLASSID_FMA_V3, ReadMode::FMA_V3); | ||
| m.insert(NodeGuid::CLASSID_CPIC_V3, ReadMode::CPIC_V3); |
There was a problem hiding this comment.
Decode V3 family fields before graph projection
When guid-v3-tail is enabled and callers project rows for these newly registered V3 classids, mint_for(... TailVariant::V3 ...) stores leaf in bytes 10..12 and the actual family in bytes 12..14, but soa_graph::project_snapshot/nearest_anchor still group, label, and anchor rows with the V1 row.key.family()/identity() decoding from bytes 10..13 and 13..16. That pollutes FMA_V3/CPIC_V3 family IDs with the leaf byte, so family nodes, adapter-edge resolution, and anchor matching won't correspond to the minted V3 family; update those consumers to branch on the resolved tail variant (e.g. use family_v2/identity_v2 for V3) before enabling these read-mode entries.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/lance-graph-contract/src/ogar_codebook.rs`:
- Around line 77-82: The OGAR parity bridge is missing the new Genetics contract
mapping, leaving `ConceptDomain::Genetics` out of sync with the vocabulary side
and potentially non-exhaustive. Update the matcher in
`ogar_vocab`/`ConceptDomain` parity logic in `lib.rs` to include the
`(O::Genetics, C::Genetics)` case alongside the existing `HR` and `Unassigned`
branches, and keep the drift guard coverage aligned so `0x0E00` is explicitly
matched.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2b37a8d6-3118-40c6-831a-4e12b54adbe9
📒 Files selected for processing (4)
.claude/board/EPIPHANIES.md.claude/board/LATEST_STATE.mdcrates/lance-graph-contract/src/canonical_node.rscrates/lance-graph-contract/src/ogar_codebook.rs
| /// `0x0EXX` — Genetics (pharmacogenomics; CPIC gene–drug guidelines, variant | ||
| /// annotations). Public reference knowledge, distinct from `Health` PHI. | ||
| /// Operator-allocated 2026-06-26 (`0x0D` was already HR). Mirror target | ||
| /// `ogar_vocab::ConceptDomain::Genetics` — OGAR catches up under the drift | ||
| /// guard (the parity tests pin `0x0E00 → Genetics`). | ||
| Genetics, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Update the OGAR parity bridge for Genetics.
Adding ConceptDomain::Genetics here changes the contract enum, but the parity matcher shown in crates/lance-graph-ogar/src/lib.rs:125-148 still stops at HR/Unassigned. That leaves the contract boundary out of sync: the drift guard will no longer cover 0x0E00, and the match can become non-exhaustive once Genetics is visible on both sides. Please add the (O::Genetics, C::Genetics) case in that bridge in the same change.
Also applies to: 104-104
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/lance-graph-contract/src/ogar_codebook.rs` around lines 77 - 82, The
OGAR parity bridge is missing the new Genetics contract mapping, leaving
`ConceptDomain::Genetics` out of sync with the vocabulary side and potentially
non-exhaustive. Update the matcher in `ogar_vocab`/`ConceptDomain` parity logic
in `lib.rs` to include the `(O::Genetics, C::Genetics)` case alongside the
existing `HR` and `Unassigned` branches, and keep the drift guard coverage
aligned so `0x0E00` is explicitly matched.
Review response to #618. Codex P2 (fixed): soa_graph::{project_snapshot, nearest_anchor} grouped, labeled, and anchored rows with the V1 family()/identity() decode (bytes 10..13 / 13..16). On a V2/V3-tail row (mint_for V3 -> new_v2 layout: family in 12..14, identity in 14..16) that folds the leaf byte into the family id. Added family_of/identity_of helpers that route through classid_read_mode's tail_variant — exactly like hhtl_path already does for the routing path — so a V2/V3 row reads family_v2/identity_v2. Feature-gated (guid-v2-tail); under no tail feature every classid is V1, so it stays guid.family(). This is the I-LEGACY-API-FEATURE-GATED canonical-mapping discipline. New test v3_rows_decode_family_and_identity_via_tail_variant (gated guid-v3-tail). CodeRabbit (parity bridge): the lance-graph-ogar domains_agree arm for Genetics can't be added yet — ogar_vocab::ConceptDomain::Genetics doesn't exist (OGAR not in this session's scope), and the domain-only mirror addition is safe in isolation (no CODEBOOK concept at 0x0E, COUNT_FUSE unchanged, parity test never hits 0x0E00). Recorded as ISS-OGAR-GENETICS-MIRROR-PENDING — the coordinated cross-repo arc lands when Genetics concepts are minted, per E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC. 739 lib green default / 746 guid-v2-tail / 751 guid-v3-tail; clippy --all-targets -D warnings + fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
|
Both review findings addressed in Codex P2 ( CodeRabbit Major (
The coordinated cross-repo arc (OGAR Gates: 739 default / 746 Generated by Claude Code |
Session handover for the next session: what shipped (#616 merged, #617 merged, ruff #29 open), the three-layer thesis, the V3 state (OSINT/FMA/ CPIC all wired as of #618 — none by this session), the built-but-unmerged minter (facet_mint @ serene-mayer 360fc72, 8 tests green), and the brick-3 MedCare probe as the single CONJECTURE→FINDING gate. Includes the burn/owl corrections and the sync-first discipline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
Phase 1 complete — the two remaining V3 identity mints
Closes the Phase-1 V3 set (OSINT ✓ #613 → FMA-V3 → CPIC-V3), mirroring the OSINT-V3 pattern exactly. With all three V3 classes wired, the atomic Canon:Custom half-order flip and Phase 2 (value tenants) are unblocked (plan §2.3 sequencing).
Mints (gated
guid-v3-tail)CLASSID_FMA_V30x1000_0A01FMA_V3{V3, Compressed, CoarseOnly}0x0A01 → Anatomy✓CLASSID_CPIC_V30x1000_0E00CPIC_V3{V3, Compressed, CoarseOnly}0x0E00 → Genetics✓Both register in
BUILTIN_READ_MODES. The0x1000gen-marker sits in the HIGH u16; the canon domain is preserved in the LOW u16, soclassid_concept_domainstill routes — the same Codex-P1-safe scheme proven for OSINT-V3.Genetics domain
0x0E(operator-allocated 2026-06-26)0x0Dwas already HR, so Genetics claims0x0E:ConceptDomain::Genetics+ the0x0E => Geneticsroute; the codebook parity test now pins0x0E00 → Genetics. Mirror targetogar_vocab::ConceptDomain::Genetics— OGAR catches up under the existing drift guard (the contract is the wire-compat mirror; OGAR isn't in this session's push scope).Genetics framing — basins are mereology, not labels
Per the operator directive (
I-VSA-IDENTITIESTest-0, register-laziness): 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 the position is taken against — which is exactly why the value model isCompressed(a fixed reference frame, not a hot lifecycle). Phase 2 carries gene expression as the coordinate value on top. Recorded asEPIPHANIESE-V3-BASINS-ARE-MEREOLOGY-NOT-LABELS and baked into theCLASSID_CPIC_V3doc-comment.Gates
read_mode_fma_v3_and_cpic_v3_route_their_domains(gatedguid-v3-tail): both route their domain, resolvetail_variant == V3, distinct classids.guid-v3-tail;clippy --all-targets -D warnings+fmtclean.LATEST_STATEContract Inventory +EPIPHANIESupdated in the same commit.Notes for the operator / other session
soa-value-tenant-migration-v2.md§2.2/§2.3/§7 status flip (FMA/CPIC rows "deferred → wired", Genetics0x0Epinned) is left for you — those sections are the other session's governance; I didn't rewrite them. This PR's board updates are the contract-side LATEST_STATE + EPIPHANIES.CPIC-V3 = Compressedis the Phase-1 provisional (the fixed-genome-schema rationale); Phase 2 pins the V3-shaped tenants.#614/#615PR_ARC_INVENTORYrows are still outstanding — I can fold them in here or next, your call.🤖 Generated with Claude Code
https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests