fix: clear implicit project model defaults - #8672
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes project model defaults across CLI, server auto-bootstrap, and web project creation, while migration 044 also rewrites persisted projections and historical creation events. The resulting user-visible behavior and durable data changes warrant human review. You can add or adjust custom eligibility rules. Learn more. |
2852487 to
89486e9
Compare
|
Confirmed on another affected installation. Environment:
After upgrading, a new thread unexpectedly selected Read-only database inspection found that the project’s original {"provider":"codex","model":"gpt-5.4"}There was no later {
"instanceId": "codex",
"model": "gpt-5.4",
"options": [
{"id": "reasoningEffort", "value": "medium"},
{"id": "serviceTier", "value": "default"}
]
}This installation therefore appears to match the legacy implicit-default cohort targeted by migration 044. The immediate workaround was to manually select |
What Changed
gpt-5.4project default written by the legacy implicit-creation path. Other caller-supplied creation values and later explicit project updates are preserved.Why
Older project creation paths silently stored
gpt-5.4as a project default even though the user never configured it.After #6011 made configured project defaults authoritative for new threads, those dormant values began overriding the last-picked model. Restricting cleanup to the exact legacy-generated shape repairs that cohort without weakening real project defaults or erasing other values supplied through the project creation contract.
Verification
vp test run apps/server/src/persistence/Migrations/044_ClearImplicitProjectModelDefaults.test.ts apps/server/src/serverRuntimeStartup.test.ts packages/client-runtime/src/operations/projects.test.ts(26 tests)vp run typecheckinapps/servervp run typecheckinapps/webChecklist
Built with GPT-5.6-Sol through the Codex harness in T3 Code.
Note
Medium Risk
Migration 044 mutates historical
project.createdevents and project projections; incorrect matching could clear real defaults, though predicates are narrow and explicit meta-updates are excluded.Overview
Stops treating the app-wide model as a project default when projects are created. CLI add, server auto-bootstrap, and command palette add project now dispatch
project.createwithdefaultModelSelection: null. Auto-bootstrap still appliesgetAutoBootstrapDefaultModelSelection()on the initialthread.createonly.Adds migration 044 to repair legacy data: it nulls
projection_projects.default_model_selection_jsonand rewrites matchingproject.createdevent payloads when the stored value was only the old implicit Codexgpt-5.4default (no options) and the user never set a default viaproject.meta-updated. Explicit project defaults and caller-supplied creation values are left intact. Tests cover the migration and bootstrap dispatch behavior.Reviewed by Cursor Bugbot for commit 89486e9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Clear implicit
defaultModelSelectionacross project creation paths and add migration 44projectAddCommand), auto-bootstrap (resolveAutoBootstrapWelcomeTargets), and web command palette (OpenCommandPaletteDialog) now setsdefaultModelSelectiontonullinstead of an auto-resolved modelClearImplicitProjectModelDefaults) setsprojection_projects.default_model_selection_jsonto NULL for projects whose creation event used the bare Codexgpt-5.4default with no later explicit update, and normalizes the correspondingproject.createdevent payloads to stay replay-consistentgetAutoBootstrapDefaultModelSelectionwhen the project has no defaultprojection_projectsrows andproject.createdevent payloads for projects matching the implicit-default criteria; reviewers should verify the matching condition in 044_ClearImplicitProjectModelDefaults.ts does not catch projects with explicit caller-supplied defaultsMacroscope summarized 89486e9.