Skip to content

Implementation plan / Session plan / Handover RC-1-S28-F21

Handover RC-1-S28-F21 Fix: a test walks WF-ISE-002 (release build, promotion and deployment) end to end

Card: RC-1-S28-F21. Issue: cema-care/his#227. Branch: session/RC-1-S28-F21. Owner session: RC-1-S19. No decision record.

Comes after RC-1-S28. The issue's first comment holds the gate's evidence: no test in the code base named WF-ISE-002. Its steps were covered in parts by the tests of TEST-ISE-023, 024 and 036, but no test ran the workflow from pull request to closed release record, with the Release Manager's approvals and the post-deployment health check (D02-ISE 4.2). Gate line: criterion 2 of slice gate RC-1, "the specification workflows pass end to end (WF-ISE-002)".

Scope as read

Write the missing workflow test in platform/delivery-pipeline, the unit of RC-1-S19, so that the gate's collector finds a test that names and walks WF-ISE-002, and that test passes. The unit already does every step: RC-1-S19 built FR-ISE-REL-001 and 002, and RC-3-S12, merged since the gate, built FR-ISE-REL-003 (change records, release notices, recovery, the emergency path). No behaviour is changed and no contract is touched.

Two points the specification leaves to interpretation. Neither is clinical, financial or access behaviour, so neither needed a person: - Step 8, "the release record is closed". D02-ISE 4.3 gives a release no Closed state: it stays Deployed until Retired. The test reads step 8 as the release's change record (DE-ISE-014) being closed. That record is bound to the release and holds the outcome, approvals, notices and evidence references. The release keeps its deployed version, components, evidence and sign-off references. - "An incident is raised" (exception, failed health check). No contract has an API for raising an incident (RC-3-S12, "Differences"). The test checks that the incident reference is recorded on the failed-and-recovered change record, and that ReleaseDeployed carries healthCheck: failed.

What was built and where

  • ReleaseWorkflowTest, in platform/delivery-pipeline/mod-ise-005/src/test/java/care/cema/his/ise/mod005/. Class tags WF-ISE-002, FR-ISE-REL-001 to 003, MOD-ISE-005. Every display name starts with WF-ISE-002. It uses the module's existing ReleaseTestBase and runs through the service's HTTP API, the outbox and the D10 fakes, with synthetic data only. Seven tests:
Test What of WF-ISE-002 it walks
main_workflow Steps 1 to 8 in order, for one release:
1–2. Registered with a merged pull request and its people, and every CI check passed.
3. Signed with provenance, with the SBOM.
4. The package of seven types.
5. Release Manager approves pre-production; deployed and validated there; change record with compatibility evidence and recovery plan; rebuild and security sign-off.
6. Production refused until the change record is approved, then approved as a rolling release.
7. Deployment refused before the notices. Scheduling sends a notice to each stakeholder; deployed to production with health check passed and ReleaseDeployed published.
8. Implemented, with completion notices, then closed. The release keeps its version, evidence and sign-off.
Also checks the history of every step, with actor, time and version, and the audit of the people's decisions and of the refused deployment
rejected_at_pre_production Step 5, rejection with a reason: Rejected, and no deployment or promotion afterwards
emergency_clinical_fix Alternative: a failed check still blocks promotion. Expedited approval, then the retrospective review task, deployment, and closure only after the review
configuration_only_change Alternative: a release of configuration manifests alone, with the other types not applicable with a reason, takes the same promotion path and needs the same change record
critical_finding_blocks Exception: a high finding without an approved exception blocks the promotion request
signature_or_reproducibility_fails Exception: an unverifiable signature leaves the artifact unpromotable and undeployable; a rebuild that differs blocks production
health_check_fails Exception: a failed health check. Implemented is refused; the rollback is authorized and executed (Rolled Back, published); the change is recorded as failed and recovered, with its incident reference; the record closes
  • The unit's README, "The release pipeline": a paragraph names the workflow test and maps the workflow's steps to the release and change records, step 8 included.

Steps 1 and 2 happen before the service sees a release: bin/release changes refuses a change that is not a peer-reviewed pull request with passed checks. That is tested in Python by test_release.ChangesTest, which the gate's collector does not read. The workflow test starts from the release registered with what that step found.

