Skip to content

Implementation plan / Session plan / Handover RC-1-S19

Handover RC-1-S19 Build: Platform: delivery pipeline

Card: RC-1-S19. Issue: cema-care/his#33. Branch: session/RC-1-S19. Slice: RC-1. Decision record: ADR-HIS-066.

What was built and where

Everything is in platform/delivery-pipeline/, except the decision record, its row in the decision record index, and this handover. The unit's README.md has every command, setting and state. It has new sections: "Clinical artifacts", "The release pipeline" and "The releases service".

Scope as read. The card covers MOD-ISE-005 for two requirements: - FR-ISE-REL-001: peer-reviewed change and CI validation. FN-S05 built most of it; - FR-ISE-REL-002: signed, reproducible artifacts and controlled promotion.

It also carries the contract point that RC-1-S02 left in contracts/ise/README.md: - record releases as releases.v1 states them; - send the change authors to the D10 decision service on an approval to production, and answer 403 on a segregation-of-duties denial; - publish ReleaseDeployed.

It picks up RC-1-S18's follow-ups that belong to this folder. FR-ISE-REL-003 (change records, recovery, mixed-version upgrades) is RC-3-S12's.

What was built:

  • The releases service ise-delivery-pipeline, made from the service template into this folder. It has one module mod-ise-005, schema mod_ise_005, migration V1__releases.sql, and topic his.ise.release.v1.
  • It serves listReleases, readRelease, decidePromotion and recordSecuritySignoff of releases.v1.
  • It records what the release steps did through its own API, api/release-pipeline.v1.openapi.yaml: build, signatures, rebuild, request for pre-production, change record reference, pre-production validation, deployments, and rollback or forward-fix. Only a service identity records an observation of the pipeline.
  • It follows the release lifecycle of D02-ISE 4.3. Every transition is in the release history with actor, time, version and environment.
  • The gate is computed from the record (release/Gate.java):
    • blocking every promotion: manifest incomplete, a component not Verified, a check failed, not run or missing, and an open critical or high finding;
    • blocking production as well: no reproduced rebuild, no security sign-off, no change record.
  • Rule 6. An approval to production asks the decision service once per distinct author, committer and merger, with earlierActors.developer. A Deny answers 403, is recorded and audited (ise.release.refused), and the release stays Validated.
  • A deployment of an artifact that is not Verified, or not the released digest, is refused and audited.
  • ReleaseDeployed is published on each deployment, rollback and forward-fix.
  • The unit's copy of the kit has the errors extension of HisException and ProblemAdvice (the same as platform/secrets-keys). PolicyCheck has a new withAttributes, for the segregation-of-duties attributes.
  • The release steps bin/release (lib/release.py, Python standard library):
  • tag and changes: every commit since the previous tag came through a merged pull request with an approving reviewer other than its author and passed checks. People are resolved to workforce accounts;
  • build: from git archive of the tag. The jar uses the init script release/reproducible.init.gradle.kts, and the image is built with BuildKit at the tag's SOURCE_DATE_EPOCH, time stamps rewritten, no cache;
  • sign: cosign signature and SLSA provenance v1 attestation;
  • verify: the deployment's check, which refuses Missing or Unverifiable;
  • rebuild: digest comparison;
  • manifest: the seven types;
  • record: to the service.
  • Clinical artifact validation bin/clinical-artifacts (lib/clinical.py), run by the static analysis job.
  • It covers FHIR R4 profiles and conformance resources under fhir/, clinical schemas under clinical-schemas/ and clinical templates under clinical-templates/.
  • Every terminology binding goes to D10 validateBindings. Bindings that cannot be checked fail closed.
  • Infrastructure policy checks bin/iac-policy: Trivy misconfiguration checks of OpenTofu, Terraform, Kubernetes and Helm. build-test runs them for every platform/<unit>. They have the same blocking severities and exceptions as vulnerabilities (lib/vulns.py now reads misconfigurations too).
  • Gates wired from RC-1-S18:
  • supply-chain gate --coverage in every dependency scan (HIS_DEPENDENCY_GATE=full for a release build);
  • supply-chain register guard in the protected-files job.
  • Image scan of platform units: lib/plan.py now marks a platform/<unit> with a Dockerfile as having an image. Before, only services/ units had theirs scanned.
  • Pinned tools in tools.env: cosign 3.0.6, BuildKit 0.26.2 (every release build) and the OCI registry 3.0.0 (tests and the Ends-when check only), each by digest.
  • Checks:
  • bin/self-test now runs test_pipeline, test_release and test_clinical;
  • scripts/ends-when.sh is this card's check;
  • test_pipeline.Scratch now leaves out build output when it copies the folder.

The workflow files at the repository root were not changed, since a build session does not edit the root. Every new check runs from a script that an existing job already calls.

Dependencies: none added to the Java unit beyond the template's. Its lockfiles were written with ./gradlew dependencies --write-locks. The same lz4-java and snappy-java constraint as platform/secrets-keys is in buildSrc. The Python tools use the standard library only. The two new images in tools.env (cosign, registry) are tools run as containers, not dependencies of a build. Their register entries are under "Follow-ups".

Checks and their result

The integration environment ran as HIS_SESSION=RC-1-S19 (his-rc-1-s19), light profile.

Check Command Result
Unit build and every test ./gradlew build in platform/delivery-pipeline Passed. The module has 26 tests: Gate 6, Promotion 9, Deployment 5, contract 5, module 1. The kit and unit tests also pass
Provider contract test contract/ReleasesContractTest, part of the build his-contract verify contracts/ise on listReleases (2 cases), readRelease (2), decidePromotion (3) and recordSecuritySignoff (3): none failed. validate-event on the published ReleaseDeployed of a deployment and a rollback: passed (2)
Pipeline self-test bin/self-test 62 tests, passed; 3 skipped as before (the contract check needs Node.js on the host, which the workflow job has; the Java build runs with --full)
Static analysis, with clinical artifacts bin/static-analysis platform/delivery-pipeline No blocking finding; no clinical artifact in the change
Dependency scan, register gate bin/dependency-scan platform/delivery-pipeline 0 blocking (4 medium); gate --coverage passed over 527 components. The same gate passed on platform/secrets-keys and services/ess-coordination
Image scan bin/image-scan platform/delivery-pipeline 0 blocking (116 medium, 15 low)
IaC policy checks bin/iac-policy platform/<unit> for each of the 11 platform units No blocking finding in any. See "Differences" for the Dockerfile finding left out
Protected files, register guard HIS_PIPELINE_BRANCH=session/RC-1-S19 bin/protected-files origin/main Passed; register guard passed (61 entries unchanged)
Secret scan bin/secret-scan code origin/main HEAD, bin/secret-scan docs origin/main HEAD No secret found
Ends when HIS_SESSION=RC-1-S19 platform/delivery-pipeline/scripts/ends-when.sh Passed, all four steps (below)
Links, documentation site check_links.py; mkdocs build 0 broken, 0 duplicate anchors; builds, with no new warning (the four warnings are earlier records' links to code folders)

Requirements and test scenarios

Every test names its requirement, and its test scenario where one exists: JUnit @Tag and display name, or the Python test name and docstring. Java tests are in platform/delivery-pipeline/mod-ise-005/src/test/java/care/cema/his/ise/mod005/, Python tests in platform/delivery-pipeline/test/.

Requirement, criterion or scenario Covered by
FR-ISE-REL-001 AC-01: pull request and CI evidence exists for a merged change test_release.ChangesTest: each change is a reviewed pull request, with its people and checks kept with the release; a commit without one, a self-approved one, failed checks or no CI evidence stop the release
FR-ISE-REL-001 AC-02: promotion blocked by an unapproved critical or high finding GateTest.open_finding; PromotionTest.critical_finding_blocks_promotion (request and approval refused); FN-S05's DependencyScanTest for the merge
FR-ISE-REL-001 AC-03: an invalid clinical template or FHIR profile fails the pipeline test_clinical.ValidatorTest (profile, schema, template, unpublished binding, fail closed); test_pipeline.ClinicalArtifactJobTest (the static analysis job stops); TerminologyConsumerTest (the D10 call meets the contract)
FR-ISE-REL-001 AC-04: a commit containing a secret blocks the merge FN-S05's SecretScanTest (still passing)
FR-ISE-REL-001 behaviours 2, 4, 6 and 7; PR-REL-001-1 to -3; section 10 GateTest.failed_or_missing_evidence; IacPolicyTest; RegisterGuardTest; the fail-closed tests above
TEST-ISE-023: direct push; a secret; an invalid FHIR profile; a critical finding Direct push: ChangesTest...a_commit_pushed_without_a_pull_request_is_refused (the release refuses it; refusing the push itself is branch protection, under "Needs a person"). Secret: SecretScanTest. FHIR profile: ClinicalArtifactJobTest. Critical finding: PromotionTest.critical_finding_blocks_promotion, DependencyScanTest
FR-ISE-REL-002 AC-01: a release rebuilt from its tag is reproduced test_release.ReleaseImageTest (reproduced, and a differing build flagged); DeploymentTest.reproducibility; ends-when.sh step 3 on this unit (jar and image)
FR-ISE-REL-002 AC-02: the manifest is complete test_release.ManifestTest; GateTest.incomplete_manifest; PromotionTest.incomplete_manifest_blocks_promotion; ends-when.sh step 3
FR-ISE-REL-002 AC-03: an unsigned artifact is refused at deployment test_release.ReleaseImageTest (unsigned Missing and refused; another key Unverifiable; signed Verified); DeploymentTest.unsigned_artifact_refused (refused and audited); ends-when.sh step 3
FR-ISE-REL-002 AC-04: the organization holds source, build definitions, manifests, schemas, configuration and documentation By construction: all of it is in this repository. The release builds only from git archive of the organization's tag. The contractual part is outside system scope
FR-ISE-REL-002 AC-05, PR-REL-002-5: self-approval refused and recorded PromotionTest.self_approval_refused_and_audited, committer_and_merger_refused; test_release.ChangesTest...a_person_without_an_account_is_refused
FR-ISE-REL-002 behaviour 5, PR-REL-002-4, section 11 (states) PromotionTest.promotion_path, rejection, failed_validation, who_decides, listing
FR-ISE-REL-002 behaviours 2 and 6, PR-REL-002-2, BR-ISE-012 ProvenanceTest; ReleaseImageTest; DeploymentTest.other_digest_or_not_approved_refused
EVT-ISE-007, contract releases.v1 DeploymentTest.release_deployed_events; contract/ReleasesContractTest
TEST-ISE-024: rebuild from the tag; unsigned artifact; manifest; self-approval All four rows above (AC-01, AC-03, AC-02, AC-05)

Safety-critical function: release and configuration deployment (D02-ISE 11.1). The control this card implements: - CI validation of clinical artifacts; - signed artifacts; - staged promotion through the gate.

Its verification is the "pipeline negative tests" of 11.1. Each passes: an invalid profile, an unpublished binding, an unsigned or foreign-signed artifact, an incomplete manifest, an open critical finding, a self-approval and a non-reproducible build are each stopped.

Rollback tests are FR-ISE-REL-003's (RC-3-S12). This card records an executed rollback; it does not build the recovery plan.

The hazard log is the clinical safety register (architecture section 13). This card builds the specified control and does not change an existing one, so it makes no hazard log entry. The hazard review of safety-significant releases by clinical governance is a step of the process, not of this code.

Non-functional targets: - NFR-ISE-005, security: - fail closed everywhere; - service identities only for pipeline observations; - the signing key stays in the key store; - every refusal is audited. - NFR-ISE-009, interoperability: the provider contract test, the consumer test against the D10 terminology stub, CycloneDX, SLSA provenance and cosign's OCI signatures. - NFR-ISE-012, observability: the template's correlation and telemetry, and the metrics listed in the README. - NFR-ISE-016, time integrity: UTC instants with Z. SOURCE_DATE_EPOCH comes from the commit, not the build host. - NFR-ISE-018, localization: the unit has no screen. Its times are UTC for UI-ISE-007 to show locally.

Differences from the card or specification

  • The pipeline's own API. releases.v1 has no operation through which the pipeline records builds, signatures or deployments. They are this unit's own API, under /v1/pipeline/releases, until an ISE contract session takes them in. No contract file changed (session rule 4).
  • Operations served. The service serves the operations FR-ISE-REL-002 needs, and recordSecuritySignoff because the production gate needs it (BR-ISE-022). The evidence checks of FR-ISE-SUP-002 are RC-3-S10's. readChangeRecord, decideChangeRecord and authorizeRecovery are FR-ISE-REL-003's (RC-3-S12). Until then, the gate reads only whether a change record is attached.
  • Health check failed after deployment. A production deployment whose health check failed is still recorded as Deployed, with healthCheck: failed in ReleaseDeployed. The recovery that follows is recorded with recordRecovery. "Release marked failed; rollback or forward-fix initiated" is FR-ISE-REL-003's.
  • Rule 6 as one decision per actor (ADR-HIS-066 point 5). The decision service's earlierActors holds one account per role.
  • Direct push. Refusing a push to a protected branch is a setting of the forge, not code. This repository's branch protection could not be read from the session (gh is limited to this session's own issue and pull request). The release step refuses any commit that did not come through a reviewed pull request, so a direct push never reaches a release. Setting branch protection is under "Needs a person".
  • Workflows. No release workflow was added: .github/workflows/ is at the repository root, which a build session does not edit. The steps are ready for a release job (follow-up).
  • Dockerfiles are not in the IaC policy check. The check covers infrastructure code: OpenTofu, Terraform, Kubernetes and Helm. With Dockerfiles in, platform/network-protection/test/testbed/Dockerfile (no USER, DS-0002, high) would stop that unit's next build. That test bed is outside this card (follow-up).
  • Clinical artifact conventions are new (ADR-HIS-066 point 9). No artifact of these kinds exists yet. The template check is against the template's own clinical schema.
  • Coverage threshold (behaviour 5, Should) is not reported: no threshold is adopted (CFG-ISE-024).
  • Signing key in tests. The tests and the Ends-when check sign with a key file made for the run. Production uses hashivault:// against OpenBao Transit (FR-ISE-KEY-001). Creating that key is a deployment step (follow-up for RC-1-S20 and the key custodians).

