Skip to content

Commit a856993

Browse files
committed
docs(medcare): consolidate the two-lineage investigation into one active plan
Six-agent read-only investigation + unshallowed git history (5 grafted roots -> 4162 commits) established that lance-graph holds TWO MedCare lineages, not one incomplete runtime: - LIVE (consumer-pull): MedCare-rs medcare-bridge -> vendored lance-graph-ogar -> MedcareBridge = UnifiedBridge<HealthcarePort> -> OGAR canonical Health codebook 0x0901..0x090C. Bridge migration COMPLETED at ddb6c84 (2026-06-21); deprecated alias only. Contract codebook mirror verified in sync slot-for-slot; the 7-alias-vs-12-slot gap is intentional (harvest mints, no OGIT entity). - DEAD (host-side scaffold): modules/medcare/manifest.yaml -> CallcenterSupervisor -> MedcareConsumerActor, frozen since birth 2026-05-13. Manifest compile-time parsed but runtime-orphaned (one caller: a test); entity codes / action_capabilities / message_type discarded pre-codegen; medcare_policy nonexistent; StubConsumerActor hard-coded; Dispatch rejected before any child; MedCareActor / MedCareMessage exist in NEITHER repository. New ACTIVE plan medcare-consumer-pull-thinking-proof-v1: prove one real medical thought over the live consumer-pull path (HealthcarePort classids -> cognitive-shader-driver + real MailboxSoA -> owner_adapter cast -> the #879 sparse cycle loop), falsifiers F1-F4 including the currently-absent Healthcare fail-closed unknown-actor test. ogar-obo (MONDO/HPO/Uberon/PATO, verified real, zero consumer edges) is an optional slice. Older MedCare plans classified (completed / dormant- decision-required / stale-but-unmarked); open decisions carried, not blocked on (OQ-2 retention 2190/3650, Ueberweisung/Anamnese canon gap, dead-lineage retire-vs-revive, .grok lineage, NoopAuditSink default). Documentation-only: no Rust, no tests, no manifests changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp
1 parent 130d7b2 commit a856993

4 files changed

Lines changed: 183 additions & 0 deletions

File tree

‎.claude/board/EPIPHANIES.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 2026-08-02 — E-TWO-MEDCARE-LINEAGES-THE-LIVE-ONE-PULLS-THE-DEAD-ONE-HOSTS-1 — MedCare is integrated through consumer-pull; the host-side actor/manifest scaffold froze on its birth day
2+
3+
**Status:** FINDING (six-agent read-only investigation + unshallowed git history, HEAD `71d1db1`). **Confidence:** High — every claim carries a commit sha or file:line; contradicting prose ledgers were checked against code. Plan: `.claude/plans/medcare-consumer-pull-thinking-proof-v1.md`.
4+
5+
**The finding.** lance-graph does NOT contain "one incomplete MedCare runtime" — it contains **two lineages**. The LIVE one is consumer-pull: MedCare-rs `medcare-bridge` → vendored `lance-graph-ogar` → `MedcareBridge = UnifiedBridge<HealthcarePort>` (collapse commit `ddb6c840`, 2026-06-21; deprecated alias since `10e717d4`) → OGAR canonical Health codebook (`0x0901–0x090C`; the contract mirror verified in sync slot-for-slot; the 7-alias-vs-12-slot gap is INTENTIONAL per OGAR `ports.rs:598-606`). The DEAD one is the host-side scaffold born in the sprint-7 wave (2026-05-13, `927788e9`/`3f67aed6`) and **never functionally touched again**: `modules/medcare/manifest.yaml` is compile-time parsed (`contract/build.rs`) into `MANIFEST_METADATA` whose ONLY caller is a test; its richest fields (entity codes 100–105, all five `action_capabilities`, `actor.message_type`) are parsed then DISCARDED pre-codegen; `rbac_policy: medcare_policy` names a nonexistent symbol; `CallcenterSupervisor::spawn_consumer_actor` unconditionally spawns `StubConsumerActor` (`supervisor.rs:369`); `DispatchToG` returns `DispatchNotImplemented` before any child actor for every non-Health envelope; `MedcareConsumerActor` has ZERO constructors repo-wide; and the manifest's declared `MedCareActor`/`MedCareMessage` exist in NEITHER repository (verified against the MedCare-rs sibling directly).
6+
7+
**Load-bearing distinctions this pins:** (a) TWO same-named `UnifiedBridge` types — ogar's `<P: PortSpec>` resolver (NO authorize method) vs callcenter's `<B: NamespaceBridge>` authorize/audit wrapper — never composed, and currently UNCOMPOSABLE (callcenter has zero dep on lance-graph-ogar); classify composition as later hardening, never as a shipped edge. (b) `lance-graph-ogar` is workspace-EXCLUDED — a green parent-workspace build compiles none of it (`--manifest-path` required; 83 tests green there). (c) The audit default is `NoopAuditSink` + `SuperDomain::Unknown`/salt 0 with swallowed emit errors, and `MEDCARE_AUDIT_SALT` is read fail-open then discarded — for a HIPAA-regime domain, "configured" vs "recording" is indistinguishable (P0 candidate). (d) Retention 2190d (`StepDomain::Medcare`, tested) vs 3650d (manifest, dead) is the DOCUMENTED open question OQ-2 (HIPAA vs BMV-Ä §57), not an accident. (e) `Anamnese`/`Ueberweisung` are first-class consumer concepts (97/81 refs) with no port alias / no canonical id at all — a real canon gap, not naming noise. (f) A third, unreconciled `.grok/` lineage (Zone-3 via spear, 2026-05-08) contradicts both.
8+
9+
**The lesson (generalizes):** when a repo hosts a consumer-shaped scaffold AND the consumer separately pulls the repo's libraries, the scaffold can freeze at birth while every ledger keeps narrating it as "the integration" — dormancy is invisible in prose because infra work *around* the frozen files (branch names, "first-thought loop" commits) keeps the term alive. The falsifier that cut through: per-file `git log` dormancy (81 days = age of the file) + constructor-count (zero) + the two-repo actor-name check. Also: the clone was SHALLOW (5 grafted roots, 11-day window) — `git fetch --unshallow` converted a "between 06-23 and 06-26 per prose" estimate into the exact commit `ddb6c840` two days earlier. **Archaeology on a shallow clone is prose archaeology; unshallow first.**
10+
111
## 2026-08-02 — E-D-MBX-SPINE-IS-STRAIGHT-TRACK-VERSION-IS-NOT-A-FLEET-STEP-SIGNAL-1 — the D-MBX production ownership map is ratified, and P4's fleet-wide fan-step is corrected to sparse sealed-transition application
212

313
**Status:** RATIFIED (operator ruling, 2026-08-02) + CORRECTION of a same-session drift. **Confidence:** High for the ownership map (verified against `Cargo.toml` deps) and the sparse correction (it removes a direct contradiction with `E-COMPLETE-CYCLE-IS-PHYSICALLY-SPARSE-NOT-A-FULL-REWRITE-1`). Documentation-only — no Rust/tests changed. Recorded in `.claude/plans/cycle-loop-closure-driver-v1.md` §3, §9–§11.

‎.claude/board/INTEGRATION_PLANS.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## 2026-08-02 — medcare-consumer-pull-thinking-proof v1 — ACTIVE (the single active MedCare plan after the two-lineage investigation) — main thread
2+
3+
**Plan:** `.claude/plans/medcare-consumer-pull-thinking-proof-v1.md`
4+
Consolidation of the 2026-08-02 six-agent read-only MedCare/Healthcare
5+
investigation (HEAD `71d1db1`, git unshallowed to 4162 commits). Verdict:
6+
**two lineages, not one incomplete runtime.** LIVE = consumer-pull (MedCare-rs
7+
`medcare-bridge` → vendored `lance-graph-ogar` → `UnifiedBridge<HealthcarePort>`
8+
→ OGAR canon `0x0901–0x090C`; bridge migration COMPLETED at `ddb6c840`
9+
2026-06-21, `MedcareBridge` deprecated alias only). DEAD = host-side
10+
manifest/supervisor/actor scaffold (frozen since birth 2026-05-13; manifest
11+
compile-time-parsed but runtime-orphaned; `MedcareConsumerActor` never
12+
constructed; supervisor hard-codes `StubConsumerActor`; Dispatch rejected
13+
pre-child; `MedCareActor`/`MedCareMessage` exist in NEITHER repo;
14+
`medcare_policy` symbol nonexistent). Two same-named, never-composed
15+
`UnifiedBridge` types (ogar resolver — no authorize; callcenter authorize/audit
16+
— no ogar dep) classified as LATER hardening, not a proof prerequisite.
17+
**Active proof target:** one real medical thought over the live consumer-pull
18+
path — HealthcarePort classids → cognitive-shader-driver + REAL MailboxSoA
19+
(closing the qualia-extractor honesty gap) → owner_adapter cast → PR #879
20+
sparse cycle loop; falsifiers F1–F4 incl. the currently-ABSENT fail-closed
21+
unknown-actor test. `ogar-obo` (MONDO/HPO/Uberon/PATO — verified real, zero
22+
consumer edges) = optional slice only. Older MedCare plans classified in the
23+
plan's §8 ledger (completed / dormant-decision-required / stale-but-unmarked).
24+
125
## 2026-08-02 — cycle-loop-closure-driver v1 — PLANNED / CONJECTURE (the seam that makes persist_sink load-bearing at 64k) — main thread
226

327
**Plan:** `.claude/plans/cycle-loop-closure-driver-v1.md`

‎.claude/board/LATEST_STATE.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2026-08-02 — branch `claude/medcare-rs-continue-ufsazd` — MedCare two-lineage investigation CONSOLIDATED → one active plan (consumer-pull thinking proof)
2+
3+
- Six-agent read-only investigation (code inventory · callcenter/policy · manifest→runtime chain · plans archaeology · git history · tests+build) + main-thread cross-repo verification (OGAR + MedCare-rs siblings) + `git fetch --unshallow` (5 grafted roots → 4162 commits). Full verdict in `EPIPHANIES.md` `E-TWO-MEDCARE-LINEAGES-THE-LIVE-ONE-PULLS-THE-DEAD-ONE-HOSTS-1`; classification + proof target in **`.claude/plans/medcare-consumer-pull-thinking-proof-v1.md`** (ACTIVE — the single active MedCare plan; INTEGRATION_PLANS prepended).
4+
- Headline: **bridge migration COMPLETED** (`ddb6c840` 2026-06-21, `MedcareBridge` = deprecated alias over `UnifiedBridge<HealthcarePort>`; codebook mirror verified in sync with OGAR); **host-side manifest/supervisor/actor lineage DORMANT since birth 2026-05-13** (manifest runtime-orphaned; `MedcareConsumerActor` never constructed; `StubConsumerActor` hard-coded; Dispatch rejected pre-child; `MedCareActor`/`MedCareMessage` in neither repo; `medcare_policy` nonexistent). Two same-named, uncomposable `UnifiedBridge` types = later hardening. **Active target: one real medical thought over the live consumer-pull path into the #879 cycle loop** (F1–F4 falsifiers, incl. the ABSENT Healthcare fail-closed unknown-actor test). P0 candidates surfaced: NoopAuditSink-by-default for a HIPAA-regime domain; fail-open discarded `MEDCARE_AUDIT_SALT`. Open decisions carried (§6): OQ-2 retention 2190/3650, `Ueberweisung`/`Anamnese` canon gap, dead-lineage retire/revive, `.grok/` lineage.
5+
16
## 2026-08-02 — branch `claude/medcare-rs-continue-ufsazd` — PR #879 review round: recovery/data-integrity holes fixed + scope honesty (grain-of-salt audit)
27

38
Operator-forwarded review (grain of salt); each finding verified against code before acting. **Accepted + fixed (all real):**
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
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

Comments
 (0)