Skip to content

feat(contract): FMA-V3 + CPIC-V3 mints + Genetics domain — Phase 1 V3 set complete#618

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/fma-cpic-v3-mint
Jun 26, 2026
Merged

feat(contract): FMA-V3 + CPIC-V3 mints + Genetics domain — Phase 1 V3 set complete#618
AdaWorldAPI merged 2 commits into
mainfrom
claude/fma-cpic-v3-mint

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Phase 1 complete — the two remaining V3 identity mints

Closes the Phase-1 V3 set (OSINT ✓ #613FMA-V3CPIC-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)

const value ReadMode domain route
CLASSID_FMA_V3 0x1000_0A01 FMA_V3 {V3, Compressed, CoarseOnly} 0x0A01 → Anatomy
CLASSID_CPIC_V3 0x1000_0E00 CPIC_V3 {V3, Compressed, CoarseOnly} 0x0E00 → Genetics

Both register in BUILTIN_READ_MODES. The 0x1000 gen-marker sits in the HIGH u16; the canon domain is preserved in the LOW u16, so classid_concept_domain still routes — the same Codex-P1-safe scheme proven for OSINT-V3.

Genetics domain 0x0E (operator-allocated 2026-06-26)

0x0D was already HR, so Genetics claims 0x0E: ConceptDomain::Genetics + the 0x0E => Genetics route; the codebook parity test now pins 0x0E00 → Genetics. Mirror target ogar_vocab::ConceptDomain::GeneticsOGAR 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-IDENTITIES Test-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 is Compressed (a fixed reference frame, not a hot lifecycle). Phase 2 carries gene expression as the coordinate value on top. Recorded as EPIPHANIES E-V3-BASINS-ARE-MEREOLOGY-NOT-LABELS and baked into the CLASSID_CPIC_V3 doc-comment.

Gates

  • 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 (zero re-mint of the V1/V2 corpus).
  • 739 lib green default / 750 guid-v3-tail; clippy --all-targets -D warnings + fmt clean.
  • Board: LATEST_STATE Contract Inventory + EPIPHANIES updated in the same commit.

Notes for the operator / other session

  • The plan soa-value-tenant-migration-v2.md §2.2/§2.3/§7 status flip (FMA/CPIC rows "deferred → wired", Genetics 0x0E pinned) 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 = Compressed is the Phase-1 provisional (the fixed-genome-schema rationale); Phase 2 pins the V3-shaped tenants.
  • #614/#615 PR_ARC_INVENTORY rows 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

    • Added support for a new Genetics concept domain.
    • Expanded V3 handling to include additional built-in read modes for two more identity classes.
  • Bug Fixes

    • Improved routing so genetics-related IDs are recognized correctly instead of being treated as unassigned.
    • Ensured V3 identities map to the correct domain and read behavior.
  • Documentation

    • Updated notes to reflect completion of the V3 Phase 1 set and the new genetics routing behavior.
  • Tests

    • Added coverage for genetics domain routing and V3 read-mode resolution.

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

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

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 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 @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 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9194891a-6d94-4564-bc40-de64f470da21

📥 Commits

Reviewing files that changed from the base of the PR and between cd886be and f3ae852.

📒 Files selected for processing (2)
  • .claude/board/ISSUES.md
  • crates/lance-graph-contract/src/soa_graph.rs
📝 Walkthrough

Walkthrough

The 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.

Changes

V3 Tail Identity and Genetics Routing

Layer / File(s) Summary
Genetics domain and board notes
crates/lance-graph-contract/src/ogar_codebook.rs, .claude/board/EPIPHANIES.md, .claude/board/LATEST_STATE.md
ConceptDomain::Genetics is added, canonical_concept_domain maps 0x0E to it, and the board notes record the new V3/Genetics framing and inventory entry.
V3 classids and read modes
crates/lance-graph-contract/src/canonical_node.rs
New CLASSID_FMA_V3 and CLASSID_CPIC_V3 constants, ReadMode::FMA_V3/CPIC_V3, registry inserts, and inline comments wire the missing V3 tail cases.
V3 routing tests
crates/lance-graph-contract/src/canonical_node.rs
The new test checks V3 tail routing, domain resolution, classid values, the 0x1000 generation marker, and read-mode equality for FMA-V3 and CPIC-V3.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I nibbled dawn beside the V3 stream,
where Genetics hopped in a coordinate dream.
Two tail-rabbits blinked: FMA, CPIC,
and basins wore addresses, neat and specific.
🐇 I thumped a tune through the burrow floor,
until the little registry asked for more.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding FMA-V3 and CPIC-V3 mints and the Genetics domain to complete Phase 1.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@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: 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".

Comment on lines +1134 to +1135
m.insert(NodeGuid::CLASSID_FMA_V3, ReadMode::FMA_V3);
m.insert(NodeGuid::CLASSID_CPIC_V3, ReadMode::CPIC_V3);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between e62f1c1 and cd886be.

📒 Files selected for processing (4)
  • .claude/board/EPIPHANIES.md
  • .claude/board/LATEST_STATE.md
  • crates/lance-graph-contract/src/canonical_node.rs
  • crates/lance-graph-contract/src/ogar_codebook.rs

Comment on lines +77 to +82
/// `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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ 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

Copy link
Copy Markdown
Owner Author

Both review findings addressed in f3ae8522.

Codex P2 (canonical_node.rs:1135) — fixed. soa_graph::{project_snapshot, nearest_anchor} were grouping/labeling/anchoring with the V1 family()/identity() accessors (bytes 10..13 / 13..16). On a V2/V3-tail row (mint_for(V3, …)new_v2 layout: family 12..14, identity 14..16) that folds the leaf byte into the family id. Added family_of/identity_of helpers that route through classid_read_mode(…).tail_variant — exactly as 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(). New test v3_rows_decode_family_and_identity_via_tail_variant. This is the I-LEGACY-API-FEATURE-GATED canonical-mapping discipline applied to the consumer side.

CodeRabbit Major (ogar_codebook.rs:82, OGAR parity bridge) — can't be applied yet; tracked. The (O::Genetics, C::Genetics) arm in lance-graph-ogar::parity::domains_agree requires ogar_vocab::ConceptDomain::Genetics, which does not exist yet (OGAR is not in this branch's scope), so the arm won't compile. The change here is domain-only (a ConceptDomain variant + 0x0E route, no CODEBOOK concept at 0x0E), which is safe in isolation:

  • COUNT_FUSE checks concept count (mirror::CODEBOOK.len()) — unchanged.
  • 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 doesn't break compile.

The coordinated cross-repo arc (OGAR ConceptDomain::Genetics + the contract CODEBOOK concept rows + the domains_agree arm), per E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC, lands when Genetics concepts are minted. Recorded as ISS-OGAR-GENETICS-MIRROR-PENDING.

Gates: 739 default / 746 guid-v2-tail / 751 guid-v3-tail; clippy --all-targets -D warnings + fmt clean.


Generated by Claude Code

@AdaWorldAPI AdaWorldAPI merged commit c86563c into main Jun 26, 2026
6 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jun 26, 2026
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
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