Repository navigation
fix(server): migration 026 keeps model options as arrays on sqlite 3.54 - #254
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously 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.
CI started failing on
026_CanonicalizeModelSelectionOptions.test.tsonce runners picked up Node 24.22.3. That Node bundles SQLite 3.54.1, which no longer carries the JSON subtype out of a scalar subquery. Migration 026 feeds aSELECT json_group_array(...)subquery intojson_set, so on the new SQLite it storedoptionsas a quoted string ("[...]") instead of an array. Anyone migrating a legacy database on that Node would get unreadable model selections, not just a red test.Each of the four subqueries is now wrapped in
json(...), which restores the array on both SQLite versions. The other migrations that build JSON in SQL (011, 016, 045, 050, 054) don't pass a subquery's JSON into a JSON function, so they are unaffected.Proof: on
node:sqlite,json_set('{"a":1}','$.o',(select json_group_array(1)))returns{"a":1,"o":[1]}on Node 24.22.1 / SQLite 3.53.4 and{"a":1,"o":"[1]"}on Node 24.22.3 / SQLite 3.54.1. The 026 test failed on 24.22.3 before this change and passes on 24.22.1 and 24.22.3 after. All persistence tests pass on 24.22.3.Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.