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¶
- The change records are part of the releases service, module
mod-ise-005. MigrationV2__change_records.sqladds the change record, its history and its outbound requests: - 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).
- The policy resource is
ise.ChangeRecord, with actionsise.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.
- creation, scheduling, closure and review as
- A migration of this unit is additive only, and adds no constraint to an earlier version's table.
change_record.release_refhas no foreign key torelease: the service checks that the release exists. The upgrade test found that a foreign key there breaks the previous version, whose tests truncaterelease(point 8). - The change record is part of the release's gate. The gate is computed with the change record the release names:
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.
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.
- Both codes block production only: the compatibility checks run in pre-production (WF-ISE-002 step 5).
- Event schema compatibility is otherwise the contract check that the release's
contract-testsevidence holds. A release manifest names no event schema type. - Production follows the change record.
- Approving production needs the change record Approved or Scheduled, besides an empty gate.
- Deploying to production needs it Scheduled, so its release notice went out (part 5).
- A change with an outage is deployed within its maintenance window, or under its approved exception (part 4).
- Only the recorded recovery plan is executed (part 6, section 3).
authorizeRecoveryis a person's decision. It names a kind that must be the change record's plan, so an irreversible migration is never rolled back.- The pipeline's
recordRecoveryneeds an authorization that has not been used yet. - After a failed production health check, the change cannot be recorded as Implemented.
record-failed-recoveredneeds the release to be Rolled Back (outcome prior behaviour) or Forward-Fixed (corrected behaviour), which is AC-03. - Release notices, and the review task. The notification is
ise.release-notice, one per stakeholder: a stakeholderrole:<role>oruser:<account>is that recipient, and any other is a team. - 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).
- 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_requestin the change's transaction. They are sent afterwards, and again everyhis.ise.release.notice-retryuntil D10 takes them. A recorded implementation is never refused because a notice could not be sent. - Each request has a name-based UUID as its Idempotency-Key (change, kind, recipient), so a retry never sends twice.
- The emergency path (part 7, BR-ISE-021, PR-REL-003-3).
- An emergency change is approved with
approve-emergencyonly, and a normal change never with it. The approval creates theise.retrospective-reviewtask inise.release-management. - The change is closed only once its review is recorded, after the change.
- The review is due
his.ise.release.retrospective-review-daysafter creation, 7 by default. The specification names no period, and 7 days is the contract's own example. - 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: - 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.
- 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.
- the new version migrates a scratch database (
- For each contract folder given, it runs
his-contract checkagainst the previous version. - 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.
- 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.
- Contract submission to the catalogue is not built here. contract-catalogue.v1
submitContractVersionneeds an owner, a purpose, a data classification and a support contact. No contract folder carries these, andcontract.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.*andise.release.authorize-recovery. D10 needs: - the notification type
ise.release-notice; - the task type
ise.retrospective-reviewand queueise.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.