Repository navigation
ci: a PR that changes a migration rehearses a rollback to the live release - #797
Conversation
fdbb24e to
1c511a2
Compare
40ee2c1 to
be94117
Compare
|
GPT 6.1 Sol review, round 1 (on 40ee2c1)
Re-verified locally after the fixes:
A second round is running on the new diff. |
11acceb to
9354b07
Compare
9354b07 to
e1efd20
Compare
|
GPT 6.1 Sol review, rounds 2 and 3. Neither round found anything blocking. Each raised three should-fix findings, and all were fixed: Round 2 (on be94117)
Round 3 (on 9354b07)
Also found by CI between rounds: step 2's readiness probe could hang for undici's 300s. The server's socket listens before its routes exist, so an early probe is accepted and never answered. Each probe is now bounded at 2s on its own connection, as the dev runner's own health check is. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
e1efd20 to
781f021
Compare
|
GPT 6.1 Sol review, round 4 (on e1efd20, confirming the round-3 fixes): no blocking findings. Three should-fix edges of cancellation, all fixed in 781f021:
Also checked by hand: SIGTERM during step 2 exits 143, leaving no process, scratch directory, git worktree or environment folder behind. |
…connection (#814) Release 15's What's new entry, written from `9e4b0df`. It covers everything merged since release 14's `through` (`7694bab`), and sets the `patchy` release to `0.15.0` (`packages/patchy/package.json` and `CURRENT_RELEASE`). | Change | PRs | | --- | --- | | New: Your agent can read a tool's log | #786 | | Fixed: Tools with server code keep one steady connection | #798 | | Behind the scenes: an unused open tool lets its server rest | #802 | #783 is release 14's own entry, so it's left out. #795, #796, #797, #799, #803, #804, #806 and #807 are agent docs, CI and dev tooling, with no line. None of the PRs in the range are `one-way`; #786 and #798 predate the rollback questions, and their diffs leave nothing an older release can't run with (a new read-only route and CLI command, and the load balancer's stickiness setting, which the older commit restores). If this release misbehaves, roll back to `03891e4` (release 14). Made by Claude Opus 5.5 via Claude Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
A migration that breaks the live release used to surface only when a rollback failed in production. Now a PR that changes a capability's
src/migrations.tsgets arollback-rehearsalcheck. CI deploys the PR onto data the live release seeded, rolls back to the live release, and fails naming the step that broke. Every other PR passes the check in seconds, so it can be required.Closes #790
Look at
1. A deliberately incompatible migration fails it, on the right step. Throwaway draft PR #801 adds a migration that drops
users.whats_new_seen, which the live release reads on every user lookup; its own code stops reading the column. It is closed now, and its branch deleted. Its CI rehearsal on this PR's final code:This PR's own CI rehearsal runs the full path, because it changes the rehearsal itself:
The job takes about 4 minutes, setup included.
03891e4is production's commit, which the check read itself.2. The seam,
scripts/rollback-rehearsal.ts. All three steps run on one scratch worktree.pnpm dev up brightlinestarts fresh, migrates, seeds the scenario and loads its sample data.git checkoutof the PR, and that build's server starts on the same.local/devdata and migrates it. The data is the Postgres cluster (platform and company databases), the stored files and the credential keys.git checkoutback to the live commit, and its server starts on that data again.Steps 2 and 3 swap only the server build. They start it the way the dev runner's supervisor does, but seed nothing, so rows stay exactly as the migration left them.
Each step is exercised the same way:
/healthz/deepanswers.whoamiandlist, and publishes a new version of a page./,/patches,/company, every brightline patch and that page.3. Two choices.
/healthz/deep'srevision, with any-overlap-Nor-seal-Nsuffix stripped. The Deploy runs are judged by AGENTS.md › Deploying's rule: the live commit is uncertain if any run is unfinished, or if the run updated last didn't succeed. When it is uncertain, the check fails and says why. It never guesses.How it was verified
gh run listquery.pnpm test:rollback-rehearsal.scenarios/README.mdnotes the rehearsal depends on brightline.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — a CI job, a dev script and docs; no product code changes.
What does a revert leave behind? Nothing in production. Once
rollback-rehearsalis a required check, though, a revert leaves the ruleset requiring a check that never reports, until it is taken out of the ruleset.Does the release before it still work with that? Yes. No product code, schema or data changes.
For Allison after merge: add
rollback-rehearsalto the ruleset's required checks.Made by Claude Opus 5.5 in Claude Code, running in T3 Code.