feat: the deploy rail's second half — promotion, rollback, and the Phase 9 skeletons - #39
Merged
Merged
Conversation
…ase 9 skeletons GOLD-STANDARD promised rollback plans (Phase 8) and incident runbooks (Phase 9); the kit shipped only deploy-dev.yml, which reaches the development environment and stops. deploy-promote.yml closes that gap across the core and both CI/CD packs. It is manual-trigger only, and the go/no-go is the target environment's own approval mechanism (GitHub required reviewers, Azure DevOps environment checks) rather than logic invented in a workflow file — the client's security team can already audit it, and it cannot be edited away without branch protection noticing. Two rules that were prose are now mechanical: the workflow refuses to run against a target environment with no approver configured, and refuses to promote a build the source environment has never run. Both failures previously looked exactly like success. The platforms diverge on one point, deliberately. GitHub's `environment:` key creates a Deployment record queryable by environment name, so that pack asks the API directly. Azure records deployments against an environment id behind a separate service area, so that pack has the deploy stamp `deployed-<env>` on the CI build and the promotion require it. Same governance rule, each realized in the idiom its platform makes reliable — which is what the two-axis pack model is for. Three skeletons ship alongside: ROLLBACK.md (the written "roll back if X", and the question teams skip — what a rollback does *not* undo), ALERTS.md, and INCIDENT-PLAYBOOK.md. Documents with reusable structure get a skeleton; records of an event do not, so the go/no-go record and drill log stay drafted from the real system. Also fixes drift found on the way in: both pack copies of deploy-dev.yml still hard-failed every merge, having never received the DEPLOY_WIRED guard the core file gained. The pack copies are what clients actually install. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes part of #11 (the promotion/rollback half; the dependency axis is #11's other half, in the follow-on PR).
GOLD-STANDARD promised rollback plans (Phase 8) and incident runbooks (Phase 9). The kit shipped
deploy-dev.yml, which reaches the development environment and stops.What this adds
deploy-promote.ymlacross the core and both CI/CD packs. Manual trigger only. Two rules that were prose are now mechanical:The go/no-go is the platform's own approval mechanism (GitHub required reviewers, Azure DevOps environment checks) rather than logic in a workflow file — the client's security team can already audit it, and it can't be edited away without branch protection noticing.
Three closing-phase skeletons:
ROLLBACK.md,ALERTS.md,INCIDENT-PLAYBOOK.md. Documents with reusable structure get one; records of an event don't, so the go/no-go record and drill log stay drafted from the real system.ROLLBACK.mdforces the question teams skip — what a rollback does not undo. Code reverts cleanly; a destructive migration or a published message does not, and the restored version may not understand the data it finds.The platform split, deliberately
GitHub's
environment:key creates a Deployment record queryable by environment name, so that pack asks the API. Azure records deployments against an environment ID behind a separate service area, so that pack has the deploy stampdeployed-<env>on the CI build and the promotion require it. Same governance rule, each realized in the idiom its platform makes reliable — which is what the two-axis pack model is for.Coupling worth knowing: removing the tagging step from the Azure
deploy-dev.ymlmakes dev a dead end — nothing becomes promotable. Called out in that pack'sRAILS.md.Drift fixed on the way in
Both pack copies of
deploy-dev.ymlstill hard-failed every merge, having never received theDEPLOY_WIREDguard the core file gained. The pack copies are what clients actually install.Test plan
python scripts/check_standard.py— no drift (193 rooted paths, 81 enumerated components)python -m pytest scripts/tests -q— 46 passingNot yet proven, and the standard is explicit that this is what counts: none of it has been made to fail on purpose.
docs/the-rails.md§9 — a rail that has never failed safely has not been proven. The three new drills are inRAILS.md; the promotion gate and the skip-an-environment refusal both need exercising against a real repo.Two things I could not verify and did not pretend to: whether
GITHUB_TOKENcan read environment protection rules under every repo visibility, and the exact Azure RESTapi-versionbehaviour. Both fail closed with messages that distinguish "no gate configured" from "couldn't check", and both are flagged in-file as rehearsal-verified.🤖 Generated with Claude Code