|
| 1 | +# medcare-consumer-pull-thinking-proof-v1 — one real medical thought through the already-live OGAR consumer path |
| 2 | + |
| 3 | +> **Status:** ACTIVE (consolidation + proof target). **Date:** 2026-08-02. |
| 4 | +> **Supersedes as the single active MedCare plan:** the host-side |
| 5 | +> manifest/supervisor/actor revival implied by `pr-e-1-manifest-modules.md`, |
| 6 | +> `pr-g1-manifest-modules.md`, `pr-g2-ractor-supervisor.md §8` (those specs stay |
| 7 | +> as historical records; see §3). Grounded in the 2026-08-02 read-only |
| 8 | +> investigation (six-agent sweep + unshallowed git history, HEAD `71d1db1`). |
| 9 | +> **Separation of concerns:** lance-graph is PUBLIC; MedCare-rs is PRIVATE. This |
| 10 | +> plan names consumer crates/tests structurally only — no clinical schema |
| 11 | +> detail, no sourcing/licensing reasoning, ever (MedCare-rs commitment #9). |
| 12 | +
|
| 13 | +## 1. Canonical classification (the investigation's verdict, pinned) |
| 14 | + |
| 15 | +There are **two MedCare integration lineages, not one partially-assembled path**: |
| 16 | + |
| 17 | +| Surface | Classification | Evidence | |
| 18 | +|---|---|---| |
| 19 | +| Bridge migration (`MedcareBridge = UnifiedBridge<HealthcarePort>`) | **COMPLETED** — deprecated compatibility alias only | commit `ddb6c840` (2026-06-21) collapsed the last bespoke per-tenant bridge; `#[deprecated]` landed `10e717d4` (2026-06-22) | |
| 20 | +| Healthcare codebook promotion (`0x0901–0x090C`, 7 port aliases) | **COMPLETED** — canon in OGAR `ogar_vocab`; `contract::ogar_codebook` is a **verified wire-compatible mirror** (checked slot-for-slot this pass) | OGAR `ports.rs:286-309`, `lib.rs:1262-1273`; the 7-vs-12 gap is **intentional** (harvest mints carry no OGIT entity → no alias; pin at `ports.rs:598-606`) — do NOT create a Healthcare subset codebook | |
| 21 | +| OGAR vocabulary plug-ins (`ogar-vocab`, `ogar-obo`, `ogar-fma`, `ogar-cpic`, ClassView, DDL adapters) | **EXISTING SUBSTRATE** — available plug-in infrastructure, NOT part of the live MedCare execution path (no `MedCare-rs → ogar-obo` edge exists; verified) | OGAR `crates/ogar-obo` (MONDO/HPO/Uberon/PATO); consumer grep clean | |
| 22 | +| Host-side manifest/supervisor/actor path | **DORMANT** — decision required before any revival (see §3) | frozen since birth 2026-05-13 (81 days at investigation HEAD) | |
| 23 | +| Callcenter authorization/audit composition (`callcenter::UnifiedBridge<B>` ⊗ `ogar::UnifiedBridge<P>`) | **LATER integration + hardening** — conceptually right, **currently unbuildable** (callcenter has zero dep on lance-graph-ogar); not a prerequisite for the first thought | dep-graph verified | |
| 24 | +| Real cognitive thought over MedCare data (shader-driver / MailboxSoA) | **ACTIVE PROOF TARGET** — this plan's §4 | the honest gap: cognition, not plumbing | |
| 25 | +| Generic manifest-driven actor factory | **POST-PROOF generalization** (only if §3 rules "revive") | — | |
| 26 | + |
| 27 | +## 2. The live path (build on THIS) |
| 28 | + |
| 29 | +``` |
| 30 | +MedCare-rs (private) |
| 31 | + └─ crates/medcare-bridge ──(vendor/lance-graph softlink)──► |
| 32 | + lance_graph_ogar::MedcareBridge = UnifiedBridge<HealthcarePort> |
| 33 | + ├─ entity()/entity_by_uri() — namespace-locked, codebook synthesis |
| 34 | + ├─ ogar_vocab::ports::HealthcarePort (class_id("Patient")=0x0901, APP_PREFIX=0x0005) |
| 35 | + └─ OntologyRegistry (TTL hydration) |
| 36 | + └─ crates/medcare-rbac ──► ogar-vocab (direct) |
| 37 | +``` |
| 38 | + |
| 39 | +Compiles and is tested on the consumer side (`healthcare_hydrate.rs` scope-lock) |
| 40 | +and on this side (`bridge_scope_lock.rs`, `medcare_bridge_conforms`, all green — |
| 41 | +NOTE: `lance-graph-ogar` is workspace-EXCLUDED; test via |
| 42 | +`--manifest-path crates/lance-graph-ogar/Cargo.toml`, a green parent-workspace |
| 43 | +build proves nothing about it). |
| 44 | + |
| 45 | +## 3. The dead lineage (dormant — do NOT revive to prove thinking) |
| 46 | + |
| 47 | +``` |
| 48 | +modules/medcare/manifest.yaml → build.rs → MANIFEST_METADATA ╳ (one caller: a test) |
| 49 | +CallcenterSupervisor::spawn_consumer_actor → StubConsumerActor (unconditional) |
| 50 | +DispatchToG: Health → ok; ALL else → DispatchNotImplemented (child never reached) |
| 51 | +MedcareConsumerActor — never constructed; all 8 arms tracing::debug! + TODO |
| 52 | +manifest actor.type = MedCareActor / MedCareMessage — exist in NEITHER repo |
| 53 | +rbac_policy: medcare_policy — symbol does not exist |
| 54 | +entity codes 100–105 / action_capabilities / actor.message_type — parsed then DISCARDED |
| 55 | +``` |
| 56 | + |
| 57 | +Reviving this is **not a wiring patch — it would be a new implementation based |
| 58 | +on a stale declaration.** The literal MedCare surfaces that ARE live and useful |
| 59 | +as workbench material — `StepDomain::Medcare::profile()`, `medcare_ontology()`, |
| 60 | +the ontology_table/conformance fixtures, `ConsumerEnvelope` types — may be |
| 61 | +reused as proof fixtures, but are NOT the canonical runtime composition and |
| 62 | +must not be presented as such. |
| 63 | + |
| 64 | +**Open decision (operator):** retire vs revive. If revived: a real typed actor |
| 65 | +factory keyed on live types, never on the fictional YAML names; and the |
| 66 | +manifest either emits everything it declares or stops declaring it. |
| 67 | + |
| 68 | +## 4. The proof target — first medical thought (the drill hole) |
| 69 | + |
| 70 | +``` |
| 71 | +MedCare-rs medical input (existing schema surface, private side) |
| 72 | + → existing OGAR HealthcarePort bridge (classid resolution, namespace lock) |
| 73 | + → existing MedCare-rs RBAC or a narrow proof policy (fail-closed) |
| 74 | + → cognitive-shader-driver + REAL MailboxSoA (the honest gap) |
| 75 | + → non-vacuous medical cognitive result (falsifier below) |
| 76 | + → owner_adapter::emit_bootstrap_intent / BatchWriter (write-on-behalf cast) |
| 77 | + → cycle_driver (PR #879): collect → seal (one WAL write) → apply sparse → next intent |
| 78 | +``` |
| 79 | + |
| 80 | +A small direct adapter is acceptable. The known seam: `MailboxSoaView::qualia()` |
| 81 | +is deferred; `run_cognitive_work_gated`'s caller-extractor bridges it today — |
| 82 | +the proof should read gate inputs from the REAL SoA qualia column, closing the |
| 83 | +"extractor-fed" honesty gap in the #879 ledger. |
| 84 | + |
| 85 | +**Falsifiers (per the P0 falsifiability rule):** |
| 86 | +- F1 — the cognitive result is **non-vacuous**: two different medical inputs |
| 87 | + produce two different gate outcomes (discriminates; not a constant). |
| 88 | +- F2 — the classid on the thought's carrier is the OGAR canon (`0x0901`-family |
| 89 | + via `HealthcarePort::class_id`), not a local literal. |
| 90 | +- F3 — the intent round-trips: cast in cycle N is collected, sealed (exactly one |
| 91 | + WAL write) and applied in N+1; unrepresented owners byte-identical. |
| 92 | +- F4 — the policy leg is fail-closed: an unrecognized actor/role against the |
| 93 | + Healthcare classid is DENIED (this test is currently ABSENT — finding h). |
| 94 | + |
| 95 | +## 5. Optional OBO slice (only if it makes the proof observably medical) |
| 96 | + |
| 97 | +`ogar-obo` exists (MONDO/HPO/Uberon/PATO). If the proof wants a visibly |
| 98 | +clinical hop: `HealthcarePort::Diagnosis → MONDO term → optional HPO phenotype |
| 99 | +→ cognitive operation`. No full vocabulary hydration, no ontology federation, |
| 100 | +no cathedral. Skip entirely if F1–F4 pass without it. |
| 101 | + |
| 102 | +## 6. Open decisions carried (not blocked on — the proof proceeds around them) |
| 103 | + |
| 104 | +1. **OQ-2 retention:** 2190d (`StepDomain::Medcare`, tested) vs 3650d |
| 105 | + (manifest, dead path) — HIPAA 6yr vs BMV-Ä §57 10yr. Operator/regulatory. |
| 106 | +2. **`Ueberweisung` / `Anamnese` canon:** first-class consumer concepts; |
| 107 | + `anamnesis` = `0x0908` (no port alias), `Ueberweisung` has NO canonical id. |
| 108 | + OGAR-side mint decision. |
| 109 | +3. **Dead-lineage retire/revive** (§3). |
| 110 | +4. **Bridge composition edge** (callcenter⊗ogar) — later hardening. |
| 111 | +5. **`.grok/` Zone-3/spear lineage** — unreconciled third model; needs a ruling |
| 112 | + or a staleness banner. |
| 113 | +6. **Audit default = `NoopAuditSink`** with `SuperDomain::Unknown`/salt 0 and |
| 114 | + swallowed emit errors — for a HIPAA-regime domain, "configured" and |
| 115 | + "recording" are indistinguishable. P0 candidate, own PR. |
| 116 | + |
| 117 | +## 7. Exclusions (scope fence) |
| 118 | + |
| 119 | +- NO manifest/supervisor/actor revival for the proof. |
| 120 | +- NO new Healthcare subset codebook; NO local classid literals. |
| 121 | +- NO callcenter⊗ogar dependency edge as a proof prerequisite. |
| 122 | +- NO provisional-intent recovery ledger in #879: pre-commit failure → publish |
| 123 | + nothing, mutate nothing, retry the byte-identical frozen cycle (`SealFailure`); |
| 124 | + post-commit crash → recover committed history (`recover_fleet` + watermarks). |
| 125 | + Committed-history recovery and ordinary failed-write recomputation stay |
| 126 | + SEPARATE mechanisms. (Latency figures floating in review prose for these two |
| 127 | + paths are **claimed, unverified** — nothing here measured them; do not cite.) |
| 128 | +- NO clinical schema detail or sourcing/licensing reasoning in this public repo. |
| 129 | + |
| 130 | +## 8. Status ledger for the older documents |
| 131 | + |
| 132 | +| Doc | Disposition | |
| 133 | +|---|---| |
| 134 | +| `pr-e-1-manifest-modules.md`, `pr-g1-manifest-modules.md`, `pr-g2-ractor-supervisor.md` | historical — describe the dormant lineage | |
| 135 | +| `pr-e1-medcare-super-domain.md` | historical + carries the open OQ-2 | |
| 136 | +| `foundry-consumer-parity-v1.md`, `foundry-roadmap.md`, `MEDCARE_POLICY_GAP.md`, `td-super-domain-subcrates.md` | stale-but-unmarked (investigation §8-P3); banner candidates | |
| 137 | +| `ogar-sink-in-and-consumer-bridge-removal-v1.md` | substantially DONE (the `ddb6c840` collapse) | |
| 138 | +| `lance-graph-in-medcare-rs-v1.md`, `unified-bridge-consumer-migration-v1.md` | partially landed; remaining items fold into §6 here | |
| 139 | +| `.grok/board/*` | unreconciled second lineage; §6.5 | |
| 140 | + |
| 141 | +**The central realignment:** OGAR and the bridge pattern are NOT the unfinished |
| 142 | +part. The unfinished part is **cognition and composition**. Prove one real |
| 143 | +medical thought through the already-live consumer path, then generalize the |
| 144 | +exact seam that worked. |
0 commit comments