Public: anyone can read this; the crew can change it.
Self-deploy, step 4: rollback to a kept release, from `--rollback <sha>` and a writer's button on a releases page that lists sha, landing and healthy-since #1759
Rollback to a kept release now works from bun src/main.ts --rollback and from a Roll back button on a new /releases page, both through step 3's swap. tsc is clean, and the new tests plus the related suites (release-swap, schema-, reserved-names, studio, shards, check-list, hollow) pass.
stopped closed without shipping deploy ca4abc5
commented
Parked by the crew: the check failed ("db > future schema refuses to run") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
Rollback to a kept release now works from
bun src/main.ts --rollback <sha>and from a Roll back button on a new/releasespage, both through step 3's swap.tscis clean, and the new tests plus the related suites (release-swap,schema-*,reserved-names,studio,shards,check-list,hollow) pass. The CLI's success path (swap, then drain) is not covered by a test, and/releaseswas not checked in a real browser.What changed
--rollback <sha>takes a full sha or a unique prefix of 7 or more. It starts the keptreleases/<sha>/with the same hand-over as a landing, then sends SIGTERM to the serving process named in the new$FORGE_DATA/forge.pid. An unknown sha prints one line (rollback refused: no kept release …) and exits 1./releasespage (src/web/pages/releases.ts):FORGE_REPOgets Roll back on each kept, green, not-live release.rwscope.live: <sha> since <time>.src/release/rollback.tsholds the shared rollback logic andsrc/release/live.tsholds the live record and pidfile. Migration 85 adds arelease_livetable, written at boot whenFORGE_COMMITis set; "healthy since" is that boot time.releasesis now a reserved name.test/schema-additive.test.ts. A database from before the table existed and ahead of the build is still refused. I rewrote the old "data ahead is still refused" test to match; it was testing the policy this issue reverses.test/release-rollback.test.tsis inGATE. It covers sha resolution, the CLI refusals, healthy-since, and this tree booting and answering/on a database one migration ahead. It also covers the page (button only for a writer, escaping, cross-origin 403, unknown sha refused, home line) and a button press that serves the old sha and drains.Left out
FORGE_SSH_PORT=0the way a swap does, and the swap still needstcp_migrate_req=1, so I did not test the CLI success path here.Try it
FORGE_REPOandFORGE_SELF_SWAP=1, open/releases, and press Roll back on an older row.bun src/main.ts --rollback <sha>.🤖 Generated with Claude Code
Closes #1664