Checks and their result

The integration environment ran as HIS_SESSION=RC-1-S28-F21 (his-rc-1-s28-f21), light profile.

Check Command Result
The new test ./gradlew :mod-ise-005:test --tests '*ReleaseWorkflowTest' in platform/delivery-pipeline 7 passed
The owning unit, as the gate runs it HIS_SESSION=RC-1-S28-F21 docs/implementation_plan/delivery/gate-evidence/tools/run_tests.sh <results> platform/delivery-pipeline (cleanTest build --continue --no-build-cache, then the IaC policy check) Exit 0. 92 tests across the unit's JUnit suites: 91 passed, 1 skipped (as before), 0 failed. mod-ise-005 has ReleaseWorkflowTest 7, ChangeRecordTest 17, PromotionTest 9, GateTest 6, DeploymentTest 5, Mod005ModuleTest 1, ReleasesContractTest 13 and DownstreamConsumerContractTest 4. IaC policy: 0 blocking
The gate line's check, before and after collect_tests.py --slice RC-1 --results <results> Before (the same results without ReleaseWorkflowTest's): WF-ISE-002 · no test · 0/0. After: WF-ISE-002 · passed · 7/7. TEST-ISE-023 (3/3) and TEST-ISE-024 (6/6) of this unit are unchanged. The test's class comment names no TEST identifier, so the collector links its tests to WF-ISE-002 only
Static analysis platform/delivery-pipeline/bin/static-analysis platform/delivery-pipeline No blocking finding; no clinical artifact
Secret scan platform/delivery-pipeline/bin/secret-scan code origin/main HEAD No secret found
Links, documentation site python3 docs/implementation_plan/tools/check_links.py; .venv/bin/mkdocs build 0 broken, 0 duplicate anchors; builds

The slice scenario was not run. "Ends when" asks that it still pass. platform/delivery-pipeline is not in the scenario's stack (e2e/scenarios/RC-1/stack.json), and this change adds one test class and a README paragraph. It changes no code that is built into an image or that the scenario reaches. So the scenario cannot be affected, and a full-profile run on this shared, loaded host (load average 22 to 39) would show nothing about this change. The next gate round, RC-1-S28-G2, runs it in full.

The pipeline's Python self-test was not run. No Python file changed. It is RC-1-S19's other check, and the pull request's job for this folder runs it.

What the gate line now shows

Criterion 2, WF-ISE-002: passes. Seven tests name and walk the workflow, its two alternative paths besides rejection, and its three exception scenarios. The other workflows of the line are not this card's. WF-ADM-001's duplicate branch is #206.

Requirements and test scenarios of the card

Item Covered by
WF-ISE-002 main workflow, steps 1–8 ReleaseWorkflowTest.main_workflow (steps 1–2 also test_release.ChangesTest)
WF-ISE-002 step 5, rejection rejected_at_pre_production
WF-ISE-002 alternative: emergency clinical fix emergency_clinical_fix
WF-ISE-002 alternative: configuration-only change configuration_only_change
WF-ISE-002 exception: critical or high finding without approval critical_finding_blocks
WF-ISE-002 exception: signature or reproducibility check fails signature_or_reproducibility_fails
WF-ISE-002 exception: post-deployment health check fails health_check_fails
WF-ISE-002 business rules BR-ISE-011, 012, 013, 021, 022 Through the steps above: finding, signatures and rebuild, change record, emergency review, security sign-off

Differences from the specification

None in behaviour. The test's reading of step 8 and of "an incident is raised" is under "Scope as read". The README now says so too.

Questions for a person

None.

Follow-ups outside the card

  • A release Closed state, or not. If D02-ISE's owner wants the release record itself closed at step 8, D02-ISE 4.3 and releases.v1 would need a state for it. Today the change record closes and the release stays Deployed. No change is proposed here.
  • Steps 1–2 in the gate record. The collector reads only JUnit XML, Vitest's junit.xml and script units' results.json. The pipeline's Python tests (test_release, test_pipeline), which check the peer review and the CI jobs, are therefore not in the gate's record. bin/self-test could write a results.json, or the collector could read Python unittest output (FN-S05 or a gate tooling change).