Kulcare Docs
DeveloperHospital surgery center

Hospital MAR U8 Journey Verification

Real HTTP and browser evidence, unit coverage, review limits and release gates.

Scope

Local U8 covers verification for the canonical MAR plan. It does not implement programme U7 Recovery or U8 signed discharge. Source checkpoint: cff2cc4849, plus the local review fixes. Continue on the existing integration branch and draft PR 2757. The production policy registry stays empty.

The comparable implementations are hospital-lab-journey.mjs, HospitalLabJourneyFixture and LabJourneyTest. Clinical owns canonical orders, administrations, versions, receipts and obligations. Identity owns effective grants and assignments. Hospital remains the facility-scoped consumer. No new permission defaults, clinical policy, authentication path or migration is planned.

Execution Record

Implementation runs inline in the current Codex context. Two sequential, read-only Hospital reviewers checked the final clinical fixes. Their configured profile is not a served-model or effort receipt. The plan's served Sol High and independent Astra identities are not claimed. No worker swarm is started. External review requires scoped approval; session files, tokens, credentials, patient records and full schema dumps are excluded.

Pre-existing .context and .compound-engineering artifacts remain excluded. Prior local checkpoints must not be pushed without publication authority.

Evidence Strategy

  • Add real request journeys for both presets, with and without an encounter.
  • Reuse existing command and security regressions instead of duplicating their full race matrix. Record the exact tests that cover each acceptance scenario.
  • Use actual users, memberships and assignments, real policies and audit writes. Use the enforced non-bypass role for isolation checks.
  • Build an opt-in fixture and backend on fresh, owned test databases only. Inject the fixed test policy and clock through test support, not app endpoints.
  • Drive the authenticated MFA with mock mode off. Check current source after reload, case handoffs, history and narrow layouts.
  • Run final CI and review on the finished source, then update the release record.

Open Release Gates

  • Run the final deployed-candidate QA guide in both presets.
  • Record deployed source revisions and actual approved policy reference/hash.
  • Obtain clinical and nursing acceptance from the named owners.
  • Keep Recovery, signed discharge, Pharmacy and full-pilot gates open.

Automated synthetic care does not approve real clinical regimens or staging use.

Local Evidence

  • Real request journeys pass: 10 tests, 157 assertions, no failures, errors or skips. Both presets cover encounter-linked and no-encounter care, exact-key replay, audit rollback, time bounds, unknown units and canonical source-only history.
  • Authenticated Chrome journeys pass six checks for each preset, with mock mode off. Each includes current history after reload, case context, view-only controls, 1440px/390px layouts and lost-response recovery with one dose POST.
  • The browser exposed a cancelled history-reader race after a confirmed write. The command hook now retries active reads once for a query cancellation. Real read failures retain recovery. No clinical command is repeated.
  • Hospital frontend: 36 files and 328 tests pass. The focused MAR UI suite has 19 passing tests, including the cancelled-reader regression.
  • Changed Ruby source passes RuboCop. Existing RuboCop configuration warnings remain. CodeRabbit completed the scoped and whole-PR reviews. The review queue records the fixes and remaining findings. The final verification below covers the production review fixes. Clinical activation and deployed-candidate acceptance remain open.

Whole-PR CI passed before later review fixes: backend 18,107 domain tests, 77,817 assertions, zero failures/errors and 10 existing skips; frontend zero lint errors, 212 existing type errors below the 254 ceiling, zero test failures and passing wire guards. These are checkpoint results, not proof of later edits. The latest inactive-obligation, dose and request regression checkpoint passes 50 tests and 577 assertions without skips, including field-error validation. The adapter, recovery and live UI suites passed 71 tests at that checkpoint. Final full CI, browser rechecks and follow-up results are recorded below.

The private local evidence directories are /private/tmp/hospital-mar-u8-sc04-evidence and /private/tmp/hospital-mar-u8-h50-05-evidence. These contain synthetic evidence, not patient records. Do not send session files or tokens to external reviewers.

Use the MAR QA guide for reproducible local commands and unchecked candidate QA steps. Source-only non-surgical encounter care is covered by canonical request tests; no new Hospital screen is claimed.

Final Review-Fix Verification

The candidate uses base 647645d15695549bf172f196f52c9c51c620d249. Verification is local, not a claim about the remote PR head. No migration, schema dump, lockfile, permission default or production policy changed in this review batch.

CheckResult
Full backend CI18,127 domain tests, 78,553 assertions, zero failures/errors, 10 existing skips
Pricing gate20 tests, 26 assertions, zero failures/errors/skips
Changed Ruby style70 files, zero offenses
Full frontend CIZero lint errors and test failures; 212 existing type errors below the 254 ceiling; wire guards pass
Hospital tests36 files, 328 tests pass
Focused MAR, RLS and RBAC388 tests, 2,838 assertions, zero failures/errors/skips
Hospital strict types and buildPass; existing bundle-size warning remains
Migration-built schema22 tests, 318 assertions, zero failures/errors/skips
SQL-loaded schema22 tests, 318 assertions, zero failures/errors/skips
Live Surgery CenterSix checks pass; mock mode off; desktop and 390px layouts
Live Hospital 50Six checks pass; mock mode off; desktop and 390px layouts
CodeRabbit follow-ups47-file fixes, four-file HTTP/docs delta and four-file final source delta; zero findings in each
Bounded Hospital reviewerTwo P2 findings fixed; repeat review found no further issue in those fixes

The first backend CI attempt failed style checks. The final run above includes their fixes. The first browser attempt failed after package builds triggered development HMR and a provider error. It is not a passing result. Both presets passed after the isolated frontend restarted, with fresh synthetic fixtures and no concurrent package build. No auth/provider workaround or suppressed page error was added.

Review decisions include original-record correction bounds, older-version obligations, pending PRN visibility, expired PRN availability, bounded workqueue projection, valid FHIR primitives and structured errors. Applied migrations stay forward-only. See the review queue for all 31 decisions and the review snapshot hashes and native worker records. The later HTTP test was reviewed in a separate four-file pass. The final source review includes the expired pending-PRN actions and availability batching fixes. Final evidence notes are outside those snapshots. No completed Compound multi-reviewer review is claimed. Its full workflow was not run; bounded native reviews do not replace it.

Final logs use /private/tmp/hospital-mar-review-20261020- with suffixes backend-ci-closed.log, frontend-ci.log, focused-closed.log, migration-path.log, sql-path.log and coderabbit-peer.log. Live evidence is in /private/tmp/hospital-mar-review-20261020-sc04-closed-evidence and /private/tmp/hospital-mar-review-20261020-h50-05-closed-evidence. All fixtures are synthetic. Session files remain private and uncommitted. The isolated live servers were stopped. The port-3006 mock demo was left running. Fumadocs builds and indexes 506 pages. Deployment, manual QA and clinical release gates remain open. No changes in this review batch were committed or pushed.

On this page