Skip to content

ci(docs): add a manual Cloudflare rollback workflow - #267

Merged
os-project-manager merged 1 commit into
mainfrom
claude/pm-dispatch-objectos-cw8i2u
Sep 4, 2026
Merged

ci(docs): add a manual Cloudflare rollback workflow#267
os-project-manager merged 1 commit into
mainfrom
claude/pm-dispatch-objectos-cw8i2u

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Refs #261, #266

Incident recovery tooling, added on the maintainer's direct instruction (2026-09-04, verbatim: 「你先回滚试试」) while the production docs site is down.

Why git cannot fix a bad docs deploy

Cloudflare rejects an oversized upload at version creation. Two consequences, and the second is the one that traps you:

  1. A failed deploy rolls nothing back — the previously accepted version simply keeps serving. That is why the site stayed up, stale, through 36 red deploys.
  2. Once a bad version has been accepted, reverting the offending commit rebuilds a bundle that gets rejected again — so the bad version stays live. The revert removes the fix and does not restore the site.

So recovery has to happen Cloudflare-side against a version id, and until now there was no path to that which did not require a human holding the account credentials.

What this adds

A workflow_dispatch-only workflow. It does not run on push and touches no deploy-trigger path, so merging it does not deploy anything.

  • Dispatched with version_id empty — lists versions and current deployment status, changes nothing. The rollback target comes from a reading rather than a guess.
  • Dispatched with an explicit version_id — validates it is a UUID before it reaches a command line, rolls back, then prints what is serving afterwards.

It mirrors deploy-docs.yml's environment: cloudflare-docs block deliberately: it draws the same credentials, and a required-reviewer rule added to that environment (#266) will gate this workflow too.

Deviations, stated

🤖 Generated with Claude Code

https://claude.ai/code/session_01GkauAsZBEemRbco2rEX9Lx


Generated by Claude Code

A bad docs deploy cannot be recovered with git. An upload that Cloudflare
rejects never becomes a version, so the previously-accepted version keeps
serving; and once a bad version IS accepted, reverting the commit only
rebuilds a bundle that gets rejected again, leaving the bad version live.
Recovery is therefore Cloudflare-side, and until now there was no path to
it that did not require a human to hold the account credentials.

Manual dispatch only. With no version_id it LISTS versions and changes
nothing, so the target is chosen from a real reading rather than guessed;
it rolls back only when given an explicit id, which is validated as a UUID
before use.

Deliberately mirrors deploy-docs.yml's environment block so it draws the
same cloudflare-docs credentials — and so that a required-reviewer rule
added to that environment (objectos#266) gates this too.

Refs #261, #266

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GkauAsZBEemRbco2rEX9Lx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant