Repository navigation
Compare the upgraded studio.db by the rows the old build wrote, not its bytes - #11678
Merged
Merged
Conversation
…ts bytes #11607 added fork_boundary_message_id and fork_title_base to chat_threads, and like every column before them they are added with ALTER TABLE when a current build opens studio.db. The legacy upgrade simulation compared studio.db byte for byte after the owner's reads, so the first additive migration since #10588 froze the fixture failed it: "Owner read changed studio.db", on every PR whose backend rest shard ran after #11607 merged. Nothing the old build wrote changed. The probe now reads every legacy table through its legacy columns before and after, the way it already treats auth.db, and keeps the byte comparison for every other file and for the import step.
Member
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…ts bytes (unslothai#11678) unslothai#11607 added fork_boundary_message_id and fork_title_base to chat_threads, and like every column before them they are added with ALTER TABLE when a current build opens studio.db. The legacy upgrade simulation compared studio.db byte for byte after the owner's reads, so the first additive migration since unslothai#10588 froze the fixture failed it: "Owner read changed studio.db", on every PR whose backend rest shard ran after unslothai#11607 merged. Nothing the old build wrote changed. The probe now reads every legacy table through its legacy columns before and after, the way it already treats auth.db, and keeps the byte comparison for every other file and for the import step.
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.
(Python 3.13, rest)has been red on every PR whose backend rest shard ran after #11607 merged (#11667, #11668, #11599). The failure reproduces on main:Cause
#11607 added
fork_boundary_message_idandfork_title_basetochat_threads. Likesettings_jsonand the other columns before them, they are added withALTER TABLE ... ADD COLUMNwhen a current build opensstudio.db. I diffed the database before and after the owner's reads, and that is the only change: the same row, with two new NULL columns.The simulation froze its legacy schema in #10588 and compared
studio.dbbyte for byte after the owner's reads. #11607 is the first additive migration since then that runs on those reads. Any later one would have failed the same way.The product is right and the test was too strict. Adding a nullable column is how this schema has always grown, and it is what
test_downgrade_sim.pyalready accepts for old builds: they read their own named columns.Change
seed.py: newlegacy_studio_rows(). It reads every table in the frozen schema through the columns that table had then. A dropped or renamed legacy column raises instead of comparing equal.legacy_probe.py: captures those rows after seeding and requires them unchanged after the owner's reads. This is the same treatmentauth.dbalready gets throughold_auth_row. Every other file is still compared byte for byte, and so isstudio.dbacross the import step, which writes nothing today.Verification
tests/multi_account/: 830 passed. On main,test_legacy_upgrade_sim.pyfails as above.storage/studio_db.py's migration. Each of these fails the test:chat_threads.model_idandupdated_at, which no other assertion in the probe reads:Owner read changed legacy studio.db rows.model_gguf_variant:Owner read changed legacy studio.db rows.app_settingsrow.