Skip to content

feat(seed): the one demo seed fills every viewer surface, and the journeys run on it (#6663) - #6695

Merged
rubentalstra merged 8 commits into
mainfrom
feat/seed-every-viewer-surface
Nov 26, 2026
Merged

rubentalstra merged 8 commits into
mainfrom
feat/seed-every-viewer-surface

Conversation

@rubentalstra

Copy link
Copy Markdown
Member

FerroEHR now has one seed for its synthetic demo dataset, and it fills every page the viewer work under #6640 adds. Part of #6663. The recorder's seed (scripts/viewer-record.sh) moves onto this walker in a second PR, once #6642 lands its fix of the recorder. That PR closes the issue.

One owner

scripts/sandbox/reseed.sh and scripts/sandbox/seed/manifest.json are the one seed. Before this PR there were three seed paths:

Seed path Before Now
Hosted sandbox (nightly, sandbox-reseed.yml) the walker the walker, with the new data
Browser journeys and docs screenshots (scripts/ui-e2e.sh step 2b) a seed of its own: one template, one EHR, four compositions the walker, as ferroehr-admin, with ferroehr as the clinician; the journeys read their EHR and composition from the ids file the walker writes
The ssr_app recording (scripts/viewer-record.sh) a seed of its own unchanged here; the follow-up PR moves it, after #6642

The compose quickstart has no seed. The walker keeps its path and its SANDBOX_* environment. The nightly workflow runs the scripts of the release the box serves, so moving the file would break the reseed of every release before this one.

What the dataset now holds

Everything goes through the public API, so every write passes the same authorization and leaves the same access record a client's does:

  • Demographics: six patient PERSONs (patient template v3) with identifiers, date of birth, sex and the record subject of their EHR, under IHE the FerroPIX pseudonym. Also the healthcare provider ORGANISATION the deployment acts for (two versions), a lab organisation, two care-team GROUPs, a system client's AGENT with its commit_composition ROLE, the privacy officer's ROLE granting the seeding administrator write_access_policy, write_care_relationship and write_representation, a guardian's representation and a proxy's representation.
  • Access: the access policy in two versions. Between them the clinician reads one EHR on a justified access and one on an emergency access, each first refused refused-reason-missing and then admitted with its reason. Three care relationships, one ended in a second version. EHR access settings on two EHRs: a restriction with a consent, and an opt-out.
  • Legal marks and retention: a GDPR Art. 18 restriction of processing, a research objection, the access-delay register with one held composition, two retention periods, two anchors that put EHRs past their period (/retention/due lists them), a whole-record hold and an object hold.
  • Logs: the representative ferroehr-proxy reads the subject view of the patient's access log. The review across EHRs must name all eight. ITI-81 must answer system records. Where the server signs with an OpenPGP key, the walker seals a checkpoint and POST /admin/access-log/verify must pass.
  • Records: the clinician commits two attested versions (one signed, one pending). Five ADL 1.4 CKM archetypes, a cohort query stored and run through POST /query/cohort, the viewer's minimal_evaluation template with a two-version composition and three Simplified Flat compositions with measured values (what the journeys used to seed themselves).

It is deterministic. The bodies are files, and the dates are days relative to the run's UTC date. It is idempotent: the marker EHR ends a second run before it writes anything. The manifest's notes and the book's sandbox section say the data is synthetic and list the three logins.

Postures

The sandbox and development postures change for this dataset only. The production defaults are unchanged.

  • deploy/hosted/ferroehr.sandbox.toml: two more demo logins with the public password, ferroehr-clinician (a professional) and ferroehr-proxy (the representative, whose PERSON the seed writes). The grant ceiling adds write_access_policy, write_care_relationship, write_representation and access_service.
  • deploy/hosted/docker-compose.yml, which travels in the image: the provision step creates ferroehr-clinician through SCIM beside ferroehr, and ferroehr-hold-clinician grants it the clinical scopes.
  • docker/ferroehr.dev.toml: ferroehr-proxy, the same grant ceiling, and [privacy.cohort] subjects = true, as the sandbox has.
  • docker/viewer/e2e-env.yml: [record.signing] mode = "pgp" with docker/signing/version-signing-test.key.asc, a committed ML-DSA-65+Ed25519 key labelled TEST MATERIAL in its README, on the pattern of the SCIM test key.

The sandbox's own signing key, generated on the box, and the check of the first full reseed after the release are #6694.

Verified

Every run below started from a fresh database. They used a manifest copy that skips the ADL 2 library and the four templates of #6680 (#6684).

  • The dev posture, as the e2e lane runs it, with pgp signing on: the walker runs to the end, the signed checkpoint verifies, and a second run exits at the marker.
  • The sandbox posture (deploy/hosted/ferroehr.sandbox.toml, RBAC off, IHE pseudonyms in urn:oid:2.999.7.1, the clinician provisioned over SCIM and granted as the compose file does), with only FerroPIX, FerroTERM and the box's issuer swapped for local stand-ins: the walker runs to the end on digest signing.
  • shellcheck, compose-hardening, shipped-configs, hosted-deploy-script, neutral-identifiers, file-size: clean.

The e2e lane runs the full manifest once #6684 is merged into this branch.

…id the validator refuses (#6680)

eprescription-fhir, ereferral, international-patient-summary and
treat-registry-report carried "/.*/" on an ACTIVITY whose template
constrains action_archetype_id to a pattern, which the validator holds
since #5951. They are regenerated through scripts/generate-ckm-examples.sh
against the server of this tree; the other twelve examples stay as they
are. The validation golden records ereferral with the 12 passes every
clean example reports, in place of the 27 its pattern finding added.
@rubentalstra

Copy link
Copy Markdown
Member Author

The ui-e2e and ui-docs-shots reds came from #6680: the seed stopped at the stale ereferral example (422). This branch now merges #6684's branch, which regenerates the four examples, so the lanes run on them while #6684 waits in the merge queue.

…t own it (#6663)

The e2e_adl2 scenes upload and delete cnf_adl2_versioned 1.0.0 and 1.1.0
themselves, so a seed that stores them, and commits on 1.1.0, makes their
cleanup a 409. The seed keeps its other three ADL 2 templates.
@rubentalstra

Copy link
Copy Markdown
Member Author

The seed now runs to the end in every ui-e2e shard: pgp signing, a signed checkpoint that verifies, and 41 entries in the representative's subject view. Shards 1/3 passed. Shards 2/3 and 3/3 failed in e2e_adl2. Those scenes own cnf_adl2_versioned 1.0.0 and 1.1.0: they upload and delete the pair themselves, and the seed had stored them and committed on 1.1.0, so the scenes' cleanup got a 409. 94e3ad8 takes the pair out of the seed. The sandbox keeps its other three ADL 2 templates, and the journeys stay as they are.

@rubentalstra
rubentalstra added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit bccd160 Nov 26, 2026
73 checks passed
@rubentalstra
rubentalstra deleted the feat/seed-every-viewer-surface branch November 26, 2026 20:09
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