Implementation plan / Session plan / Handover RC-3-S03
Handover RC-3-S03 Contract: Contracts and stubs: D2 ISE, and the failing scenario test (slice RC-3)¶
Card: RC-3-S03. Issue: cema-care/his#59. Branch: session/RC-3-S03. Slice: RC-3. Decision record: ADR-HIS-085.
What was built and where¶
This is the last contract session of RC-3. It did three things: - wrote the D02-ISE contracts of the slice; - checked every reference between the domains' contracts and repaired those that did not resolve; - wrote the RC-3 scenario as a test that fails only because the behaviour is not built.
D02-ISE contracts, in contracts/ise/ (the tables of contracts/ise/README.md, "What slice RC-3 added").
| API | Version | Unit | Requirements |
|---|---|---|---|
integration.v1 |
1.0, new, 32 operations | platform/integration-engine |
FR-ISE-INT-001, 002, 003, 005, 006; bindings of FR-ISE-KEY-003 |
contract-catalogue.v1 |
1.0, new, 10 operations | platform/gateways |
FR-ISE-GWY-002; the FHIR capability statement of FR-ISE-INT-003 |
security-monitoring.v1 |
1.0, new, 10 operations | platform/observability |
FR-ISE-OBS-002 |
vulnerabilities.v1 |
1.0, new, 6 operations | platform/supply-chain |
FR-ISE-SUP-002 |
recovery.v1 |
1.0, new, 31 operations | platform/backup-recovery |
FR-ISE-BCR-001, 002, 003 |
releases.v1 |
1.0 → 1.1, +5 operations | platform/delivery-pipeline |
FR-ISE-REL-003 |
secrets.v1 |
1.0 → 1.1, +1 operation | platform/secrets-keys |
FR-ISE-KEY-003 |
service-catalogue.v1 |
1.0 → 1.1, +7 operations | platform/deployment-topology; platform/observability for the performance report |
FR-ISE-PLT-003 |
Ten new events, each in the event catalogue with ISE as producer:
- InterfaceMessageQuarantined, ReconciliationExceptionRaised (on his.ise.deliveryexception.v1);
- InterfaceStatusChanged (his.ise.interface.v1);
- ContractLifecycleChanged (his.ise.contract.v1);
- VulnerabilityOverdue (his.ise.vulnerabilityfinding.v1);
- BackupCompleted (his.ise.backupset.v1);
- RestoreTestCompleted (his.ise.recoverytest.v1);
- FailoverCompleted (his.ise.failover.v1);
- DowntimeDeclared and DowntimeEnded (his.ise.downtimewindow.v1).
SecurityAlertRaised goes to 1.1, with optional rule version, affected asset and correlation references.
Other files in contracts/ise/:
- TRACE.md: the trace of every field RC-3 added.
- README.md:
- what RC-3 added;
- the conventions fixed;
- the names ISE registers in D10;
- the contract points of RC-3-S04, S06, S09 to S17, S20 to S22 and S24.
- scripts/cross-references.ts: the references to and from ISE. It complements contracts/adm/scripts/cross-references.ts, which checks the references to ADM.
- scripts/verify-stub.sh: the stub against the provider contract test.
- scripts/ends-when-rc-3.sh: this card's "Ends when", repeatable.
- stubs/: regenerated.
Section 7.3 of D02-ISE data, for approval by the domain leads. No existing attribute was changed. - An introduction naming who wrote what. - New entity sections: DE-ISE-005 Contract Catalogue Entry, DE-ISE-017 Vulnerability Finding, DE-ISE-019 Backup Set and DE-ISE-020 Restore / DR Test Record. Their 7.2 rows now link to them. - The records added for slice RC-3: reconciliation run, expected transaction reference, managed file transfer, conformance pack and run, message replay, preservation order, backup policy, failover authorization, downtime summary, downtime entry check, capacity model and scaling policy. - "Added by the RC-3 contracts" blocks in DE-ISE-007, 008, 010, 012, 014, 021 and 022.
Repairs between the domains (card: "repairs those that do not resolve"):
- contracts/ess audit.v1 named the audit type adm.person.merge. D01-ADM 9.5 names it adm.identity.merge. Repaired, and the entry is removed from toRepairByRc3S03 in contracts/adm/scripts/cross-references.ts.
- D02 interface identifiers. The examples of ESS (IF-ISE-006, the forwarding destination) and ADM (IF-ISE-ADT-LIS-01, a delivery consumer) used made-up identifiers. They are now registry identifiers of integration.v1 (ise-siem-wazuh, adm-adt-lis-01; ADR-HIS-085 point 2). The ESS README and CONTRACT-POINTS name the real identifier, and the ADM Consumer.consumerId description names the form. Contract point 1 of RC-3-S03 in contracts/adm/README.md is marked done.
- These are example and prose changes, without a minor version (contracts/common README, "Versions"). The ADM and ESS stubs are regenerated.
The scenario test of RC-3, in e2e/scenarios/RC-3/: stack.json (stubs adm, ess, ise; no unit yet), builders.ts, rc-3.scenario.ts and README.md.
| Case | Scenario step |
|---|---|
| RC-3-E2E-001 | Steps 1 and 5: admission with a reserved bed, bed conflict, discharge, closure, encounter validation |
| RC-3-E2E-002 | Step 2: transfer |
| RC-3-E2E-003 | Step 3: ADT over HL7 v2, acknowledgement and reconciliation, replay, node authentication |
| RC-3-E2E-004 | Step 4: stewardship, merge and unmerge |
| RC-3-E2E-005 | Step 6: downtime, failover with two persons, restore, back-entry with duplicate detection |
| RC-3-E2E-006 | The security assurance of the slice: forwarding to the SIEM, alerts and preservation, the vulnerability gate, the contract catalogue, change failure rate, capacity model |
| RC-3-E2E-007 | The contract walk through the stubs of ADM, ISE and ESS |
ADR-HIS-085 and its row in the decision record index (83 records). It records ten decisions:
1. One API per platform unit.
2. Interface identifiers <owning domain>-<name>.
3. Message exceptions and replay beside the event ones.
4. Recording APIs for the platform's tools, and two-person rules as two calls.
5. Owning-domain labels with a colon (adm:ward-census).
6. DowntimeEnded at restoration confirmation.
7. No informational SecurityAlertRaised.
8. Reconciliation exceptions ordered per exception.
9. The capability statement in the catalogue.
10. Platform units called by folder name in the scenario.
ADR-HIS-084 is taken by the open pull request #166 (RC-6-S01), so this record is ADR-HIS-085. It was checked free against origin/main and every open pull request on 2026-11-27. The index count (83) will conflict with #166; whichever merges second brings it to 84.
Checks and their result¶
The host's Node.js 22.22 cannot run the TypeScript contract tool, so the checks ran in the image node:22.18-bookworm with pnpm 10.34.9 through corepack. pnpm install --frozen-lockfile was run first in contracts/common, ise, adm, ess, fin and e2e/harness. The integration environment ran as HIS_SESSION=RC-3-S03 (his-rc-3-s03) and was reset afterwards.
| Check | Command | Result |
|---|---|---|
| Conventions | his-contract lint . in contracts/ise |
passed |
Compatibility with origin/main, stubs up to date |
his-contract check . --base origin/main in contracts/ise, adm, ess, fin |
passed. ise: five APIs new, three at 1.1 with new operations and optional parameters, ten events new, SecurityAlertRaised 1.1. adm, ess: examples only. fin unchanged |
| Stubs against the provider contract test | scripts/verify-stub.sh in contracts/ise, adm, ess, fin |
passed: 340, 527, 532 and 10 cases, no violation |
| Cross-domain references | node scripts/cross-references.ts in contracts/adm and in contracts/ise |
passed: 452 references to ADM, none left to repair; 293 to and from ISE |
| Cross-reference checker catches errors | a temporary file with one bad reference of each kind in contracts/fin, then removed |
each of the seven kinds reported |
| Scenario folder type check | pnpm build in e2e/harness |
passed |
| Ends when | HIS_SESSION=RC-3-S03 contracts/ise/scripts/ends-when-rc-3.sh |
passed, see below |
| Documentation links | python3 docs/implementation_plan/tools/check_links.py |
0 broken, 0 duplicate anchors |
| Documentation site | mkdocs build |
builds |
| Secret scan, static analysis | platform/delivery-pipeline/bin/secret-scan code and docs from origin/main; static-analysis contracts/ise contracts/adm contracts/ess e2e/scenarios/RC-3 |
no secret; no blocking finding; no clinical artifact. The first scan flagged the synthetic example "idempotencyKey": "<uuid>" as a generic API key, a false positive. The example became the MSH-10 control identifier, and the commit was amended before any push, so no such commit is in the branch |
The steps of ends-when-rc-3.sh:
- The ise, adm, ess and fin contracts pass the check, and their stubs answer every provider case with no violation.
- Both cross-reference checks pass, and none is left for RC-3-S03 to repair.
- On the full profile, for ise:
- the 18 event schemas register in Apicurio, and the second run reports them unchanged;
- the topics are created, and the 18 sample events are published, read back from Kafka and validated;
- the stub on the session network passes all 340 cases with a token of the realm
his, with no violation recorded. - The scenarios run:
- RC-3: RC-3-E2E-007 passes. RC-3-E2E-001 to 006 each fail only with
unit "…" is not in this stack(adm-identity, adm-patient-administration, integration-engine, adm-identity, backup-recovery, ess-audit). - RC-2 and RC-1: their walks RC-2-E2E-005 and RC-1-E2E-005 pass, and every other test fails only with
unit "adm-identity" is not in this stack.
The evidence records of each run are in e2e/harness/out/evidence/<slice>/ends-when-RC-3-S03-*, which git ignores.
How the "Ends when" lines are met:
- Contracts pass the compatibility check: step 1.
- Every contract field traces to a requirement, a business rule or a section 7.3 attribute: contracts/ise/TRACE.md, with the 7.3 additions above. One field that traced to nothing (a free-text note on a downtime declaration) was removed rather than invented.
- Stubs run in the integration environment: step 3.
- The scenario test runs and fails only because the behaviour is not built: step 4.
Requirements and test scenarios¶
A contract session covers requirements by contract. The test scenarios of section 15.2 belong to the build sessions named; the RC-3 scenario cases that exercise them end to end are given.
| Requirement | Contract | Checked by | Test scenario: build session; scenario case |
|---|---|---|---|
| FR-ISE-INT-001 | integration.v1: interfaces, health, transactions, payload view, message exceptions, file transfers; InterfaceMessageQuarantined, InterfaceMessageDeadLettered with interfaceId |
verify cases; sample events | TEST-ISE-010: RC-3-S15; RC-3-E2E-003 |
| FR-ISE-INT-002 | integration.v1 registerInterface, updateInterface, transitionInterface (missing attributes, certification, two approvals, suspend with impact, resume); InterfaceStatusChanged |
verify cases; sample event | TEST-ISE-011: RC-3-S15; RC-3-E2E-003 |
| FR-ISE-INT-003 | integration.v1 conformance packs and runs; contract-catalogue.v1 readCapabilityStatement; the HL7 v2 mapping table of contracts/adm README |
verify cases | TEST-ISE-012, TEST-ISE-013: RC-3-S15; RC-3-E2E-003 |
| FR-ISE-INT-005 | integration.v1 message dead letters, requestMessageReplay, authorizeMessageReplay; event-operations.v1 (RC-1) for events |
verify cases | TEST-ISE-015, TEST-ISE-016: RC-3-S16; RC-3-E2E-003 |
| FR-ISE-INT-006 | integration.v1 submitTransactionReferences, reconciliation runs and exceptions; ReconciliationExceptionRaised; delivery statuses to contracts/adm adt.v1 |
verify cases; sample event | TEST-ISE-017: RC-3-S16; RC-3-E2E-003 |
| FR-ISE-GWY-002 | contract-catalogue.v1; ContractLifecycleChanged | verify cases; sample event | TEST-ISE-008: RC-3-S13; RC-3-E2E-006 |
| FR-ISE-KEY-003 | secrets.v1 1.1 checkNodeCertificate, nodeRole; integration.v1 nodeAuthentication, credentialRefs |
verify cases | TEST-ISE-028: RC-3-S11; RC-3-E2E-003 |
| FR-ISE-REL-003 | releases.v1 1.1 change records, transitions, retrospective review, change failure rate | verify cases | TEST-ISE-025: RC-3-S12; RC-3-E2E-006 |
| FR-ISE-SUP-002 | vulnerabilities.v1; VulnerabilityOverdue; releases.v1 gate finding-open |
verify cases; sample event | TEST-ISE-037: RC-3-S10; RC-3-E2E-006 |
| FR-ISE-OBS-002 | security-monitoring.v1; SecurityAlertRaised 1.1; IF-ISE-006 with contracts/ess audit.v1 | verify cases; sample event | TEST-ISE-031: RC-3-S09; RC-3-E2E-006 |
| FR-ISE-BCR-001 | recovery.v1 backup policies, sets, status, recovery tests; BackupCompleted, RestoreTestCompleted | verify cases; sample events | TEST-ISE-032: RC-3-S17; RC-3-E2E-005 |
| FR-ISE-BCR-002 | recovery.v1 failovers with two authorizations, replication status, DR tests; FailoverCompleted | verify cases; sample event | TEST-ISE-033: RC-3-S17; RC-3-E2E-005 |
| FR-ISE-BCR-003 | recovery.v1 downtime windows, restoration validation, summaries, entry checks, reconciliation reports, exercises; DowntimeDeclared, DowntimeEnded | verify cases; sample events | TEST-ISE-034: RC-3-S17; RC-3-E2E-005 |
| FR-ISE-PLT-003 | service-catalogue.v1 1.1 capacity models, scaling policies, performance report | verify cases | TEST-ISE-005: RC-3-S14; RC-3-E2E-006 |
The scenario also covers the D01-ADM requirements of the slice, against the contracts of RC-3-S02: - RC-3-E2E-001: FR-ADM-ADT-001, ADT-003, BED-001, BED-002, ENC-003; TEST-ADM-014, 015, 017, 018, 019. - RC-3-E2E-002: FR-ADM-TRF-001, TRF-002; TEST-ADM-027, 028. - RC-3-E2E-003: FR-ADM-ADT-002; TEST-ADM-016. - RC-3-E2E-004: FR-ADM-MPI-004, MPI-005, XRF-002; TEST-ADM-004, 005, 011, 032.
It covers FR-ESS-AUD-003 against the contract of RC-3-S01 (RC-3-E2E-006; TEST-ESS-024). Each test names what it covers in its covers list.
Contract changes¶
All of them are within major version 1, and the check found them compatible:
- five new APIs;
- releases.v1, secrets.v1 and service-catalogue.v1 1.0 → 1.1: new operations, optional output fields, optional query parameters, and the input enum value approve-emergency;
- ten new events;
- SecurityAlertRaised 1.0 → 1.1: optional fields.
In contracts/adm and contracts/ess only examples and descriptions changed, which needs no version (contracts/common README).
Differences from the card or specification¶
- DowntimeEnded is published when restoration is confirmed, not when the window closes (ADR-HIS-085 point 6). EVT-ISE-017 says "window opened or closed". Back-entry needs the end of the downtime, and the close of the reconciliation period waits for that back-entry. The close is on the window. The owner is asked to confirm (Q4).
- The reconciliation period opens with the Incident Commander's confirmation of restoration, as D02-ISE 4.3 has it (Restoring to Reconciling by the Incident Commander). FR-ISE-BCR-003 section 3 also says the Platform Engineer / SRE opens the period. The contract follows the state model and asks the owner to reconcile the two (Q2). If the Platform Engineer must open it as a step of its own, a compatible minor version adds an
open-reconciliationaction. - An informational security alert is not published as SecurityAlertRaised (ADR-HIS-085 point 7). The record is kept and searchable in security-monitoring.v1. Version 1.0 of the event has a closed severity list, and an informational record needs no response from the event's consumers.
- ReconciliationExceptionRaised is ordered per exception, its aggregate, while 8.5 says "ordered per business identifier" (ADR-HIS-085 point 8). The payload carries the business identifiers.
- Lifting a preservation order is refused to everyone until Q1 is answered. FR-ISE-OBS-002 names no actor who lifts one. The contract has the operation, and the policy grants it to no role, so preserved data stays.
- Preservation orders, vulnerability decisions and capacity model approvals are audited as
ise.config.changed. D02-ISE 9.5 has no type for them (Q3). - "Authorize network isolation" on UI-ISE-010 belongs to FR-ISE-NET-001, which is not in this slice. Paper form counts come from the Domain 6 form register, which has no contract yet. Neither is in these contracts (follow-ups).
Needs a person¶
None of these blocks the merge. Each is listed in the pull request; Q1 to Q4 are also posted on issue #59.
- Domain leads of the slice (D2 ISE; D1 ADM and D10 ESS for the repaired references and the scenario): review of the contracts and of the section 7.3 additions (session plan section 4, end of each contract session).
- Enterprise Architecture Board: approval of ADR-HIS-085.
- Q1, owner of D02-ISE (access behaviour): who may lift a preservation order (FR-ISE-OBS-002 part 5 and section 11, "Active or Lifted")? Section 3 gives the Security Operations Analyst "preserve evidence" and the security and privacy office "direct investigations", but nobody the lift. Until the answer, the policy denies
liftPreservationOrderto everyone (403), and the data stays preserved. The answer is policy content, not a contract change. - Q2, owner of D02-ISE: FR-ISE-BCR-003 section 3 has the Platform Engineer / SRE "open and close the reconciliation period". D02-ISE 4.3 moves the window from Restoring to Reconciling when the Incident Commander confirms restoration. Is the opening part of that confirmation, as the contract reads it, or a separate step of the Platform Engineer?
- Q3, owner of D02-ISE: D02-ISE 9.5 names no audit event type for preservation orders (placing, lifting), vulnerability decisions (severity confirmation and downgrade, risk acceptance, closure) or capacity model approval. FR-ISE-OBS-002, FR-ISE-SUP-002 and FR-ISE-PLT-003 section 12 require them to be recorded. Should 9.5 gain types for them? Until then they are
ise.config.changed. - Q4, owner of D02-ISE: please confirm that DowntimeEnded (EVT-ISE-017) marks the confirmation of restoration, when the downtime itself ends. The close of the reconciliation period, which needs the owning domains' back-entry, comes later and is recorded on the window.
Follow-ups outside the card¶
- Harness (FN-S07 owner) before RC-3-S24:
- The harness starts only
services/units. The D02 units of RC-3 are underplatform/and serve their APIs from what they deploy:integration-engine,secrets-keys,backup-recovery,observability,supply-chain,delivery-pipeline,gatewaysanddeployment-topology. - RC-3-E2E-003, 005 and 006 call them by folder name. The harness needs a way to reach them, for example an endpoint per platform unit in
stack.json. - Development realm (FN-S02 or RC-1-S16): the synthetic users of
USERSine2e/scenarios/RC-3/rc-3.scenario.ts, beside those RC-3-S02 listed: dev.integration,dev.integration2(Integration Operations Analysts);dev.incident,dev.incident2(Incident Commander and second authorized person);dev.backup(Backup and Recovery Operator);dev.security(Security Operations Analyst);dev.secengineer(Security Engineer).- Event backbone: no RC-3 session builds
platform/event-backbone. RC-3-S16 reports the backbone's subscription receipts tosubmitEventDeliveryStatusesfrom the event-operations of RC-1-S13 (contract point). A later backbone session may take this over. - Domain 1 downtime content (session plan):
- FR-ISE-BCR-003 needs Domain 1 to supply the downtime lists of CFG-ADM-029 (
adm:ward-censusand the others) and to back-enter entries withcheckDowntimeEntry. - No RC-3 ADM card builds them, while TEST-ISE-034 and RC-3-E2E-005 expect the ward census. A card is needed before RC-3-S24.
- Domain 6: the paper form counts of UI-ISE-010 (OV-122) need a contract of the D06 form register.
- FR-ISE-NET-001: the "Authorize network isolation" action of UI-ISE-010 comes with its slice.
- D02-ISE 9.5: the audit event types of Q3.
- Host tooling: as RC-3-S01 and RC-3-S02 noted, the server's Node.js cannot run the contract tool.
- Design system: none from this session.