Skip to content

contract::ogar_codebook — mirror the harvest-derived Health mints (0x0908..0x090C)#675

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/medcare-ruff-codebook-handover-5ulx0i
Jul 10, 2026
Merged

contract::ogar_codebook — mirror the harvest-derived Health mints (0x0908..0x090C)#675
AdaWorldAPI merged 3 commits into
mainfrom
claude/medcare-ruff-codebook-handover-5ulx0i

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Mirrors the five harvest-derived Health concepts minted upstream in OGAR (anamnesis 0x0908external_practice 0x090C) into the zero-dep lance-graph-contract::ogar_codebook table. This is the paired half of the two-sided COUNT_FUSE drift guard: lance-graph-ogar carries a compile-time assert that the mirror length equals ogar_vocab::class_ids::ALL, so the mirror must move in lockstep with the OGAR codebook.

What's in the diff

  • lance-graph-contract/src/ogar_codebook.rs: +5 CODEBOOK rows (same order as the OGAR side); the 0x09XX section comment records the harvest-mint range and external_practice's three-axis grounding (FHIR Organization).
  • .claude/board/LATEST_STATE.md: prepended entry per the board-hygiene rule (same commit).

Merge order

Paired with OGAR PR #189. Merge that first (it bumps class_ids::ALL to the count this mirror now equals); merge this one immediately after so the lance-graph-ogar fuse compiles (89 == 89). Then the MedCare-rs consumer PR. Freeze other lance-graph/medcare merges during the window.

Test Plan

  • cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml — fuse compiles, 62+ tests green (against OGAR head)
  • cargo test -p lance-graph-contract — 840 lib tests green

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Expanded Health terminology coverage with new concepts for anamnesis, investigation, examination, practitioner, and external practice.
    • Added stable identifiers for the newly supported Health concepts, improving consistency across related records and workflows.
  • Documentation

    • Updated Health domain reference information to include the expanded set of supported concepts.

claude added 2 commits July 10, 2026 12:19
Paired with the OGAR-side mint (two-sided COUNT_FUSE drift fuse:
lance-graph-ogar compile-time assert now 88 == 88). Same rows, same
order as ogar-vocab CODEBOOK: anamnesis / investigation / examination /
practitioner — harvest-derived, no OGIT entity, no port alias yet.

Co-Authored-By: Claude <noreply@anthropic.com>
Paired with OGAR 13e1b0f (two-sided COUNT_FUSE: 89 == 89). Same row,
same order as ogar-vocab CODEBOOK; the 0x09 section comment notes the
0x0908..0x090C harvest-mint range and external_practice's three-axis
grounding. LATEST_STATE prepended per board-hygiene rule.

Co-Authored-By: Claude <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_531202f4-2198-44d8-97cc-2fecdda19e77)

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 54 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 223b5e67-55db-4703-acfe-d992c013cd36

📥 Commits

Reviewing files that changed from the base of the PR and between ccaee50 and abb34fb.

📒 Files selected for processing (2)
  • .claude/board/LATEST_STATE.md
  • crates/lance-graph-ogar/src/lib.rs
📝 Walkthrough

Walkthrough

The Health CODEBOOK domain now includes five additional canonical concepts from 0x0908 through 0x090C. The board inventory records their mirror synchronization, verification checks, and cargo test validations.

Changes

Health codebook

Layer / File(s) Summary
Add Health concept mappings and inventory
crates/lance-graph-contract/src/ogar_codebook.rs, .claude/board/LATEST_STATE.md
The codebook adds anamnesis, investigation, examination, practitioner, and external_practice; the inventory records corresponding mirror updates and validation references.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I’m a bunny with five new hops,
Through Health’s codebook, the mapping stops.
From 0x0908 to 0x090C,
The mint rows match quite perfectly.
Tests thump softly—everything’s bright! 🐇

🚥 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 clearly matches the main change: mirroring the harvest-derived Health mints in ogar_codebook for 0x0908..0x090C.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

🧹 Nitpick comments (1)
crates/lance-graph-contract/src/ogar_codebook.rs (1)

714-716: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add test assertions for the new Health entries.

The existing codebook_ids_match_ogar_vocab test covers Health entries patient (0x0901) and vital_sign (0x0907) but does not cover the newly added entries 0x09080x090C. Per coding guidelines, Rust unit tests should accompany implementations in #[cfg(test)] modules. While the cross-crate parity guard in lance-graph-ogar provides bijection validation, local assertions give faster feedback and follow the guideline.

As per coding guidelines: "Add Rust unit tests alongside implementations via #[cfg(test)] modules; prefer focused scenarios over broad integration tests."

♻️ Proposed test additions
         // 0x09XX Health + 0x0BXX Auth (OGAR `#110` minted the AuthStore family).
         assert_eq!(canonical_concept_id("patient"), Some(0x0901));
         assert_eq!(canonical_concept_id("vital_sign"), Some(0x0907));
+        // 0x0908..0x090C harvest-derived Health mints (OGAR PR `#189`).
+        assert_eq!(canonical_concept_id("anamnesis"), Some(0x0908));
+        assert_eq!(canonical_concept_id("practitioner"), Some(0x090B));
+        assert_eq!(canonical_concept_id("external_practice"), Some(0x090C));
         assert_eq!(canonical_concept_id("auth_store"), Some(0x0B01));
🤖 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 714 - 716, Add
assertions in the existing `codebook_ids_match_ogar_vocab` test for each newly
added Health entry, verifying `canonical_concept_id` maps the relevant symbols
to IDs 0x0908 through 0x090C. Keep the assertions alongside the existing
`patient` and `vital_sign` checks in the local `#[cfg(test)]` module.

Source: Coding guidelines

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

Nitpick comments:
In `@crates/lance-graph-contract/src/ogar_codebook.rs`:
- Around line 714-716: Add assertions in the existing
`codebook_ids_match_ogar_vocab` test for each newly added Health entry,
verifying `canonical_concept_id` maps the relevant symbols to IDs 0x0908 through
0x090C. Keep the assertions alongside the existing `patient` and `vital_sign`
checks in the local `#[cfg(test)]` module.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6e713fc-8402-4c81-8a74-891776d6438a

📥 Commits

Reviewing files that changed from the base of the PR and between cd5178e and ccaee50.

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

…odebook-handover-5ulx0i

# Conflicts:
#	.claude/board/LATEST_STATE.md
@AdaWorldAPI AdaWorldAPI merged commit cb98ddc into main Jul 10, 2026
7 of 8 checks 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