fix(knowledge): retry the Tin projection after a database refuses the extension - #8039
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Contributor
|
… extension A script migration can now defer: `up` throws `ScriptMigrationDeferred`, the runner logs it, leaves the name unrecorded and runs the remaining migrations. The Tin projection defers when the database offers `tin` but refuses to create it, so the upgrade after the extension is permitted installs it instead of skipping it forever.
`db:push` runs the migration file directly, where a deferral has no migration record to leave unwritten, so a refused extension aborted the push. The direct entry point now adopts the projection where the database allows it and logs the refusal otherwise, while the registered runner still sees the deferral. Also covers continuation after a deferral with a synthetic migration list, which the registry cannot express while the only deferring migration is its last entry.
waleedlatif1
force-pushed
the
fix/tin-migration-defer
branch
from
September 20, 2026 04:39
78fcb4c to
87dd2ca
Compare
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was successfully deployed
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.
Summary
upthrowsScriptMigrationDeferred, the runner logs it, leaves the name unrecorded, and continues with the remaining migrationstinbut refusesCREATE EXTENSION, so the next upgrade after the extension is permitted installs it — previously the refusal was recorded as applied and never retriedsearchIndexBasescomment:is_search_indexis only ever turned on (legacy adoption), so a stale cachedfalsejust keeps that base on the GIN projection for one TTLType of Change
Testing
Tested manually. New unit tests cover the deferral (both refusal codes), the unavailable-extension no-op, and that any other extension error still fails the migration; a runner test asserts a deferred migration is not recorded and does not fail the upgrade. Verified each new test fails without its fix.
bun run lint,bun run check:audits(47 audits),packages/dbtype-check and its full vitest suite pass.Checklist