Skip to content

Provision the five-patient Nightingale investor-demo cohort - #118

Merged
sudoshi merged 1 commit into
mainfrom
codex/nightingale-demo-cohort
Jul 28, 2026
Merged

sudoshi merged 1 commit into
mainfrom
codex/nightingale-demo-cohort

Conversation

@sudoshi

@sudoshi sudoshi commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Outcome

Adds the governed five-patient Nightingale investor-demo cohort on top of merged #111, without restoring or duplicating any superseded foundation artifacts.

Scope

  • exact demo aliases for five isolated synthetic patient principals
  • code-owned MS-DRG/pathway manifest and patient-safe synthetic projections
  • fail-closed adoption of the existing inactive reference patient as demo1
  • PostgreSQL-only preview/apply/verify/suspend lifecycle with atomic apply, advisory lock, hidden runtime password prompt, credential rotation, and redacted output
  • exact-alias support in the canonical hummingbird/iosPatientApp and hummingbird/androidPatientApp only
  • Android tab-scroll reset discovered during physical emulator validation
  • comprehensive implementation plan and evidence ledger

Safety boundaries

  • demo provisioning is default-off and CLI-only
  • no password or secret CLI option; no plaintext credential in source or evidence
  • no migration and no production mutation in this PR
  • catalog release remains inactive and not clinically approved
  • every projection is marked DEMO - NOT FOR CLINICAL USE
  • raw catalog staff prose is not exposed
  • Salvage the Nightingale governance layer from #92, and stop identity collisions recurring #111 remains the sole owner of activation gates, privacy manifest, foundation config, documentation salvage, and identity uniqueness

Local verification on exact SHA

  • 208 Patient tests, 3,569 assertions
  • iOS: 67 unit tests, 9 UI journeys, Release build, patient boundary, transport
  • Android: debug/release unit, lint, build; 16 API 35 emulator tests; patient boundary and transport
  • app identity uniqueness: 7 iOS identifiers and 2 Android identifiers, all unique
  • Pint, Prettier, PHP syntax, Xcode project drift, source boundaries, no-tracking scan, and diff whitespace all pass

Deployment sequence after protected merge

Canonical deploy check and deploy first. Production preview remains read-only; the separately confirmed cohort apply will use the hidden runtime prompt, followed by read-after-write verification and five isolated live login checks.

@sudoshi
sudoshi force-pushed the codex/nightingale-demo-cohort branch from 17f0607 to e1efcc3 Compare July 28, 2026 01:34
@sudoshi
sudoshi merged commit 06e3d0b into main Jul 28, 2026
19 checks passed
@sudoshi
sudoshi deleted the codex/nightingale-demo-cohort branch July 28, 2026 01:55
sudoshi added a commit that referenced this pull request Jul 28, 2026
…ted) (#119)

* feat(flow4d): bounded pathway-serving machinery (build; activation gated)

The reusable machinery to serve REAL (non-overlay) governed-pathway progress in
the 4D Navigator for the Nightingale investor-demo cohort (PR #118). Build only —
no prod writes; catalog activation + assignment remain gated behind [SU] signoff.

- Flow4dPathwayAssignmentService: layers a pathway_instance + LOS-driven milestone
  statuses onto an existing #118 cohort grant (source_encounter_id + pathway:read);
  requires the catalog already activated (instantiate enforces approved+active +
  release signed-off), so it fails loudly otherwise.
- care-pathways:promote-executable-layer: the missing draft→approved milestone/stage
  promotion (scope REQUIRED, --confirm REQUIRED; never promotes the whole catalog).
  review_state is not a protected content column, so the immutability trigger allows it.
- flow4d:assign-demo-pathways: reads the cohort SSOT (NightingaleDemoCohort::MEMBERS
  demo_username→pathway_key) + its grants and assigns each patient their pathway.
- Flow4dPathwayServingTest: proves the full loop end-to-end in the isolated test DB —
  adopt → author(draft) → promote → activate → cohort grant → assign → serve real
  progress (PathwayInstanceReadService, demo=false). This IS the prod runbook, proven.

Scoped to the 5 cohort pathways (all evidence-verified). 5 tests green; Pint clean.
Note: PatientJourneyEndpointTest event-count assertion is a pre-existing LOCAL-only
failure from #111's identity changes (main CI is green) — unrelated to this branch.

* fix(test): anchor PatientJourneyEndpointTest events to now (calendar bit-rot)

The journey seeds hardcoded 2026-07-25 events, but the journey window is now-72h;
once the calendar advanced >72h past those dates the events aged out of range and
the ordered-story assertion dropped from 3 to 1. Anchors the seed to now (gaps
preserved: 210 + 525 min) so it's stable. Unrelated to the serving machinery;
unblocks feature-1 CI (and fixes the same latent failure on main).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant