Skip to content

Commit cb98ddc

Browse files
authored
Merge pull request #675 from AdaWorldAPI/claude/medcare-ruff-codebook-handover-5ulx0i
contract::ogar_codebook — mirror the harvest-derived Health mints (0x0908..0x090C)
2 parents cd5178e + abb34fb commit cb98ddc

3 files changed

Lines changed: 33 additions & 6 deletions

File tree

.claude/board/LATEST_STATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
2929
---
3030

31+
## 2026-07-10 — branch `claude/medcare-ruff-codebook-handover-5ulx0i``contract::ogar_codebook` +`external_practice` (`0x090C`, round-4b Health mint)
32+
33+
Paired mirror of OGAR `13e1b0f` (COUNT_FUSE 88->89, `lance-graph-ogar` compile-time equality green). **NEW row:** `external_practice 0x090C` — a referral-partner organization (FHIR `Organization`), the round-4b furnace mint. Hardened by a staged 5+3 council **and** an operator-directed three-axis grounding gate (method + storage + navigation-structure witnesses all present -> grounded [G]); the round's second candidate was refused a mint by the same gate for lacking a navigational home. No OGIT entity -> no port alias. **Verified:** `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml` (fuse green, 62+ tests), `cargo test -p lance-graph-contract` (840 lib tests). Consumer side: medcare-analytics extends `MINTED_UNSERVED_HEALTH_CONCEPTS` with `0x090C`. Merge train: OGAR -> this mirror -> medcare gate, back-to-back (W1 fuse window universal, W2 medcare-gate window present).
34+
35+
## 2026-07-10 — branch `claude/medcare-ruff-codebook-handover-5ulx0i``contract::ogar_codebook` synced to the OGAR round-2 Health mints (`0x0908..0x090B`)
36+
37+
Paired mirror of OGAR `2c8836f` (two-sided COUNT_FUSE: `lance-graph-ogar` compile-time assert now 88 == 88). **NEW rows:** `anamnesis 0x0908` / `investigation 0x0909` / `examination 0x090A` / `practitioner 0x090B` — harvest-derived mints surfaced by the MedCare transcode furnace exam's slag ledger (council-hardened 5+3, spec in the consumer repo), NO OGIT entity → no port alias; the 0x09 section comment now names the two provenance classes (7 OGIT-promoted + 4 harvest-derived). **Verified:** `cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml` (COUNT_FUSE green, 62+ tests), `cargo test -p lance-graph-contract` (840 lib tests green). Consumer side: medcare-analytics lands the `MINTED_UNSERVED_HEALTH_CONCEPTS` fail-closed exemption ledger in the same window (its RLS boot gate derives coverage from `concepts_in_domain(Health)`). Merge train: OGAR first, this mirror immediately after, medcare gate immediately after that.
3138
## 2026-07-10 — branch `claude/review-claude-board-files-nhqgx1` — W2d `elevation::cycle::CycleBudget` + W4a `MailboxSoA::cast_on_behalf` (the M12 allocator + the write-on-behalf pairing at the carrier)
3239

3340
- **W2d / M12**`lance-graph-planner::elevation::cycle::CycleBudget`: the ONE per-cycle budget allocator. Reads the Libet anchor from the stamped Σ-commit `KanbanMove` (`from_move`; parity test pins `LIBET_CYCLE_BUDGET_US = 550_000` against the REAL `NextPhaseScheduler` stamp), carves every per-strategy `PatienceBudget` from the cycle remainder (`slice_for` — extend-don't-shadow), advisory `admits` (updates reprioritize, never gate), measured consts with provenance (66 µs/card lane-E t2; ~0.5 µs/step Addendum-5). Doc cross-refs both ways (budget.rs ↔ cycle.rs ↔ contract scheduler.rs). Planner lib 209 green. M12 → IN-FLIGHT.

crates/lance-graph-contract/src/ogar_codebook.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,14 +507,22 @@ pub const CODEBOOK: &[(&str, u16)] = &[
507507
("page_layout", 0x0807),
508508
("page_image", 0x0808),
509509
("ocr_renderer", 0x0809),
510-
// ── 0x09XX — Health domain (MedCare; OGIT NTO/Healthcare promotion) ──
510+
// ── 0x09XX — Health domain (MedCare; 0x0901..0x0907 = OGIT
511+
// NTO/Healthcare promotion; 0x0908..0x090C = harvest-derived mints,
512+
// furnace-exam rounds 2 & 4 — no OGIT entity, no port alias yet;
513+
// 0x090C external_practice is three-axis-witnessed, FHIR Organization) ──
511514
("patient", 0x0901),
512515
("diagnosis", 0x0902),
513516
("lab_value", 0x0903),
514517
("medication", 0x0904),
515518
("treatment", 0x0905),
516519
("visit", 0x0906),
517520
("vital_sign", 0x0907),
521+
("anamnesis", 0x0908),
522+
("investigation", 0x0909),
523+
("examination", 0x090A),
524+
("practitioner", 0x090B),
525+
("external_practice", 0x090C),
518526
// ── 0x0AXX — Anatomy domain (FMA reference ontology; public, not PHI) ──
519527
// FMA anatomy lives HERE, not in Health 0x09 — reference structure is
520528
// public, a clinical finding *about* it is PHI. `CLASSID_FMA` retargets to

crates/lance-graph-ogar/src/lib.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,21 +301,33 @@ mod hotplug_bridge_tests {
301301
let plug = HotPlug {
302302
consumer: "tesseract-ogar",
303303
classids: &[0x0805, 0x0808, 0x0809],
304+
// Exactly the actions the three requested classids declare
305+
// (OGAR `ocr_actions`, grown by OGAR #188's structured-document
306+
// v2): textline(0x0805)=1, page_image(0x0808)=7,
307+
// ocr_renderer(0x0809)=4 = 12. `harvest_fields` /
308+
// `detect_page_furniture` are `page_layout`(0x0807), NOT
309+
// requested here, so they stay out. `covered` must match the
310+
// requested classids' action set exactly (activate rejects both
311+
// Uncovered and Undeclared).
304312
covered: &[
305-
"extract_page_image",
306-
"extract_text_layer",
307313
"recognize_line",
308314
"recognize_page",
309-
"render_hocr",
310-
"render_searchable_pdf",
315+
"extract_text_layer",
316+
"extract_page_image",
317+
"recognize_page_words",
318+
"recognize_document",
319+
"segment_page",
320+
"detect_halftone_regions",
311321
"render_text",
312322
"render_tsv",
323+
"render_hocr",
324+
"render_searchable_pdf",
313325
],
314326
};
315327
let auth: &dyn CapabilityAuthority = &super::OgarAuthority;
316328
let act = auth.activate(&plug).expect("green activation");
317329
assert_eq!(act.concepts.len(), 3);
318330
assert!(act.concepts.contains(&("textline".to_string(), 0x0805)));
319-
assert_eq!(act.capabilities.len(), 8);
331+
assert_eq!(act.capabilities.len(), 12);
320332
}
321333
}

0 commit comments

Comments
 (0)