Release promotion and rollback
Release promotion moves an already verified artifact through environments. Rollback restores a previously accepted configuration or version when a release violates health or correctness gates. Promote by immutable artifact digest and verify that the same bytes tested are the bytes deployed. Require review, recorded test results, migration compatibility and environment-specific authorization. A canary exposes a limited share of traffic and compares error, latency and business signals under explicit sample and stop rules. Rollback of an application does not undo database writes; use compatible migrations, recovery plans and reconciliation. Keep credentials and production endpoints out of training fixtures. Do not use a mutable tag as sole artifact identity or automatically reverse a destructive migration during an app rollback. Sources: https://docs.github.com/en/actions/how-tos/secure-your-work/use-artifact-attestations/use-artifact-attestations, https://kubernetes.io/docs/concepts/workloads/controllers/deployment/.
Formal Syntax & Structure
Verify promotion identity and gates (conceptual contract; see example)Working Example
import assert from 'node:assert/strict';import {createHash} from 'node:crypto';const digest=s=>createHash('sha256').update(s).digest('hex');function allowed(tested,candidate,approved){return approved===true&&digest(tested)===digest(candidate);}assert.equal(allowed('v1','v1',false),false);console.log(allowed('v1','v1',true),allowed('v1','v2',true));