Home / Engineering / Rollback plan
Rollback plan
How we undo a bad deploy in one step, who does it, and how we test that it works.
Updated 18 November 2026
- Automatic. The deploy guard runs every 30 minutes. It runs 32 public smoke checks (key pages, APIs, signatures, TLS, a real browser at 390 and 1440 px). If they fail twice in a row, it commits the files of the last passing commit back, and Cloudflare Pages deploys that in one to two minutes.
- One click. In Cloudflare Pages (Deployments), the owner picks the last good deployment and chooses Rollback. It takes effect in seconds. The guard can do the same through the Cloudflare API once a Pages-scoped token is set.
- From git. Revert the bad commit on the site branch and push. Same deploy path, one to three minutes.
- Data only. Each daily dataset is kept with its SHA-256 in /data/snapshots/. Restoring one is a copy of that file.
Tested
- 18 Nov 2026: smoke checks run with an injected failure: 22 of 22 real checks passed and the injected failure was caught (exit code 1).
- 18 Nov 2026: git revert of the newest change on a clean copy of the site branch: 32 files restored, worker bundle built without errors, in 4.3 seconds; then aborted, nothing pushed.
- Real rollback on record: 5 November 2026, after 2 of 32 checks failed on a project page; 173 files restored, then 32 of 32 checks passed.
Last guard result: pass on 18 November 2026 (32 of 32 checks). Deploys checked: 200. Full record: /data/deploys.json.
/open/deploy-guard.py · /open/deploy-smoke.mjs · /open/pre-push.sh