Implementation plan / Session plan / Handover RC-1-S26
Handover RC-1-S26 Integrate: End-to-end scenario across ADM, ISE, ESS¶
Card: RC-1-S26. Issue: cema-care/his#40. Branch: session/RC-1-S26. Slice: RC-1. Decision record: ADR-HIS-076.
Comes after RC-1-S04, RC-1-S09 to RC-1-S13, RC-1-S17 and RC-1-S20 to RC-1-S25. It also reads the handovers of the other sessions of the slice and of FN-S07, and follows up what they left for this session.
What was built and where¶
The slice's scenario now runs through the built units, the shell and its screens, and the platform's telemetry. One command does it:
HIS_SESSION=<session> e2e/harness/scenario run e2e/scenarios/RC-1 --fresh
- The RC-1 stack (
e2e/scenarios/RC-1/stack.json): - units:
ess-reference,ess-runtime-decisionwith its OPA sidecar,ess-audit,ess-coordination,event-backbone(platform/event-backbone),adm-identityandadm-patient-administration; - the decision service is the decision point of every unit (
"policy": "unit:ess-runtime-decision"), on the unapproved starter policy; - the OpenTelemetry collector of
platform/observabilityreads the units' logs into the telemetry container; - the shell, with UI-ADM-001 and UI-ADM-002;
- the contract stubs of ADM, ESS and ISE, for the contract walk.
- The provisioning (
e2e/scenarios/RC-1/provision/, ADR-HIS-076 point 2): - the unit service identities' Keycloak clients, with secrets made per run;
- the installation bootstrap of the first administrators and the platform's service identities in MOD-ESS-001;
- TOTP second factors;
- two clerks and a steward who join through the identity-source feed (WF-ESS-001) and whom the identity administrator activates (D10-ESS 4.3);
- the synthetic terminology content (
terminology.json). - The scenario (
rc-1.scenario.ts,rc-1-nfr.scenario.ts,builders.ts,README.md): - RC-1-E2E-001 to 004 now run through the units;
- RC-1-E2E-006 and 007 go through the screens;
- RC-1-E2E-008 holds the interface checks;
- RC-1-E2E-010 to 013 are the non-functional checks;
- RC-1-E2E-005, the contract walk, is unchanged.
- The harness (
e2e/harness, README "Units with settings, platform units, sidecars and containers" and "Provisioning"), backward compatible: - object units with
properties,env,sidecarsandjvm, and platform units; - top-level
containers; ${unit|sidecar|env|secret|logs|repo}references, with every port allocated before anything starts;policy: unit:<name>, and theprovisionhook;- the
faultsfixture (stop, kill, start, produce); tokens.signIn(the staff code flow with PKCE, password and TOTP) andtokens.serviceIdentity;shell.session, andshell.gateway(the gateway's routing and the user's token for the screens);--fresh;- the evidence record keeps a unit's name and folder, never its settings;
- 2 more runner self-tests.
- its containers run as the invoking user, with pnpm through
npxand the pnpm store inside the container. Before, they ran as root and left a root-owned.pnpm-storeandnode_modulesin the checkout, which made the next job on a self-hosted runner fail at checkout (review round 1). - The development realm (
platform/dev-environment/config/keycloak/his-realm.json), the realm needs of ADR-HIS-061: - the staff browser flow with assurance levels (
acraal1andaal2) and theamrclaim; - LOGIN and LOGIN_ERROR events, a 12-hour session, and no required e-mail;
- the administration client of MOD-ESS-001 (
ess-runtime-decision-idp, a development secret, ashis-test's). The password grant ofhis-testand the usersdev.*are unchanged. - The shell (
web/shell/src/main.tsx): a development-only session hook (__HIS_DEV_SESSION__), removed from the production bundle. It stands in for sign-on, which the shell is not wired to yet. - ADR-HIS-076 and its row in the decision record index (85 records after the merges with
main), identical to whatbuild_adrs.pywrites (checked on a copy). 073 and 075 are RC-2-S02's and RC-2-S04's, both merged.
Defects fixed between the units¶
Each was found by running the slice through the built units. The fix is in the folder named; nothing else in those folders changed.
| # | What broke | Fixed in |
|---|---|---|
| D1 | No kit sent a token to the decision service, which answers only registered service identities (FR-ESS-AUZ-001 part 13). Every decision failed closed | The kit of every unit and the template: policy/PolicyCredentials, his.policy.client-id, client-secret, token-url |
| D2 | The kit could not read the decision service's answer (decidedAt, a field it did not know) |
The kits: the answer ignores unknown fields |
| D3 | The first decision after start failed: the JDK client's h2c upgrade on a POST | The kits: HTTP/1.1 |
| D4 | A decision on a connection the service had closed failed | The kits: asked once more on a connection error, never on a timeout |
| D5 | The kits did not send the subject's assurance and session, so privileged roles (auditor, analyst) never counted (RC-1-S17's follow-up) | The kits: subjectAssurance and subjectSession, taken over from ess-runtime-decision's kit |
| D6 | adm-patient-administration called adm-identity as itself, so creating a patient was decided for a service, with no rule |
adm-patient-administration: Downstream.onBehalfOfPerson passes the clerk's token on. The unit's own listing of review items goes as the unit (headersAsService), under the rule adm-registration-review-items and the scope adm.identitymatch:read |
| D7 | readRegistration and completeRegistration sent no owningFacility, which the policy requires, so every read was refused. readEncounter sent resourceFacility |
adm-patient-administration (Registrations, Encounters) |
| D8 | The starter policy had no rule for the event backbone's operations API, nor for listing or completing registrations or listing encounters | ess-runtime-decision enterprise-access.v1.json: ise-event-operations-read, ise-event-operations-act (D02-ISE 9.2 Integration Operations Analyst), adm-registration-completion, query on adm-registration-encounter |
| D9 | ADM codes urn:his:ess:administrative-sex, kemendagri-area, relationship and identifier-type as a coding's system, but D10 had them as value sets. UI-ADM-001 expands kemendagri-area, an identifier the seed did not use. HL7 v3-ActCode was not registered |
ess-reference registry seed: code systems at those URLs, value sets at urn:his:ess:vs:<name> under the screen's identifiers, and v3-ActCode |
| D10 | The master-data seed had no service, so no encounter could be opened | ess-reference master-data seed: the general outpatient service of the ADM contract's examples |
| D11 | The stewardship queue named the role identity-steward, which the role catalogue calls patient-identity-steward. A list of one queue was decided without the queue's roles |
ess-coordination: the seed's role and TaskService.list |
| D12 | The backbone's register lacked the consumers the units make (unregistered-consumer alerts) and RC-2's contract topics |
platform/event-backbone topic-register.yaml |
| D13 | adm.person.search was registered patient-scoped, so every search that found no one was quarantined (RC-1-S08's follow-up) |
ess-audit migration V4: ADM's registration against the default with its reason (GAP-ESS-016 point 2); test updated |
| D14 | The emitters of ess-runtime-decision and of the template family sent nulls, so the decision service's own audit (every Deny) was quarantined |
ess-runtime-decision, ess-coordination, ess-governance and _template kits: absent fields left out |
| D15 | The audit integrity verification reported a digest mismatch for every event whose time had nanoseconds (the column keeps microseconds) | ess-audit IntegrityVerifications, with IntegrityPrecisionTest |
| D16 | The development realm gave no amr or aal2, had no administration client for MOD-ESS-001, and required an e-mail MOD-ESS-001 does not send |
platform/dev-environment realm |
Checks and their result¶
The environment ran as HIS_SESSION=RC-1-S26 (his-rc-1-s26), on the full profile, and was reset before the final run, so the realm came from the realm file alone.
| Check | Command | Result |
|---|---|---|
| The scenario, end to end | HIS_SESSION=RC-1-S26 e2e/harness/scenario run e2e/scenarios/RC-1 --fresh --strict, on an environment reset just before, so the realm came from its file |
Final run 20261127T052303Z-4362, on commit 6a829ab (review round 6; later commits change only this handover), started with the host's load average below 3. 11 of 12 cases pass, in 6.9 minutes after start-up. RC-1-E2E-002 fails only on its soft check of the known gap (GAP-ADM-012, issue #40), with its defect reference; its other steps pass. Provisioning warmed the decision service and the units first, and each of RC-1-E2E-010 to 013 ends with the stack ready again, after 1.7 to 4.3 s. scenario evidence check --strict gives "record complete (12 test cases, approval pending)". The record stays in the run folder, which git ignores; the gate session runs it again for its own record |
| Build and every test of each changed unit | ./gradlew build in services/ess-audit, ess-coordination, ess-reference, ess-runtime-decision, adm-identity, adm-patient-administration, ess-governance, _template and platform/event-backbone |
All pass, the eight kits changed in review round 5 again on commit 0b6036f. The ADM contract tests were run from a git archive of the branch, because this host's contracts/common/node_modules (from the harness's image) makes pnpm stop without a TTY in their container. A fresh checkout, as in the pipeline, has none |
| Harness self-tests | e2e/harness/scenario selftest, and its Python tests |
13 TypeScript tests and 12 Python tests pass, including 2 new ones for the runner |
| Shell | pnpm build and pnpm test in web/shell (Node.js 22.18, corepack enable) |
Both pass: 19 tests, shared versions and screen discovery |
| Decision record index | build_adrs.py on a copy |
Identical |
| Documentation links | python3 docs/implementation_plan/tools/check_links.py |
0 broken links, 0 duplicate anchors |
| Pipeline scans | platform/delivery-pipeline/bin/secret-scan code origin/main HEAD and docs; static-analysis on every changed folder |
No secret, in the files or the commits. No blocking finding in any folder. No dependency was added or changed, so the dependency and image scans have nothing new |
Requirements and test scenarios¶
An integrate session covers the slice's scenario, its failure branches, the interface checks and the non-functional checks. Each case names what it covers in covers (session rule 5). The evidence record lists each one with its outcome.
| Case | Covers | Outcome |
|---|---|---|
| RC-1-E2E-001 | Steps 1 to 5 and 7: WF-ADM-001, FR-ESS-IAM-001, IAM-002, IAM-003 AC-04 (both identities in the audit of a relayed call), AUZ-001, AUD-001, AUD-002; FR-ADM-MPI-001, REG-001 to 003, XRF-001, ENC-001; FR-ISE-EVT-001, EVT-002, OBS-001; TEST-ADM-006, 010, 012 | passed |
| RC-1-E2E-002 | Step 6: FR-ADM-MPI-002, MPI-003, REG-003, FR-ESS-WFL-002; TEST-ADM-002, 003, 008 | failed on its soft check of GAP-ADM-012 (issue #40); every other step passed, the stewardship task included |
| RC-1-E2E-003 | FR-ADM-MPI-001, XRF-001; TEST-ADM-001, 010; architecture 7.5 | passed |
| RC-1-E2E-004 | Failure branches: FR-ADM-MPI-001, FR-ESS-AUZ-001, IF-ISE-001; decision engine and decision service outages | passed |
| RC-1-E2E-005 | The contract walk through the stubs | passed |
| RC-1-E2E-006 | UI-ADM-001 through the shell against the units | passed |
| RC-1-E2E-007 | UI-ADM-002's work list against the D10 task service | passed |
| RC-1-E2E-008 | The interface checks: acknowledgement, reconciliation, error handling (a dead letter, listed and closed), replay (applied once), monitoring (consumer lag in Prometheus); TEST-ISE-020 | passed |
| RC-1-E2E-010 to 013 | The non-functional checks below | passed; results below |
Ends when. - "The scenario passes from first step to last, through the screens and the built services, with no manual repair": met for every step but one. The one failing check is the known adm-identity gap of issue #40 (decided 25 Nov 2026): after "unsure" on a pair that is not high-risk, the new person is provisional, where GAP-ADM-012 says active. As that comment asks, it is recorded here. The gate evidence session RC-1-S28 files it as a fix for RC-1-S08, and it does not block this session. - "The scenarios of the slices this one comes after still pass": RC-1 comes after no slice. - "Each non-functional check has run, and its result is recorded against its target": the table below. Each shortfall carries its measurement and goes to the gate.
Non-functional checks¶
Run in the integration environment through the built units (rc-1-nfr.scenario.ts; each test's nfr-*.json in the evidence record). The table is the final run 20261127T052303Z-4362, on commit 6a829ab (review round 6, after the merges with main up to RC-3-S02), written from its nfr-results-*.json. It started with the load average at 2.3, which rose to about 9 while other sessions worked on the host.
- The workload is D01-ADM 10.1's peak, tested at twice: patient search at 20 a second, registrations at more than twice the peak hour.
- The environment is one host with 4 CPUs, shared with other sessions' environments, and the load generator runs on it too.
- There is one instance of each unit, one Kafka broker, and an MPI of a few hundred synthetic persons, not 2,000,000.
- The calls go to the units directly; the gateway is not in this stack.
| Target | Target value | Measured | Outcome |
|---|---|---|---|
| NFR-ADM-001 (search) | p95 < 2 s, p99 < 5 s at twice the peak | p95 746 ms, p99 1228 ms at 19.95/s, 339/600 ok ({"200":339,"503":261}) | shortfall. The refused searches are 503: decisions slower than the 250 ms decision timeout (CFG-ISE-031) fail closed, as they must; never a grant |
| NFR-ADM-001 (search, at peak) | p95 < 2 s, p99 < 5 s (measured at the peak itself, for comparison) | p95 221 ms, p99 1105 ms at 9.73/s, 292/300 ok ({"200":292,"503":8}) | shortfall |
| NFR-ADM-001 (registration save) | p95 < 2 s, p99 < 5 s | p95 1690 ms, p99 2915 ms | met |
| NFR-ADM-001 (encounter creation) | p95 < 2 s, p99 < 5 s | p95 1077 ms, p99 1279 ms | met |
| NFR-ISE-001 | p95 < 2 s, p99 < 5 s for interactive transactions | search p95 746 ms; registration p95 1690 ms; encounter p95 1077 ms (at the units; no gateway in this stack) | met. The gateway's own share is RC-1-S12's test bed; this stack calls the units directly |
| NFR-ESS-001 | p95 ≤ 50 ms, p99 ≤ 200 ms for single decisions | p95 90 ms, p99 233 ms at 49.98/s, 999/1000 ok ({"200":999,"503":1}; client-observed, over loopback) | shortfall |
| NFR-ESS-005 | agreed decisions per second from the capacity model (no value given) | 49.98 decisions a second sustained, 999/1000 answered | not measurable here. No target value exists until the capacity model (NFR-017) |
| NFR-ESS-002 | p95 ≤ 100 ms for code validation, registry resolution and configuration read | validateCode p95 125 ms, p99 366 ms, 392/400 ok ({"200":392,"503":8}) | shortfall |
| NFR-ADM-002 | p95 < 5 s end to end within the enterprise network | p95 411 ms over 10 encounters (answer to the backbone's archive, polled every 100 ms) | met |
| NFR-ISE-002 | p95 < 5 s end to end within the enterprise network | p95 411 ms over 10 encounters (answer to the backbone's archive, polled every 100 ms) | met |
| NFR-ESS-003 | p95 < 5 s end to end within the enterprise network | p95 411 ms over 10 encounters (answer to the backbone's archive, polled every 100 ms) | met. The decision cache's 60 s bound is the decision service's setting (cacheLifetimeSeconds 60, checked in its answers) |
| NFR-ADM-004 | the workload profile with 2x headroom; horizontal scaling of stateless services | one instance of each unit served search at 19.95/s and registrations at 0.5/s; MPI of a few hundred persons | shortfall. Horizontal scaling, 4 facilities and an MPI of 2,000,000 are not exercised in this environment; the capacity test belongs with the deployment topology's environment |
| NFR-ISE-004 | the workload profile with 2x headroom; horizontal scaling of stateless services | one instance of each unit served search at 19.95/s and registrations at 0.5/s; MPI of a few hundred persons | shortfall. Horizontal scaling, 4 facilities and an MPI of 2,000,000 are not exercised in this environment; the capacity test belongs with the deployment topology's environment |
| NFR-ISE-015 | capacity model published from measured workloads | the figures of this test are its first measured input | shortfall. No capacity model is published yet |
| NFR-ESS-008 | zero loss of acknowledged transactions; audit coverage of sensitive-data access | 8 registrations and encounters during an audit-service crash: all acknowledged, all audited after recovery, no duplicates; 408 audit events in quarantine since the stack started (adm-identity 271, adm-patient-administration 56, ess-reference 36, ise-event-backbone 28, ess-runtime-decision 17) | shortfall. Nothing acknowledged is lost, but a quarantined event is not in the trail until it is re-emitted or accepted, so coverage is incomplete (handover, follow-ups) |
| NFR-ADM-006 | zero lost acknowledged transactions; no duplicate business effect | audit-service crash: 8/8 kept; broker outage: 5 of 5 acknowledged, all published after recovery; a repeated request with its key created nothing | met |
| NFR-ISE-006 | zero lost acknowledged transactions; no duplicate business effect | audit-service crash: 8/8 kept; broker outage: 5 of 5 acknowledged, all published after recovery; a repeated request with its key created nothing | met |
| NFR-ADM-011 | emergency registration and encounter continue with non-critical services down; 100% of downtime entries reconciled | with ess-coordination, ess-audit and event-backbone down: registration 201, encounter 201 | shortfall. The continuity part is met; downtime back-entry and its reconciliation (FR-ADM-FLW-003) come in a later slice, so the 100% reconciliation target is not measurable yet |
| NFR-ISE-017 | 100% of offline actions reconciled or exceptioned | no offline client exists in release 1 (DEC-ISE-006: offline recording disabled until governance approves it) | not measurable here |
| NFR-ESS-018 | 100% of offline actions reconciled or exceptioned | no offline client exists in release 1 (DEC-ISE-006: offline recording disabled until governance approves it) | not measurable here |
| NFR-ADM-010 | Tier 1 RTO ≤ 1 hour, RPO ≤ 5 minutes | process crash: back in 11 s with no committed registration lost (RPO 0 for a process failure) | shortfall. Restore from backup and the loss of a failure domain are MOD-ISE-009's exercise (backup and recovery, a later slice); only the process crash is measured here |
| NFR-ISE-010 | Tier 1 RTO ≤ 1 hour, RPO ≤ 5 minutes | process crash: back in 11 s with no committed registration lost (RPO 0 for a process failure) | shortfall. Restore from backup and the loss of a failure domain are MOD-ISE-009's exercise (backup and recovery, a later slice); only the process crash is measured here |
| NFR-ESS-012 | Tier 1 RTO ≤ 1 hour, RPO ≤ 5 minutes | process crash: back in 11 s with no committed registration lost (RPO 0 for a process failure) | shortfall. Restore from backup and the loss of a failure domain are MOD-ISE-009's exercise (backup and recovery, a later slice); only the process crash is measured here |
| NFR-ISE-013 | restore tests pass at the configured interval; restore evidence includes audit integrity verification | audit integrity verification after the failure tests: passed | shortfall. No backup was restored: MOD-ISE-009 is a later slice |
| NFR-ESS-014 | restore tests pass at the configured interval; restore evidence includes audit integrity verification | audit integrity verification after the failure tests: passed | shortfall. No backup was restored: MOD-ISE-009 is a later slice |
What the table shows: - Performance. At the planned peak (10 a second), search answers in 221 ms (p95), with 8 of 300 refused. At twice the peak, p95 is 746 ms and 261 of 600 (44%) are refused with 503: their decisions took longer than the kit's 250 ms decision budget (CFG-ISE-031). A refusal is what an outage must give (never a grant), but it misses the target. Single decisions (p95 90 ms, 1 of 1000 refused) and code validation (p95 125 ms, 8 of 400 refused) miss theirs too in this run. The figures move with the host's load. Over the last five full runs, search at twice the peak refused 23, 14, 53, 78 and 261 of 600, single decisions took p95 31, 211, 29, 30 and 90 ms, and code validation p95 38, 47, 226, 83 and 125 ms. Each request asks for a fresh decision, because the kits do not cache the 60-second Permit (follow-ups). - Event latency. EncounterOpened is on the backbone within 411 ms (p95) of the encounter's answer. - Reliability. - During an audit-service crash, 8 of 8 registrations were acknowledged and all were audited after recovery. - During a broker outage, 5 of 5 were acknowledged and their events published after recovery. - A repeat with its idempotency key changed nothing. - So no acknowledged transaction was lost or doubled. - Recoverability. A killed Tier 1 unit was back in 11 s with its committed registrations. The audit trail verified after all the failures, once the integrity check's time-precision defect (D15) was fixed. - Not measurable here: restore, horizontal scaling, four facilities, a 2,000,000-person MPI, the capacity model, downtime back-entry and offline operation. Each is recorded with what was measured instead. The run before the last, on the same host while the build ran, measured search p95 7 s with 487 of 600 refused. The host's load changes these figures a great deal, which is why the gate needs a dedicated environment for them.
Review round 1¶
The review asked for the failing checks to be fixed.
- Most jobs (platform/event-backbone, services/*, web/shell, web/domains/cli) failed at checkout. The self-hosted runner could not clean its workspace: an earlier job of this change, the harness self-test, had left a root-owned .pnpm-store there. The harness's containers now run as the invoking user (above). Checked by running the self-test as uid 1000 on a fresh export of the branch: it passes, and leaves no root-owned file and no store in the checkout. The worked sample (scenario run e2e/harness/sample) still passes with a complete record.
- e2e/harness failed in the image scan with a network error while reading a layer of the Playwright image (stream error … CANCEL). Nothing in the change causes it, and it runs again with this push.
Review round 2¶
Once a person had cleaned the runner's workspace, the checks ran again. Everything passed except two jobs:
- The dependency and image scan of services/_template found three HIGH vulnerabilities in the template's lockfiles, which are stale on main. lz4-java 1.11.2 has CVE-2026-106451, and snappy-java 1.1.10.7 has CVE-2026-108106 and CVE-2026-93451. kafka-clients 4.2.2 pulls in both. The scan runs because this change touches the template. services/_template/service-kit/build.gradle.kts now has the same constraints the units carry (lz4-java 1.11.4, snappy-java 1.1.10.9), and the lockfiles were rewritten with ./gradlew dependencies --write-locks. Units made from the template from now on start with the fixed versions. Results: ./gradlew build passes, and platform/delivery-pipeline/bin/dependency-scan services/_template finds 0 blocking (4 medium).
- The image scan of e2e/harness failed again on the network error of round 1. It runs again with this push.
Review round 3¶
After main was merged in, every check passed except one: the image scan of e2e/harness, which failed for the third time. The cause is the same each time. Trivy cannot finish downloading one layer of the Playwright image (sha256:d8597d6a…) from mcr: after about 8 minutes the registry ends the stream (stream error … CANCEL). The scanner runs without the Docker socket, so it downloads the whole 3.6 GB image from the registry on every run. On a host whose Trivy cache already holds the layers, platform/delivery-pipeline/bin/environment-images harness passes in seconds (10 critical or high findings, which are reported, not blocking, as the script intends). Nothing in this change affects that job. The fix belongs to the delivery pipeline (follow-ups), and the job runs again with this push.
Review round 4¶
The review asked for three changes:
- FR-ESS-IAM-003 AC-04 (Must) was left unmet by the token relay. It is now repaired without token exchange.
- adm-patient-administration's Downstream sends its own service token in X-Acting-Service-Token beside the person's.
- The kit of adm-identity (and of adm-patient-administration and the template) validates that token with the unit's JWT decoder and requires it to be a service identity's. A bad one is refused with 401. The audit emitter then sends actorHuman (the person) and actorService (the service), as the intake schema defines the pair.
- The decision stays the person's.
- No contract and no realm changes. ADR-HIS-076 point 4 is updated.
- Tests:
- ActingServiceTest in the three kits: both identities, a forged token, a person's token offered as the service, the header ignored on a service's own call, and the audit event with and without an acting service;
- DownstreamActingServiceTest in adm-patient-administration: what is sent;
- RC-1-E2E-001's new step, which checks that every adm-identity event of the registration made for the clerk names the clerk and adm-patient-administration's service identity.
- NFR-ESS-008 was recorded as met despite the quarantine. It is now a shortfall with the measurement (above). RC-1-E2E-011 counts the quarantine through GET /v1/quarantined-audit-events as the audit administrator and records the row from it.
- The record count in "What was built and where" is 85, after the merges with main.
Checks of this round:
- Builds: ./gradlew build passes for adm-identity and adm-patient-administration (run from a clean export of the commit, so that the contract tests install their own tools) and for _template.
- Full run 20261126T180944Z-5edc (--fresh): the NFR cases E2E-010 to 013 passed, and NFR-ESS-008 is recorded as above. E2E-001 and 003, the first cases after the failure injections, failed in their first seconds: the decision service gave adm-identity an answer it could not read, then timed out. The previous final run had the same kind of errors (5 unreadable answers, 105 timeouts) without failing a case. This is a follow-up for the decision service's recovery after failure injection.
- Functional run 20261126T182325Z-94ea (--fresh --grep "RC-1-E2E-00"): every case passes except E2E-002's known soft check (GAP-ADM-012). That includes E2E-001's new AC-04 step: every adm-identity event of the registration made for the clerk names the clerk and adm-patient-administration's service identity.
Issue #40's comment, which the review could not read, is from a person on 25 Nov 2026. It says the adm-identity gaps are recorded in this handover, filed by the gate for RC-1-S08, and do not block this session.
Review round 5¶
The review asked for a reliably passing full run, the cause of the unreadable decision answers, and a report of the full run on the final commit.
- Why the answers were unreadable.
- The kit's decision client gives a decision 250 ms (CFG-ISE-031). When an answer's headers arrive in time but its body does not, Spring's JDK request factory cuts the body off, and the client reported it as an unreadable answer. A late answer whose headers miss the budget reported as a timeout instead.
- LateDecisionTest reproduces it: a server sends the headers, then the body after 600 ms. Before the change, the client logged "Error while extracting response… closed", the message run 20261126T180944Z-5edc logged.
- So the "unreadable" answers of that run were slow decisions. They came right after RC-1-E2E-013 had killed and restarted adm-patient-administration. That unit started at 18:20:57, and the failures came between 18:21:01 and 18:21:11. The decision service logged no error; it only answered late.
- The host has 4 CPUs for seven JVMs, Kafka, Keycloak, PostgreSQL and OPA, so a JVM starting up slows the others for some seconds.
- The fix in the kits. In the eight kit copies of this card, the decision client counts any failure that ends after its budget as a timeout. It logs it so, and does not ask again. It still denies, as before.
- The fix in the scenario.
- Each of RC-1-E2E-010 to 013 now ends with stackReady, which waits until the stack answers normally again. It runs search, duplicate check, registration (through adm-identity) and encounter until three pass in a row, records each probe in the evidence, and fails the case if the stack does not recover within 120 s.
- In the final run the stack was ready again 2.1 to 2.4 s after each case.
- Two more causes of a flaky full run, fixed while reproducing it.
- Near-duplicates from the NFR cases. Every synthetic person was 34 years old. So among the NFR cases' registrations there could be a near-duplicate of RC-1-E2E-001's new patient, whose search must find no one, and run 20261126T211128Z-6b99 hit one. The NFR cases' persons are now 70 (NFR_AGE).
- Provisioning on a cold stack. In one run, provisioning failed on a 503 from the decision service while its registry lookup was still warming up. Provisioning now asks again on a 503, as Retry-After says, for about a minute. A 503 changed nothing, because the units fail closed.
- The final run on the final code is run 20261126T213430Z-4741, with --fresh --strict on commit 0b6036f.
- 11 of 12 cases pass. RC-1-E2E-002 fails only on the known soft check (GAP-ADM-012).
- The strict evidence check is clean.
- The checks table and the non-functional table above are this run's. NFR-ESS-001 and 002 met their targets in it, where the run before missed them on the same host. NFR-ESS-008 counted 97 quarantined events.
Merge with RC-2-S04¶
After review round 5, main brought RC-2-S04 (#156), which changed patient administration:
- The decision record index: ADR-HIS-076 keeps its number, after RC-2-S04's 075. The index has 79 records, identical to what build_adrs.py writes (checked on a copy).
- Consent at registration. A planned registration now completes only once the general consent is recorded through the D10 consent service. The first full run after the merge (20261126T230112Z-21e1) failed 9 cases on "Required consent has not been recorded." The RC-1 stack now leaves the requirement empty (differences, below).
- A cold stack. The functional cases, run alone, then failed their first request now and again: the units' first decisions took 300 to 900 ms against the 250 ms budget, while the decision service had decided in about 150 ms. The rest was the calling units' cold decision clients and code paths. Provisioning now warms both before the first case:
- decisions asked of the decision service until ten in a row answer within 100 ms;
- then reads through adm-identity and adm-patient-administration as the clerk, until ten rounds answer within 150 ms each.
The clerk's sign-on is handed to the tests, so no one-time code is sent twice.
- Checks:
- ./gradlew build of adm-patient-administration passes after the merge, from a clean export;
- the functional cases pass on a fresh stack, except the known soft check;
- the final run 20261126T234736Z-3eaa, with --fresh --strict on 859d44a, passes 11 of 12, and its record is complete. The checks and non-functional tables above are this run's.
Merge with RC-2-S02¶
main then brought RC-2-S02 (#153), the consent directives of ess-runtime-decision:
- The decision record index: ADR-HIS-076 keeps its number, between RC-2-S02's 073 and RC-2-S04's 075 and the later 077 to 080. The index has 80 records, identical to what build_adrs.py writes (checked on a copy).
- enterprise-access.v1.json: both sides added resource types: this card the ise.* types, RC-2-S02 ess.ConsentDirective. The merge keeps both. The 100 rules have no duplicate identifier.
- Consent: ess-runtime-decision now serves the consent directives. The RC-1 stack still leaves the consent requirement empty: UI-ADM-001 registers in one step, and the incomplete-then-complete flow is RC-2-S10's (follow-ups).
- Checks:
- ./gradlew build of ess-runtime-decision passes from a clean export of the merge. In the first build, one test of the policy pack (TP-08) got a 503 from a decision engine that did not answer in time; it passed when the module ran again;
- the final run 20261127T012623Z-70d6, with --fresh --strict on b76fb41, passes 11 of 12, and its record is complete. The checks and non-functional tables above are this run's.
Merge with RC-3-S01 and RC-2-S06¶
main then brought the D10 contracts of slice RC-3 (RC-3-S01, #164) and the second part of scheduling and flow (RC-2-S06, #163). Neither changes a file of this card except the decision record index.
- The decision record index: ADR-HIS-076 keeps its number; the new records are 081 and 082. The index has 82 records, identical to what build_adrs.py writes (checked on a copy).
- ess-audit and adm-patient-administration build and pass their contract tests against the extended audit.v1 (from a clean export).
- Two runs on a busy host, and two flaky checks they showed.
- Run 20261127T023823Z-3283 failed 7 cases. The host's load average was 22 on 4 CPUs, from the CI runners and another session's environment. OPA timed out 107 times, so decisions failed closed.
- Run 20261127T025859Z-a28a, started when the load had fallen below 6 (it rose to about 10 during the run), failed two checks that depend on chance:
- RC-1-E2E-010's propagation step required every one of its ten encounters to be answered 201. Under load, one was refused with 503 and Retry-After, as it must be. The step now asks again with the same idempotency keys, as a client does, and counts the refusals in its measurement.
- RC-1-E2E-002's near-duplicate was high-confidence, not review. The builder transposes the birth date's day and month, which it can only do when the day is 12 or less and differs from the month; otherwise the pair has the same birth date. The case now draws its first person until the date can be transposed.
- Checks: the final run 20261127T031611Z-ff55, with --fresh --strict on d5eb7e1, started with the load average below 4, passes 11 of 12 (the known soft check), and its record is complete. The checks and non-functional tables above are this run's.
Review round 6¶
The pipeline's platform/event-backbone job failed in RegisterTest. main had brought RC-3-S02's ADM contracts (#165), whose topic his.adm.bed.v1 (BedStateChanged, BedReserved) was not in the backbone's topic register, and the test requires every contract topic there. This branch changes the backbone, so the job ran. The branch is merged with main again, and:
- The topic register gains his.adm.bed.v1: producer adm-patient-administration (MOD-ADM-006, bed management), Sensitive, Tier 2 (NFR-ADM-003, DEC-ADM-014). It is registered like RC-2's topics, for the owning session to confirm (follow-ups).
- The decision record index: git kept "82 records" although main added ADR-HIS-083. It is set to 83, identical to what build_adrs.py writes (checked on a copy). ADR-HIS-076 keeps its number.
- Two more runs on a busy host. Other sessions' environments and agents were running beside this one, and the load average rose to 9 to 11 during each run.
- Run 20261127T043853Z-fee6: RC-1-E2E-006's registration through the screen was refused. Its decisions took 253 to 261 ms against the 250 ms budget. The screen said that nothing was saved and kept the draft, as it must.
- Run 20261127T045956Z-72ba: RC-1-E2E-011 got two such refusals among the eight registrations made while the audit service was down.
- What the failure-injection cases measure is whether an acknowledged transaction is lost or doubled. A request refused with 503 and Retry-After was never acknowledged. So E2E-011, 012 and 013 now ask again on a 503, as the propagation step does (askingAgain), with the same idempotency keys, so nothing is made twice. They record how many requests were refused.
- The E2E-010 load measurements do not ask again, so the refusals stay in their figures.
- The functional cases do not ask again either: a refusal there is a failed case, as in run fee6.
- Checks:
- ./gradlew build of platform/event-backbone, adm-identity and adm-patient-administration passes from a clean export;
- the final run 20261127T052303Z-4362, with --fresh --strict on 6a829ab, passes 11 of 12 (the known soft check), with no request refused and asked again, and its record is complete. The checks and non-functional tables above are this run's.
Merge with RC-3-S03 and RC-6-S01¶
After review round 6, main brought the ISE contracts of slice RC-3 (RC-3-S03, #167) and the ESS contracts of slice RC-6 (RC-6-S01, #166).
- The decision record index: ADR-HIS-076 keeps its number. The index has 85 records, identical to what build_adrs.py writes (checked on a copy).
- The topic register gains RC-3's seven ISE topics, which the register test requires (as his.adm.bed.v1 in round 6):
- his.ise.interface.v1 (integration engine, MOD-ISE-003);
- his.ise.contract.v1 (gateways, MOD-ISE-002);
- his.ise.vulnerabilityfinding.v1 (supply chain, MOD-ISE-010; Confidential);
- his.ise.backupset.v1, recoverytest.v1, failover.v1 and downtimewindow.v1 (backup and recovery, MOD-ISE-009; failover and downtime Tier 1).
The owning sessions confirm (follow-ups). The ESS contracts of RC-6 add no topic missing from the register.
- Checks:
- ./gradlew build passes in platform/event-backbone, ess-audit, ess-coordination, ess-governance, ess-reference and ess-runtime-decision, from a clean export of the merge (aea5001), against the new ESS and ISE contracts. These are the folders of this card whose contract tests read them.
- The scenario was not run again. Besides the contracts, this merge changes only the register's entries for topics the RC-1 slice neither publishes nor reads. The final run stays 20261127T052303Z-4362 on 6a829ab.
Differences from the card, specification or contract¶
- The RC-1 stack requires no consent for a registration's completion (
his.adm.consent.required-for-completionempty instack.json, after the merge of RC-2-S04). - Since RC-2-S04, a planned registration completes only once the general consent is recorded (FR-ADM-REF-002, DEC-ADM-013), through the D10 consent service.
- The RC-1 slice has no consent service, and its requirements and screens (UI-ADM-001) register in one step.
- RC-2-S04's handover names this setting as one of the two ways for the RC-1 scenarios. The other way, register incomplete, record the consent, then complete, needs the consent service and a change to UI-ADM-001, both outside this card.
-
The specification and the unit are unchanged; only this test stack is configured. RC-2-S10 integrates the consent flow (follow-ups).
-
The installation bootstrap writes MOD-ESS-001's tables directly for the first administrators and the platform's service identities (ADR-HIS-076 point 2). Nobody can approve the first approver through the governed path. Everything after it goes through the APIs: the joiners, their activation, the decisions, the audit.
- The terminology content is installed as approved versions, as a release load. The registrations' owners in the
ess-referenceseed (user-dev.mdm-owner.registration,user-dev.terminology-owner) are not account IDs. The policy lets only the named owner approve, so no account can publish through the authoring operations. That is a follow-up foress-reference. - A person's call through two units carries the person's own token (relay), not an exchanged one (ADR-HIS-076 point 4). The calling unit's own service token goes beside it in
X-Acting-Service-Token, so the second unit's audit names both the person and the calling service (FR-ESS-IAM-003 AC-04; review round 4). - The screens run with two stand-ins. The shell's development session hook gives the working facility and user, and the test adds the user's token where the gateway would. This is because the shell is not wired to sign-on (UI-ESS-001) or a service client yet (FN-S06 follow-up).
- RC-1-E2E-001 to 004 were adapted to the built units, with the behaviour they assert unchanged:
- the facilities are the register's RSU-01 and RSU-02;
- the users sign on with a second factor;
- "the decision point was asked" is read from the stored decision behind the search's audit event;
- the "facility not permitted" branch is a clerk at a facility where they hold no role;
- the policy denial is a user with no permitting rule;
- the outage is the decision engine stopped, and the decision service killed;
- step 5 expects
owningDomainADM, as the contract spells it; - the telemetry step finds each transaction in Tempo's traces, and in Loki's records where it logged, with the query the observability README gives.
- RC-1-E2E-002's near-duplicate registers at the emergency desk, saved incomplete without a NIK. A planned registration refuses a missing NIK (FR-ADM-REG-001 AC-02), and a NIK that differs moves the pair out of the review band.
- RC-2's topics were registered in the backbone, with producers from CLAUDE.md's unit table and a classification and tier from the specifications (
his.adm.appointment.v1,waitlistentry.v1,encounterflow.v1,his.ess.consentdirective.v1,notification.v1,his.fin.coverage.v1). Changing the backbone runs its register test, which failed onmainfor them. The owning sessions confirm them (follow-ups). - The audit emitters of the template family keep
details, and the ADM kit sendsbeforeAfter. Events of the administration and configuration category fromess-reference, the backbone and the template-family units still lack the version or the before and after values that category needs, and are quarantined (follow-ups).
Questions for a person¶
None blocks this session. - The known adm-identity gap (issue #40, decided 25 Nov 2026) is recorded above, for the gate to file as RC-1-S08's fix: patient-identity.v1 1.1 is not served, and the status after "unsure" is wrong. - TEST-ISE-001 for the whole system (RC-1-S20's question 2) is still open: no card runs every unit with the internet and external control planes disconnected. This session ran the slice offline from the internet on one host, but did not run that test.
Follow-ups outside the card¶
- Delivery pipeline (
platform/delivery-pipeline): the image scan of the harness downloads the 3.6 GB Playwright image from mcr on every run, and on the self-hosted runners that download was cut off three times in a row. The scanner could read the image the runner already has (--image-src dockerwith the Docker socket), keep its layer cache between jobs, or retry the download. - adm-identity (the RC-1-S08 fix the gate files): GAP-ADM-012's status after "unsure", and patient-identity.v1 1.1 (
recordIdentityReview,recordDemographicChange), as issue #40 says. - MOD-ESS-001 (
ess-runtime-decision): - map a service client's
subonly on client-credentials tokens, if token exchange is wanted later (it would keep the person's subject andacr). FR-ESS-IAM-003 AC-04 no longer depends on it; - an installer for the first administrators and the platform's service identities in production, under the security officer.
ess-reference:- registration owners and stewards that are account IDs, set per deployment, so terminology and master data can be published through their governed paths;
- the version and the before and after values on its administration events.
- Decision latency on a loaded host: the kits' 250 ms decision budget (CFG-ISE-031) refuses requests whenever the host is busy: 23 of 600 searches at twice the peak in the final run, and for a few seconds after a unit restarts (review round 5). A decision cache in the kits (the 60-second Permit) and a capacity test on a dedicated environment belong with MOD-ESS-002 and the gate.
- The RC-3 ADM and ISE build sessions: confirm the topic register's entries for
his.adm.bed.v1and RC-3's seven ISE topics (producer, classification and tier), registered here so the register covers every contract topic. - RC-2-S10 and the RC-1 gate: once the stack has the D10 consent service and UI-ADM-001 the incomplete-then-complete flow (RC-2-S04's follow-ups), drop
his.adm.consent.required-for-completionfrome2e/scenarios/RC-1/stack.json, so that the RC-1 scenarios run with the general consent required. - Every unit's kit: take the acting-service header from the template (
HisContextFilter,HisContext.actingService, the audit emitter) before the unit serves calls passed on for a person. Until then, its audit of such a call names the person alone. Today onlyadm-patient-administrationpasses calls on, toadm-identity. - Shell and SDK (FN-S06): wire sign-on (UI-ESS-001) and a service client with the user's token, then drop the development session hook and the test's token injection.
- UI-ADM-001: the unit's planned field set requires the postal code, which the screen does not mark as required.
- The kits:
- honour the decision's
cacheLifetimeSeconds(CFG-ESS-009), which would cut the decision load that made search fail closed at twice the peak; - bring every unit's kit to one version, as ADR-HIS-076's consequences say.
- Event backbone and the RC-2 sessions: confirm the producers, classifications and tiers of the RC-2 topics registered here.
- Audit completeness (NFR-ADM-005, NFR-ESS-008). In run
20261126T071723Z-6e31the audit service stored 2,141 events and quarantined these. The final run's count, at RC-1-E2E-011, is 97 (table above) (kept, not lost, but not in the trail until accepted): - 112
adm.person.searchwithout a decision ID: the searches that failed closed because no decision came back. The record-access category requires a decision, and an outage has none. This is for ess-audit and ADM to settle, for example with a registered outage-refusal type; - 40
access-check-unavailablefrom ess-reference: the kit's outage-refusal type is not in the catalogue; - about 70 administration and configuration events (
ise.config.changed,ess.mdm.change,ess.trm.content,ess.iam.account,ess.iam.role,ess.auz.policy) without the item version or the before and after values. These are for the backbone, ess-reference, MOD-ESS-001 and the template family's emitters; - 9
ess.iam.sign-inwithout the account or method, for MOD-ESS-001; - 3 backbone types missing from the catalogue (
ise.message.replayed,ise.dead-letter.closed; RC-1-S13's follow-up), for ess-audit; - 1
ess.wfl.taskand 1adm.person.changerefusal with no record yet (RC-1-S08's follow-up). - Observability: the collector's
containeroperator logs a parse error for each plain log line (the line is still sent on). A plain-file variant for environments without container runtimes would make the logs quiet. - Performance (to the gate, RC-1-S28): the shortfalls of the table above, with their measurements. Search at twice the peak and single decisions miss their targets in the final run, refusing what takes longer than the 250 ms decision budget; the decision service is the bottleneck. Which targets are missed changes from run to run with the host's load. Horizontal scaling, restore, the capacity model, downtime reconciliation and offline operation are not measurable in this slice's environment.
- Design system: none from this session.