跳到正文
cccskills
免费在 GitHub 公开

rollback-runbook

Use before and after calling rollback_release - what a rollback restores per delivery mode, when a schema change makes a code rollback unsafe, how to work and report manual_steps, and what to do when rollback_release refuses

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Rollback runbook

rollback_release always reverts the release's task merge commits on the default branch and pushes that revert — production can never ship the bad change again, whatever else happens. What restores the RUNNING service depends on the component's delivery mode:

  • dispatch — the previous good release's commit is tagged and the deploy workflow is dispatched at it (Mechanism: workflow_dispatch). No previous release: it dispatches at the revert commit instead.
  • on_merge — the revert push itself is the redeploy (Mechanism: revert_push); there is nothing else to trigger.
  • batch (desktop, mobile) — nothing is redeployed. Status goes straight to rolled_back: a published desktop build or a store build cannot be unpublished by reverting a git commit, so there is no redeploy for watch_release to follow. See batch-artifact-verification for the yank step.

For dispatch/on_merge, Status becomes rolling_back and you are expected to call watch_release again to follow the redeploy through to rolled_back.

Before you roll back: check what schema the release changed

A code revert is not automatically safe. For each task in release.tasks, get_task_pull_request({ task_id, include_diff: false }) to list files, then look for migration paths: migrations/, db/migrate/, prisma/migrations/, alembic/versions/, V*__*.sql, *.up.sql. Read the up file (get_task_pull_request with the diff, or read_file) for any match.

  • Additive — CREATE TABLE/CREATE INDEX, ADD COLUMN that is nullable or has a constant default: reverting the code is safe. The previous version simply ignores the new objects — leave the schema in place; do not drop what the forward migration added.
  • Destructive or renaming — DROP COLUMN/DROP TABLE, RENAME COLUMN/RENAME TABLE, ALTER COLUMN TYPE, SET NOT NULL on an existing column: the previous version may not run against this schema at all. If the task's rollback_plan covers it, follow the plan exactly. Otherwise do not call rollback_release — comment the evidence plus "a code rollback would run the previous version against a schema it does not know — needs a human: forward fix or a down-migration first", and stop.

This is the parallel-change pattern (DORA): decouple a database change from the application change that depends on it, so either one can revert on its own. A migration that only adds is reversible by the code revert alone; one that removes or reshapes is not, unless a plan already accounted for it.

What a revert cannot undo

git revert undoes code. It does not:

  • reverse a database migration,
  • turn a feature flag back off,
  • purge a CDN or cache,
  • roll back a third-party configuration change,
  • un-send a webhook, an email, or anything else the code triggered while it ran.

rollback.manual_steps is exactly this list, built from each rolled-back task's own rollback_plan/before_deploy/after_deploy fields — the developer who made the change is the only one who knew which of these applied.

Batch releases add one more, first

For a batch release, manual_steps puts one entry ahead of the tasks' own: unpublish or halt the artifact the revert cannot touch. See batch-artifact-verification for the exact commands. Treat it like any other manual step: perform it if you can, report it if you cannot, and put it first in your report — it is the step that actually stops the bad build reaching more users, not the code revert.

Work through it

  1. Read every item in manual_steps.
  2. Perform every one you can with the tools you have — most manual steps are outside this system's reach (a third-party console, a human-run command) and are for a human; release-terminal-scope names the one write you may make yourself.
  3. Say explicitly, on the card, which ones you performed and which you could not, and who has to finish them.

✅ "Reverted the code (revert a1b2c3d). Left for a human: migration 043 added tasks.priority (NOT NULL DEFAULT 'medium'); the previous version ignores it, so it stays — dropping it would discard values written since the deploy. T-12's after_deploy enabled flag new_pricing: turn it off in the flag console. T-14 recorded no rollback plan."

❌ "Rolled back; the column added by migration 042 needs a human to drop it." — additive columns are not dropped; see "Before you roll back" above.

A rollback reported as complete when half of it was not is worse than one that admits what it did not do — the next release will ship on top of whatever was left half-undone.

No plan recorded

If a rolled-back task recorded no rollback plan at all, say that too. The absence is a finding for whoever reviews this release next, not something to paper over with "nothing else to do here".

When rollback_release refuses

Do not retry — a refusal here is final the same way a merge refusal is (board_rollback_release_refused):

  • Too old (more than 24h since it was released) or a newer release already shipped — production now runs something newer than what you'd be rolling back to. One comment saying so, and that this needs a forward fix as a new task (a human or PM call), then stop.
  • A newer release is open — resolve that one first; leave this one alone.
  • verifying or deploying — the sweeper will hand it back to you at the right moment; stop and let it.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

Use when the diff adds or changes an endpoint, resolver, RPC, job or query that takes an object id, a role check, a request binding or a tenant filter - BOLA/IDOR, function-level authorization, mass assignment and tenant scoping

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

Use on every UI change - semantic HTML, labels for controls, keyboard-navigable dialogs/menus, visible focus, and never color as the only signal

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

Use when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

How to work a task returned with review, QA or UAT findings. Use when a task is in need_revision or PR review comments are in your context.

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

Use when the repository keeps its alerting in code, or a person asks for alerts outside TaskTrooper - PrometheusRule YAML, a Cloud Monitoring alert policy in Terraform, a Datadog monitor, each routed to TaskTrooper's alert ingest URL so it opens an incident here

中文简介正在准备中。当前显示原文说明。

makifbaysal/tasktrooper1172026年10月18日 更新

查看 makifbaysal 的全部技能

报告此技能的问题