Skip to content

Architecture / Decision records / ADR-HIS-103

ADR-HIS-103 Change records in the releases service: the change record gates production, only the recorded recovery plan is executed, release notices go out before the change or the change is not scheduled, and the upgrade test runs the previous version on the new schema

Status Accepted
Decided 2026-11-29 by session RC-3-S12
Record Drafted 2026-11-29; approved 2026-11-30 by the Enterprise Architecture Board
Where the rule lives platform/delivery-pipeline/ (mod-ise-005/, package change, ports/, release/Gate.java, V2__change_records.sql; lib/upgrade.py, bin/upgrade-test; service-kit/src/testFixtures/.../HisTestDatabase.java; README.md, "Change records" and "The upgrade test")

Context

RC-3-S12 builds FR-ISE-REL-003: upgrades with compatibility, rollback or forward-fix plans, and change communication. It extends the releases service of ADR-HIS-066 (RC-1-S19). The contract of RC-3-S03 (ADR-HIS-085) fixes what the unit offers: releases.v1 1.1, with createChangeRecord, listChangeRecords, readChangeRecord, decideChangeRecord, transitionChangeRecord, recordRetrospectiveReview, readChangeFailureRate and authorizeRecovery, and the gate codes recovery-plan-missing and mixed-version-incompatibility.

The contract and the specification leave open: - how the change record and the release gate meet; - when a release notice must have gone out; - what happens when D10 is down at the moment a change is recorded; - how the pipeline shows that a migration runs beside the previous version; - the retrospective review's due date; - the time zone of the maintenance window; - how a contract is submitted to the catalogue.

Decision

  1. The change records are part of the releases service, module mod-ise-005. Migration V2__change_records.sql adds the change record, its history and its outbound requests:
  2. The columns that are filtered or counted are table columns. The rest of DE-ISE-014 is a JSON document in the camelCase of releases.v1, as for the release (ADR-HIS-066).
  3. The policy resource is ise.ChangeRecord, with actions ise.change.*. Approvals, closure and the retrospective review are by a person. Every step is in the change record's history with actor and time, and audited:
    • creation, scheduling, closure and review as ise.config.changed;
    • approval and emergency approval as ise.release.approved;
    • implementation as ise.release.deployed;
    • a recovered failure as ise.release.rolled-back.
  4. A migration of this unit is additive only, and adds no constraint to an earlier version's table. change_record.release_ref has no foreign key to release: the service checks that the release exists. The upgrade test found that a foreign key there breaks the previous version, whose tests truncate release (point 8).
  5. The change record is part of the release's gate. The gate is computed with the change record the release names:
  6. recovery-plan-missing (PR-REL-003-1, PR-REL-003-2) when:
    • no change record is attached or recorded;
    • the record has no plan;
    • an irreversible migration is not a forward-fix with a verified backup reference.
  7. mixed-version-incompatibility (parts 2 and 3, section 10) when:
    • compatibility evidence is missing that the release's manifest asks for (schema migrations, FHIR profiles, clinical templates present);
    • a compatibility test failed;
    • a rolling change has a migration or event schema change not tested in mixed-version operation.
  8. Both codes block production only: the compatibility checks run in pre-production (WF-ISE-002 step 5).
  9. Event schema compatibility is otherwise the contract check that the release's contract-tests evidence holds. A release manifest names no event schema type.
  10. Production follows the change record.
  11. Approving production needs the change record Approved or Scheduled, besides an empty gate.
  12. Deploying to production needs it Scheduled, so its release notice went out (part 5).
  13. A change with an outage is deployed within its maintenance window, or under its approved exception (part 4).
  14. Only the recorded recovery plan is executed (part 6, section 3).
  15. authorizeRecovery is a person's decision. It names a kind that must be the change record's plan, so an irreversible migration is never rolled back.
  16. The pipeline's recordRecovery needs an authorization that has not been used yet.
  17. After a failed production health check, the change cannot be recorded as Implemented. record-failed-recovered needs the release to be Rolled Back (outcome prior behaviour) or Forward-Fixed (corrected behaviour), which is AC-03.
  18. Release notices, and the review task. The notification is ise.release-notice, one per stakeholder: a stakeholder role:<role> or user:<account> is that recipient, and any other is a team.
  19. No notice, no schedule. The notice before the change is sent when the change is scheduled. If the D10 notification service cannot take it, the change is not scheduled (503).
  20. The completion notice and the review task are sent even when D10 is down. The completion notice (implemented, or failed and recovered) and the retrospective review task of an emergency change are written to outbound_request in the change's transaction. They are sent afterwards, and again every his.ise.release.notice-retry until D10 takes them. A recorded implementation is never refused because a notice could not be sent.
  21. Each request has a name-based UUID as its Idempotency-Key (change, kind, recipient), so a retry never sends twice.
  22. The emergency path (part 7, BR-ISE-021, PR-REL-003-3).
  23. An emergency change is approved with approve-emergency only, and a normal change never with it. The approval creates the ise.retrospective-review task in ise.release-management.
  24. The change is closed only once its review is recorded, after the change.
  25. The review is due his.ise.release.retrospective-review-days after creation, 7 by default. The specification names no period, and 7 days is the contract's own example.
  26. The upgrade test, bin/upgrade-test, produces the compatibility evidence (parts 2 and 3, AC-01, TEST-ISE-025). Its JSON goes into the change record. It runs three checks:
  27. It reads every migration the change adds, and fails one that edits or removes a merged migration. A drop, rename, type change or new NOT NULL column without a default is incompatible with a rolling release. A drop, truncate, delete, update or type change is irreversible.
  28. For a Java unit, it runs the previous version beside the new schema:
    • the new version migrates a scratch database (HIS_TEST_DATABASE_KEEP);
    • the previous version's own tests run on copies of it (HIS_TEST_DATABASE_TEMPLATE);
    • only the new test database fixture goes into the previous version's tree;
    • Flyway ignores the migrations that the previous version does not know.
  29. For each contract folder given, it runs his-contract check against the previous version.
  30. The change failure rate counts the changes that ended in the period. A change ends when it is implemented or when its failure is detected. The rate is failed changes over total, to four decimals.
  31. The maintenance window of CFG-ISE-022 is configuration.
    • The default is Sunday 01:00 to 05:00, at most 4 hours. Changes are announced 7 days ahead, or 24 hours ahead for an emergency.
    • The window is in the deployment's zone, his.ise.release.window.zone, by default Asia/Jakarta. CFG-ISE-022 is set per facility, and releases are enterprise-scoped.
    • The rule "once a month" is not enforced. It is a property of the calendar of windows, not of one change.
  32. Contract submission to the catalogue is not built here. contract-catalogue.v1 submitContractVersion needs an owner, a purpose, a data classification and a support contact. No contract folder carries these, and contract.yaml's schema (FN-S04) admits no such block. The catalogue (RC-3-S13) is to serve from the contract folders. Inventing these fields would put data into the catalogue that traces to nothing (session rule 3).

Consequences

  • RC-3-S13 can read the change failure rate, and a release console (UI-ISE-007, UI-ISE-005) can show every change record operation of releases.v1, all served and verified.
  • The D10 policy needs the actions ise.change.* and ise.release.authorize-recovery. D10 needs:
  • the notification type ise.release-notice;
  • the task type ise.retrospective-review and queue ise.release-management;
  • this unit's client for both.
  • recovery.v1 readBackupSet (RC-3-S17) must answer before an irreversible migration can be approved. Until then such a change fails closed (503).
  • Every later migration of a unit can be shown compatible by bin/upgrade-test. A release job (follow-up of ADR-HIS-066) runs it and attaches its evidence to the change record.