Skip to content

fix: clear implicit project model defaults - #8672

Open
HamzaNa1 wants to merge 1 commit into
pingdotgg:mainfrom
HamzaNa1:fix/clear-implicit-project-model-defaults
Open

fix: clear implicit project model defaults#8672
HamzaNa1 wants to merge 1 commit into
pingdotgg:mainfrom
HamzaNa1:fix/clear-implicit-project-model-defaults

Conversation

@HamzaNa1

@HamzaNa1 HamzaNa1 commented Aug 29, 2026

Copy link
Copy Markdown

What Changed

  • Added migration 044 to clear only the exact bare Codex gpt-5.4 project default written by the legacy implicit-creation path. Other caller-supplied creation values and later explicit project updates are preserved.
  • Rewrites the matching creation event alongside the projection so replay cannot restore that legacy implicit value.
  • Auto-bootstrap, CLI project creation, and command-palette project creation no longer pin the current model to the project. Auto-bootstrap still uses the current default for its initial thread.

Why

Older project creation paths silently stored gpt-5.4 as 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)
  • Targeted lint and formatting checks for all changed files
  • vp run typecheck in apps/server
  • vp run typecheck in apps/web

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (no UI change)
  • I included a video for animation/interaction changes (not applicable)

Built with GPT-5.6-Sol through the Codex harness in T3 Code.


Note

Medium Risk
Migration 044 mutates historical project.created events 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.create with defaultModelSelection: null. Auto-bootstrap still applies getAutoBootstrapDefaultModelSelection() on the initial thread.create only.

Adds migration 044 to repair legacy data: it nulls projection_projects.default_model_selection_json and rewrites matching project.created event payloads when the stored value was only the old implicit Codex gpt-5.4 default (no options) and the user never set a default via project.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 defaultModelSelection across project creation paths and add migration 44

  • New project creation in the CLI (projectAddCommand), auto-bootstrap (resolveAutoBootstrapWelcomeTargets), and web command palette (OpenCommandPaletteDialog) now sets defaultModelSelection to null instead of an auto-resolved model
  • Migration 44 (ClearImplicitProjectModelDefaults) sets projection_projects.default_model_selection_json to NULL for projects whose creation event used the bare Codex gpt-5.4 default with no later explicit update, and normalizes the corresponding project.created event payloads to stay replay-consistent
  • Auto-bootstrap still assigns a model selection to the initial thread via getAutoBootstrapDefaultModelSelection when the project has no default
  • Risk: migration 44 mutates existing projection_projects rows and project.created event 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 defaults

Macroscope summarized 89486e9.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27a47e05-1848-4ada-a61c-22557a419f5d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/server/src/persistence/Migrations/044_ClearImplicitProjectModelDefaults.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@HamzaNa1
HamzaNa1 force-pushed the fix/clear-implicit-project-model-defaults branch from 2852487 to 89486e9 Compare August 29, 2026 20:08
@HamzaNa1 HamzaNa1 changed the title fix(server): clear implicit project model defaults fix: clear implicit project model defaults Aug 29, 2026
@Rasalas

Rasalas commented Aug 29, 2026

Copy link
Copy Markdown

Confirmed on another affected installation.

Environment:

  • T3 Code 0.0.36
  • Nightly desktop app with a local server
  • macOS arm64, Darwin 25.5.0

After upgrading, a new thread unexpectedly selected gpt-5.4 with medium reasoning instead of the previously used gpt-5.6-sol.

Read-only database inspection found that the project’s original project.created event, dated 2026-04-18, contained this bare legacy default:

{"provider":"codex","model":"gpt-5.4"}

There was no later project.meta-updated event when the symptom occurred. The projected project default contained the same value, and a recent projected thread confirmed the resulting selection:

{
  "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 gpt-5.6-sol in the project’s New threads model setting. That correctly produced a new project.meta-updated event, so the proposed migration should preserve the explicit replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants