feat(frontdoor): instant rollback — re-point to a prior release's immutable image - #39
Merged
Conversation
…utable image
Completes the Vercel/Heroku deploy ergonomic trio (push -> preview -> promote -> ROLLBACK). Rollback
was only implied by the promotion gate; now it is real, and better than a plain PaaS's, because every
deploy is a content-addressed immutable image (a data sphere):
tools/release_ledger.py — a sealed release ledger + instant rollback:
- a release binds (tenant, app, branch, image_digest, workload); a successful deploy records one.
- rollback re-points to a PRIOR release's already-built digest: NO rebuild (instant) and reproducible
(the digest guarantees you get back exactly the bits that ran — not "rebuild an old ref and hope").
- FAIL-CLOSED: you can only roll back to a release that actually ran here; a target image that was
never built+deployed is blocked and never served. Rolling forward still goes through the promotion
gate; rollback to a known-prior-good release is the fast, sealed, audited escape hatch.
- a rollback is itself a new auditable head release (links from->to), so you can roll again either way.
- history filenames carry a monotonic sequence so ordering is deterministic regardless of clock
resolution (two releases in the same microsecond must not sort by their hash-based id).
- real CLI: `release_ledger.py history|current|rollback <tenant> <app> [--to-digest|--steps]`.
push_webhook.handle_push now records a release on every successful deploy (optional ledger_dir; the
HTTP receiver passes artifacts/releases) — so real pushes accrue the history rollback operates on.
Wired: capd/instant-rollback.mesh.capd.json (caps.dev.instant-rollback, composes_with git-push-deploy
+ git-push-webhook); validate.py; Makefile `rollback`; docs/BUILD_DEPLOY.md documents the full trio.
Tests: +12 (10 ledger + 2 webhook-integration) = 209 tools tests green.
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.
What
Completes the Vercel/Heroku deploy ergonomic trio:
push → preview → promote → **rollback**. Rollback was only implied by the promotion gate; this makes it real — and better than a plain PaaS's, because of a property the stack already guarantees:So a release is a sealed record binding
(tenant, app, branch, image_digest, workload), and rolling back is re-pointing to a prior release's already-built digest.Why it's better than a plain PaaS rollback
Design
tools/release_ledger.py— pure, file-backed core (make_release/history/current/rollback) + a real CLI (history|current|rollback <tenant> <app> [--to-digest D | --steps N]).push_webhook.handle_pushnow records a release on every successful deploy (optionalledger_dir; the HTTP receiver passesartifacts/releases) — real pushes accrue the history rollback operates on. Failed builds are not releases.Wired in
capd/instant-rollback.mesh.capd.json(caps.dev.instant-rollback, composes_withgit-push-deploy+git-push-webhook)validate.py,Makefile rollback,docs/BUILD_DEPLOY.md(documents the full trio)Tests
+12 (10 ledger + 2 webhook-integration) = 209 tools tests green. 1-step rollback re-points with no rebuild; rollback to a specific prior digest; rollback to a never-built image blocked (fail-closed, current unchanged); no-history blocked; rollback-to-current no-op; rollback is a new linked head; only successful deploys become releases; records sealed.
🤖 Generated with Claude Code