HF-13: reconcile GitHub and ForgeGraph main; add Level 2 hospital IT plan #5

Merged
gmackie merged 5 commits from feat/HF-13-dual-reference-deployment into main 2026-11-04 10:00:05 +00:00
Owner

HF-13 (https://tasks.gmac.io/gmacko/issue/HF-13), first slice of Phase R: dual reference deployment.

What this does

  • Reconciles the two remotes. GitHub main had HF-8 and HF-9; ForgeGraph main had HF-11, HF-2 and HF-12. Both are ancestors of this head, so landing it by fast-forward makes both mains the same commit.
  • Fixes a test conflict between the two histories. HF-11's early-result recovery test expected the repeat poll to skip one result. HF-8's persistent intake cursor means that result is never re-read, so the expectation is now zero skipped. The test still asserts exactly one chart entry, so duplicate prevention remains covered.
  • Adds the plan. docs/plans/2026-11-04-level2-hospital-it.html covers the Level 2 hospital IT plan: Path A with an OpenMRS EMR, hospital-fabric on celld, and reference deployments on labnuc and Cloudflare. It is tracked as HF-13 to HF-22.

Verification

  • npm run check (SQL integrity, typecheck, 54 tests): all pass locally on 07dab79.

Remaining HF-13 work (follow-up PRs)

Site/cloud profiles, the cells-vs-D1 ADR, celld 0.6.3, the newnas MinIO bucket and labnuc celld node, the OpenMRS/OpenELIS port to labnuc, routes for hospital.mackie.house and hospital.gmac.io, the site-to-cloud link, the bucket restore drill, and ForgeGraph stages.

🤖 Generated with Claude Code

HF-13 (https://tasks.gmac.io/gmacko/issue/HF-13), first slice of Phase R: dual reference deployment. ## What this does - **Reconciles the two remotes.** GitHub main had HF-8 and HF-9; ForgeGraph main had HF-11, HF-2 and HF-12. Both are ancestors of this head, so landing it by fast-forward makes both mains the same commit. - **Fixes a test conflict between the two histories.** HF-11's early-result recovery test expected the repeat poll to skip one result. HF-8's persistent intake cursor means that result is never re-read, so the expectation is now zero skipped. The test still asserts exactly one chart entry, so duplicate prevention remains covered. - **Adds the plan.** `docs/plans/2026-11-04-level2-hospital-it.html` covers the Level 2 hospital IT plan: Path A with an OpenMRS EMR, hospital-fabric on celld, and reference deployments on labnuc and Cloudflare. It is tracked as HF-13 to HF-22. ## Verification - `npm run check` (SQL integrity, typecheck, 54 tests): all pass locally on 07dab79. ## Remaining HF-13 work (follow-up PRs) Site/cloud profiles, the cells-vs-D1 ADR, celld 0.6.3, the newnas MinIO bucket and labnuc celld node, the OpenMRS/OpenELIS port to labnuc, routes for hospital.mackie.house and hospital.gmac.io, the site-to-cloud link, the bucket restore drill, and ForgeGraph stages. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
* HF-8: resume unkeyed result intake after a persistent rowid cursor

pollResults read the oldest 25 released LIS results on every unkeyed poll,
so after 25 results every newer one was re-read as skipped forever and its
order never completed. Unkeyed polls now resume after a monotonic
lis_results rowid cursor (migration 0006); the inbox still deduplicates.
Keyed polls are unchanged. Found by the kybernos governed twin (KYBE-17).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* HF-8: regenerate embedded migrations

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat: add local Type 3 research workbench across P0-P6

Add an isolated Effect/Workers host and D1-backed v2 research model for ICU dependencies, advanced synthetic laboratory panels, surgery and sterile sets, referral reservations, equipment bench tooling, and evidence gates. Preserve the existing public/v1 hospital and Kybernos contracts. Include deterministic replay, 59 core/SQLite tests, local UI, a scripted exercise, and a real-runtime restart smoke for CI.

Synthetic research only. No real clinical data, hardware commissioning, clinical approvals, cloud deployment, or WHO verification.

* test: verify Type 3 celld recovery and Forge contract in CI

* docs: use the pinned Forge 0.5 build command

* fix: build Type 3 Forge metadata with pinned CLI syntax

* fix: keep Type 3 config compatible with celld and workerd

* docs: make loopback and port explicit for shared-runtime setup

* feat(lab): add capability-aware live OpenMRS/OpenELIS integration core

Generalize the private product FHIR connector beyond the fixed hemoglobin fixture. Add reviewed catalog mapping, multiple independently correlated orders, conditional source submission, exact source reconciliation, validated result extraction, guarded OpenMRS chart import, and private SQLite/D1 journal schema. Keep synthetic sandbox write gates and public demo isolation.

* feat(lab): verify OpenMRS identity and completed OpenELIS task before result retrieval

* fix(lab): narrow FHIR chart subject at runtime verification

* test(lab): exercise general real-FHIR connector and durable replay with product-shaped fixtures

* fix(lab): retain verified nonnull FHIR request identity under strict TypeScript

* test(lab): isolate live chart precondition regression

* build(lab): provide private-host bundle of general live adapters

* fix(lab): distinguish chart-result eligibility failures without exposing clinical data

* feat(lab): host-side multi-case driver for existing private OpenMRS/OpenELIS installations

* fix(lab): identify which reference lacks an eligible FHIR UUID

* docs(lab): operate generalized adapter against existing private OpenMRS/OpenELIS

* chore(lab): keep private host ESM bundle out of repository

* fix(lab): recognize full five-group FHIR UUIDs for OpenMRS chart writes

* docs: distinguish new general live lab adapter from fixed synthetic demonstration

* ci: independently test real connector contracts, bundle and private ledger

* ci: generate existing hospital UI modules before checking live adapter TypeScript

* test(lab): prove independent patient identity across multiple live-source orders

* test(lab): track real-product report amendments separately and prohibit automatic chart overwrite
HF-13: align early-result recovery test with the HF-8 intake cursor; add Level 2 IT plan
Some checks failed
forgegraph/ci CI passed
Live OpenMRS OpenELIS adapter contracts / adapter-contracts (pull_request) Successful in 39s
Type 3 research / research (pull_request) Failing after 48s
Scaffold conformance / test (pull_request) Successful in 2m4s
Scaffold conformance / forgegraph-report (pull_request) Successful in 3s
07dab79f39
The reconciled tree runs HF-11's recovery test against HF-8's persistent
rowid cursor. The repeat unkeyed poll no longer re-reads an imported result,
so it reports zero skipped; the single chart entry is still asserted.

Adds the Path A plan (OpenMRS EMR, hospital-fabric on celld, reference
deployments on labnuc and Cloudflare) tracked as HF-13..HF-22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HF-13: pin CI runners to Ubuntu 24.04
Some checks failed
Type 3 research / research (pull_request) Failing after 40s
Live OpenMRS OpenELIS adapter contracts / adapter-contracts (pull_request) Successful in 45s
Scaffold conformance / test (pull_request) Successful in 2m0s
forgegraph/ci CI passed
Scaffold conformance / forgegraph-report (pull_request) Successful in 4s
6ec6b81d97
ubuntu-latest now resolves to Ubuntu 26.04, where Playwright 1.56.1 cannot
install Chromium, so the console browser tests fail before running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gmackie/hospital-fabric!5
No description provided.