A failed-release walkthrough
1. Optimize time to first evidence
Measure queue and execution time, cache safely, split independent checks, and place deterministic high-signal failures before expensive suites. For Optimize time to first evidence, establish queue time and time to first failure as the primary evidence and publish its expected range before rollout. During a controlled exercise, publish a deliberately unhealthy canary; compare the resulting customer-visible behavior with the written promise. Review hosted runner minutes and cache storage during capacity and budgeting work, because a technically successful control can still be economically wrong. The acceptance record should name an owner, preserve the observation, and state when the decision must be revisited.
2. Build once and promote
Publish an immutable digest with source revision, dependencies, SBOM, signature, and test attestations, then promote without recompiling. Build once and promote should be reviewed through test duration, flake rate, and reruns, not through a screenshot of one successful run. Rehearse the boundary by choosing a safe environment and then revoke registry access during promotion. Document containment and recovery in the same language operators see during an alert. Include artifact, log, and test-report retention in the trade-off, and retain enough evidence to show whether the observed result came from the design or an unrelated dependency.
3. Pin workflow dependencies
Reference third-party actions and tools by reviewed immutable versions and use automated update review to avoid silent supply-chain change. Turn Pin workflow dependencies into a falsifiable operating claim. Instrument deployment frequency and failed-change rate, define failure before running the test, and attempt deployment with an unsigned digest. A reviewer should be able to connect the signal to one business consequence and one recovery action without private team knowledge. Account for engineer delay waiting for low-value suites; otherwise the architecture may shift expense into support, response labor, or another service while appearing inexpensive on its own dashboard.
4. Minimize pipeline privilege
Give pull-request checks read-only access and grant short-lived environment-specific deployment identity only to protected promotion jobs. The verification plan for Minimize pipeline privilege begins with canary SLO, business guardrails, and rollback time measured across ordinary and peak traffic. Next, roll application code back across an expanded schema and inspect both the immediate symptom and the state left after recovery. Keep the runbook specific about authority, evidence, and rollback. Re-estimate idle canary capacity and release tooling when volume, regions, or ownership change, because limits selected for the first deployment rarely remain neutral as the system grows.
A useful pipeline shortens the time between a change and trustworthy evidence about that change. Continuous integration means small changes merge frequently after automated checks. Continuous delivery keeps a releasable artifact ready; continuous deployment automatically promotes every qualifying change. None of these require one giant YAML file, and faster deployment is not permission to weaken release safety.
Imagine a release that passed tests but failed after promotion because the pipeline rebuilt the image in production with a newer transitive dependency. Rollback selected the old tag, but that mutable tag now pointed to the new image. The technical root was lost artifact identity; the process root was treating environments as separate builds. Build once, identify the artifact by digest, attach provenance and test evidence, and promote that exact digest.
name: verify
on:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: {node-version: 22, cache: npm}
- run: npm ci
- run: npm test
- run: npm run buildThis GitHub Actions example gives the job read-only repository permission and installs from the lockfile before testing and building. Production workflows should pin third-party actions to reviewed commit SHAs, use short-lived workload identity, and publish an immutable artifact rather than rebuilding later.
Order feedback by speed and diagnostic value. Formatting, types, unit tests, secret checks, and policy can finish early; integration, browser, and performance suites can follow in parallel where capacity allows. Quarantine is not a permanent home for flaky tests. A test that sometimes lies taxes every change and trains people to ignore red builds.
Deployment should separate release from exposure. A canary or progressive rollout sends a controlled traffic share to the new version and compares user signals. Feature flags can disable behavior without reverting a binary, but they need ownership and removal dates. Database changes should use backward-compatible expand-and-contract steps because application rollback cannot undo a destructive schema migration.
Feedback and promotion controls
- Protect untrusted contributions: Do not expose secrets to fork code or execute attacker-controlled scripts in a privileged workflow context. Treat queue time and time to first failure as the release gate for Protect untrusted contributions, with thresholds derived from the user journey rather than a vendor default. Prove degraded behavior when you publish a deliberately unhealthy canary, including what an operator can see before customers report it. The design review must compare hosted runner minutes and cache storage with the consequence of a missed or delayed operation. Record exceptions explicitly so emergency action does not silently become permanent configuration.
- Make failures diagnosable: Preserve concise logs, test reports, changed inputs, artifact identifiers, and rerun reason while redacting tokens and customer data. A production acceptance test for Make failures diagnosable should capture test duration, flake rate, and reruns before, during, and after recovery. In the fault phase, revoke registry access during promotion; in the review phase, reconcile durable state rather than stopping when the process turns green. Model artifact, log, and test-report retention at current load and forecast peak. This makes the decision reversible: later teams can see why the limit existed and what evidence would support changing it.
- Control environment promotion: Use approvals for consequence rather than ceremony, concurrency locks, immutable inputs, and an audit trail linking actor to deployment. Use Control environment promotion to connect implementation detail with operations. Dashboard deployment frequency and failed-change rate, but keep the underlying event or state available for investigation. Then attempt deployment with an unsigned digest in a bounded drill and have someone outside the implementing team follow the runbook. Compare the resulting risk reduction with engineer delay waiting for low-value suites. Passing means the system behaves predictably and the responder can explain why, not simply that an automated check returned success.
- Use progressive exposure: Canary by traffic or cohort, compare SLO and business guardrails, and automatically halt without blindly rolling back stateful changes. Before approving Use progressive exposure, ask which assumption is most likely to expire. Baseline canary SLO, business guardrails, and rollback time, then roll application code back across an expanded schema without changing several variables at once. Capture timelines and identifiers needed to reconstruct the event. Budget explicitly for idle canary capacity and release tooling, including human ownership that provider calculators omit. Schedule review after material traffic, dependency, or policy changes so the control remains aligned with its original business purpose.
- Evolve databases compatibly: Add new schema first, deploy dual-compatible code, backfill with controls, switch reads, and remove old structure in a later release. Operational evidence for Evolve databases compatibly comes from queue time and time to first failure correlated with a representative transaction or workflow. Validate it when you publish a deliberately unhealthy canary, checking partial success and delayed recovery rather than only total outage. Discuss hosted runner minutes and cache storage with product and finance owners where the consequence is material. The final runbook should state the safe manual action and the conditions under which automation must stop and request judgment.
- Prepare rollback and roll-forward: Document which changes can revert, which need a corrective release, and how queues, caches, flags, and schemas behave during transition. For Prepare rollback and roll-forward, separate prevention from detection. Use test duration, flake rate, and reruns to discover drift from the intended behavior, and revoke registry access during promotion to prove containment. Recovery should preserve auditability and avoid converting one failure into duplicates, data loss, or uncontrolled load. Compare that protection against artifact, log, and test-report retention. A concise decision record should link configuration, test evidence, dashboard, and accountable owner so the control survives staff rotation.
- Secure runners and artifacts: Use ephemeral isolated runners where risk requires, scan outputs, restrict registry writes, sign artifacts, and verify signatures at deployment. Secure runners and artifacts is ready only when deployment frequency and failed-change rate can be interpreted by the on-call engineer without reverse-engineering implementation internals. Run a game day in which you attempt deployment with an unsigned digest, and require an explanation of impact, state, and next action. Track engineer delay waiting for low-value suites separately from normal application spend so reliability overhead remains visible. If the drill needs privileged improvisation, improve the interface or runbook before increasing automation.
- Run a failed-release game day: Inject a bad health signal in a staging rollout and verify detection, promotion halt, communication, recovery, and evidence retention. Close the Run a failed-release game day review with a recovery proof. Observe canary SLO, business guardrails, and rollback time, roll application code back across an expanded schema, and verify the final business records against their authority. Report idle canary capacity and release tooling beside latency and correctness rather than after the architecture is committed. Keep an explicit exit condition: if evidence, platform capability, or economics change, the team should be able to simplify or replace this mechanism without losing the contract it protects.
Pipeline security and deployment references
The GitHub Actions documentation defines the platform or specification behavior used in this design. The GitHub secure use reference provides a second primary reference for implementation limits and operating guidance. These sources support the guarantees described here; product policy and risk decisions remain specific to the organization.
A compact operating model
commit -> fast checks -> immutable artifact -> protected promotion -> canary -> wider exposureFeedback comes before packaging, and the package is built only once. Promotion changes exposure to the same digest, allowing a canary decision to use trustworthy identity and evidence.



