contract: retarget CLASSID_FMA 0x0901 → 0x0A01 (clear the FMA/patient classid collision)#603
Conversation
…llision)
OGAR's NodeGuid canon audit (OGAR/docs/NODEGUID-CANON-AUDIT.md F-1) surfaced a
real in-repo collision: NodeGuid::CLASSID_FMA = 0x0000_0901 was identical to
ogar_codebook's ("patient", 0x0901) — FMA anatomy and patient shared one classid,
both in the Health domain. A consumer could not distinguish an FMA structural
node from a patient node by classid, and patient RBAC grants (rbac.rs, 0x0901)
would gate FMA reference data.
Root cause: anatomy was placed in the Health PHI domain. Anatomy is public
reference (the femur exists; part_of the lower limb) — a clinical finding *about*
it is PHI, the structure itself is not.
Fix (mirrors OGAR's new 0x0A Anatomy mint, OGAR PR #117):
- ogar_codebook: add ConceptDomain::Anatomy, route 0x0A -> Anatomy, add
anatomical_structure/skeleton/bone/joint (0x0A01..04) to CODEBOOK.
- canonical_node: CLASSID_FMA 0x0901 -> 0x0A01 (anatomical_structure, the FMA
root). patient stays at 0x0901; collision cleared.
- Tests assert 0x0A01 / Anatomy and forbid the 0x0901 alias.
Constant-following consumers (ReadMode::FMA registry, soa_graph DomainSpec, q2
#50's osint-bake/fma) inherit the fix with no change. ConceptDomain is
#[non_exhaustive] (no exhaustiveness break). 735+ contract tests green,
clippy-clean. Board: EPIPHANIES E-CLASSID-FMA-PATIENT-COLLISION.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 27 minutes and 4 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 (3)
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 |
The bug (real, in-repo)
OGAR's NodeGuid canon audit (
OGAR/docs/NODEGUID-CANON-AUDIT.mdF-1) surfaced aclassid collision inside this contract:
canonical_node.rs:NodeGuid::CLASSID_FMA = 0x0000_0901ogar_codebook.rs:("patient", 0x0901)→ FMA anatomy and
patientshare the identical classid0x0901, both in theHealth domain (
>>8 == 0x09). A consumer can't distinguish an FMA structuralnode from a patient node by classid, and the patient RBAC grants (
rbac.rs,0x0901) would gate FMA reference data too.Root cause: anatomy was placed in the Health PHI domain. Anatomy is
public reference (the femur exists; it is
part_ofthe lower limb) — aclinical finding about it is PHI; the structure itself is not.
The fix
Mirrors OGAR's new
0x0AAnatomy domain (OGAR PR #117 — the Anatomy mint + theaudit that found this):
ogar_codebook.rs: addConceptDomain::Anatomy, route0x0A → Anatomy,add
anatomical_structure/skeleton/bone/joint(0x0A01..04) toCODEBOOK.canonical_node.rs: retargetCLASSID_FMA 0x0901 → 0x0A01(
anatomical_structure, the FMA root).patientstays at0x0901; thecollision is cleared. This continues the existing
ISS-CLASSID-OGAR-DRIFTrealignment saga (FMA:
0x0008 → 0x0901 → 0x0A01).0x0A01/Anatomyand to forbid the0x0901alias (
assert_ne!(CLASSID_FMA, 0x0901, "must not alias patient")).Blast radius
ReadMode::FMAregistry (m.insert(CLASSID_FMA, ReadMode::FMA)), thesoa_graphFMADomainSpec, and q2 PR docs: deep audit — 8 meticulous inventory documents across lance-grap… #50'sosint-bake/fma(which keyson
CLASSID_FMA).ConceptDomainis#[non_exhaustive]and matched only within this crate — noexhaustiveness break.
patient(0x0901) and allrbac.rspatient grants are untouched.Gates
cargo test -p lance-graph-contract— 735 + others green; clippy-clean (thetwo warnings are pre-existing, unrelated). Board hygiene:
EPIPHANIES.mdE-CLASSID-FMA-PATIENT-COLLISION.Cross-refs
0x0AAnatomy mint +NODEGUID-CANON-AUDIT.md(F-1).[mixin:instance]8:8 convergence onnew_v2(audit F-6); inherits this fix via the constant.🤖 Generated with Claude Code
Generated by Claude Code