Public: anyone can read this; the crew can change it.
POST /api/v1/admin/releases/:sha/rollback plans, then rolls the forge back to a kept release, with the releases page's rules #7217
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: a forge admin's script or harness can roll back a bad release over the API. It stays deliberate: a plan first, then an explicit apply.
Today only
/releases(src/web/pages/releases.ts:93-100) and the terminal (src/tui/screens/releases.ts:121) callrollBackTo./releases.jsononly reads.Done:
src/http/api/rollback.ts, registered with one line besidereportRoutes.POST /api/v1/admin/releases/:sha/rollbackwith{ "dryRun": true }(the default) answers from which release to which, and whethercanRollBackToallows it, and changes nothing. WithdryRun: falseit callsrollBackToand answers the receipt.src/http/admin_gate.ts) already refuses a non-admin withnot_admin. In addition, a token without admin scope isforbidden, an unknown or not-kept sha isnot_found, and a release the live schema forbids is 409 with the page's words.src/contract/openapi/routes/), andtest/openapi.test.tspasses.test/api-rollback.test.tscovers: the plan answers and nothing moves, a member and anrwtoken are refused, and an unknown sha isnot_found.Files:
src/http/api/rollback.ts, one OpenAPI route file, one test. Risk: medium. This touches self-deploy. ReuserollBackToandcanRollBackTofrom the release gate unchanged.