Repository navigation
fix(platform): let 1.3.0 through 1.5.0 upgrade past migration 0063 - #675
Merged
Merged
Conversation
Migration 0063 (OAuth refresh tokens) shipped without rollbackSafeFrom edges for the releases on the 0000-0062 schema, so a 1.3.0, 1.4.0 or 1.5.0 platform could not upgrade to the next release. Add the edges for schema 8bde0b5b. 0063 only adds oauth_refresh_tokens, whose grant foreign key cascades. Each tag's API integration suite was run on the upgraded schema; its failures match the same tag on its own schema. A unit test checks the edges and that the older runtime's grant writes, hourly purge and user deletion still work and remove refresh tokens. Fixes #664 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-rollback-edges-0063-void-cloud.voidzero-docs.workers.dev (commit cc40808)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #664
Migration
0063(OAuth refresh tokens, #631) shipped withoutrollbackSafeFromedges for releases on the0000–0062schema. Without them, a 1.3.0, 1.4.0 or 1.5.0 platform cannot upgrade to the next release:Change
8bde0b5b…is computed from each release tag's journal and SQL with the runtime build's formula. The same script reproduces the existing 1.2.1 edge (d8e007d2…).Why the edge is safe
0063only createsoauth_refresh_tokens, and its foreign key tooauth_grantsdeletes on cascade. 1.3.0, 1.4.0 and 1.5.0 have identical OAuth code and never read the new table.What a rollback costs. After rolling back to 1.3–1.5, connected apps cannot refresh, since the older
/oauth/tokenonly accepts authorization codes, so they reconnect. The older/oauth/revokematches only access tokens, so a refresh token revoked during the rollback stays valid after you upgrade again, until the older hourly purge removes its grant, roughly a day later. 1.1.11 through 1.2.1 have the same revoke code, andmainalready lists them as safe for0063.Verification
schema-compatsteps locally against Postgres 18 for each ofv1.3.0,v1.4.0,v1.5.0: migrate with the tag, seed, migrate with this branch, verify the seeded data, then run the tag's 106 API integration files on the upgraded schema.v1.5.0, those same files fail the same tests on its own schema, without0063. So they are local-environment failures, not caused by the migration.admin-upgrade-compatibility.test.ts: checks the three edges, then applies0063with PGlite and runs the older runtime's grant insert, revoke, hourly purge SQL and user delete. It fails without the edges.vp run test --base origin/main: 219 files, 4,515 tests pass.🤖 Generated with Claude Code