Review round 1

  • The pipeline's self-test failed on the GitHub runner. Its Docker refused rewrite-timestamp with the host's default builder ("exporter option rewrite-timestamp conflicts with unpack"). This host's newer Docker accepted it.
  • A release build now always uses a BuildKit container of the image pinned in tools.env (moby/buildkit 0.26.2, by digest). It never uses the Docker host's own builder.
  • So a rebuild uses the same BuildKit as the release on any host, which reproducibility needs anyway. The BuildKit image is named in the provenance.
  • The release tests and the Ends-when check were run again on that path: both passed.

Questions for a person

None blocks this session. They are under "Needs a person" in the pull request:

  1. Branch protection on main (FR-ISE-REL-001 behaviour 1, TEST-ISE-023 "push refused"). A repository administrator sets it:
  2. changes only through a pull request with at least one approving review by someone other than the author;
  3. the pipeline's checks required;
  4. no force push or deletion;
  5. administrators included.

Under ADR-HIS-040 the approving review is the review agent's. The launcher's merge then needs that review to be submitted as a GitHub approval. 2. ADR-HIS-066, for the Enterprise Architecture Board.

Follow-ups outside the card

  • A release workflow (a foundation or pipeline card that may edit .github/workflows/): on a tag, run bin/release tag, changes, build, sign, rebuild and manifest, then record each result. Use the release signing key reference from OpenBao and HIS_DEPENDENCY_GATE=full.
  • RC-1-S20 (deployment topology):
  • Argo CD deploys only after bin/release verify passes, and records the deployment with record;
  • an admission policy in the cluster (for example Kyverno's or Sigstore's policy controller) verifies the same signatures, as the second line of behaviour 6;
  • create the release signing key in OpenBao Transit (ECDSA P-256, not exportable), with a policy that only the release job's identity may sign, separate from the people who write code (FR-ISE-REL-002 section 13).
  • RC-3-S12 (FR-ISE-REL-003): change records, authorizeRecovery, the failed-health-check state, release notices, and the change failure rate. The gate's recovery-plan-missing then reads the change record's recovery plan.
  • RC-3-S10 (FR-ISE-SUP-002): the evidence checks of the security sign-off, and the release's findings read from the vulnerability register.
  • D10 policy (ess-runtime-decision): the actions on ise.Release in the README's table. Rule 6 is already in its transaction-rules.json (approve-promotion, developer).
  • D10 audit catalogue: register ise.release.approved, ise.release.refused, ise.release.deployed and ise.release.rolled-back (D02-ISE 9.5).
  • D10 terminology (ess-reference): validateBindings deployed, and its URL and a pipeline token given to the pipeline as HIS_TERMINOLOGY_URL and HIS_PIPELINE_TOKEN. Until then, a change with a bound clinical artifact fails closed.
  • Supply-chain register (platform/supply-chain): propose entries for the cosign and registry images, as tools of the pipeline like Trivy and Gitleaks.
  • ISE contract session: take api/release-pipeline.v1.openapi.yaml into contracts/ise compatibly.
  • platform/network-protection: give test/testbed/Dockerfile a non-root USER (DS-0002), or keep it out of a production path.
  • Service template: add PolicyCheck.withAttributes and the errors extension of HisException to the template's kit, now that three units carry them. Also add the lz4/snappy constraint (RC-1-S14's follow-up).

Final check results

HIS_SESSION=RC-1-S19 platform/delivery-pipeline/scripts/ends-when.sh, on 2026-11-25. It passed:

  1. The unit, module, kit and contract tests (./gradlew build).
  2. bin/self-test.
  3. TEST-ISE-024 on this unit, from a scratch clone tagged v0.0.0-ends-when, against a scratch registry:
  4. his/delivery-pipeline was built from the tag (sha256:78196ef4…);
  5. it was refused while unsigned;
  6. it was signed with its SLSA provenance and verified;
  7. it was rebuilt from the tag to the same digest;
  8. the complete manifest passed and an incomplete one was refused.
  9. Only platform/delivery-pipeline/, this handover, ADR-HIS-066 and the decision record index changed.