Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped server startup bug fix: optional bootstrap-thread failures are logged and skipped while project bootstrap and other startup failures remain fatal. Regression tests cover disabled providers, launch errors, and preservation of project failure behavior. You can add or adjust custom eligibility rules. Learn more. |
Closed
2 tasks done
This branch has not been 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.
Problem
t3(andt3 start) creates the project's first thread at startup using the project default model, or Codex when none is set. #17879 added the per-project enablement check to thread launch, so that launch now fails withThreadManagementProviderInstanceDisabledErrorwhen the instance is disabled, and startup exits before command readiness. The reporter disabled Codex in the stable build, then ran the nightlyt3.exeZIP on Windows 11 and the window closed on the stack trace.Change
Startup catches the launch's two typed failures and continues with the project and no bootstrap thread target. A disabled instance logs at info with the project and instance ids. A
ThreadLaunchErrorlogs at warning with the project id and operation. The model selection is unchanged: skipping this optional thread lets the app open without picking a replacement provider for the user. Project bootstrap, shell reads, defects and interruptions still fail startup as before.Scope and approval
Closes #20028. The triage comment confirmed the bug and accepted either choosing an enabled provider or skipping the thread, plus not crashing startup. The nightly ZIP
t3.exeruns the CLI/web server, where cwd auto-bootstrap defaults on. Desktop mode defaults it off andt3 serveforces it off.Verification
cd apps/server && vp test run src/serverRuntimeStartup.test.ts src/serverRuntimeStartup.autoPull.test.ts:apps/server/src/serverRuntimeStartup.autoPull.test.ts,apps/server/src/serverRuntimeStartup.test.ts.apps/server/src/serverRuntimeStartup.tsreverted toede3f2d6ba, 3 tests fail with assertion errors: "keeps bootstrap launch failures separate from project failures: disabled-codex", "keeps bootstrap launch failures separate from project failures: disabled-default", "keeps bootstrap launch failures separate from project failures: launch-failure".vp fmt --checkandvp lintreport no errors and no new warnings on the 2 changed TS files.t3.The new table test drives
ServerRuntimeStartup.layerWithOptionsthrough command readiness and the welcome event: disabled Codex with no default, a disabled explicit project default, aThreadLaunchError, and an unrelated project-bootstrap defect that still fails readiness.Real run on Linux, from source: two isolated
node apps/server/src/bin.ts start --no-browser --auto-bootstrap-project-from-cwdprocesses, each with its own base dir, port and project folder, and asettings.jsonthat disables thecodexinstance. Withapps/server/src/serverRuntimeStartup.tsatede3f2d6ba, the server logged theThreadManagementProviderInstanceDisabledErrorstartup failure and exited 1 before readiness. With the fix (04085eb871) it logged the skip, published welcome with the project id and no thread id, accepted commands, and answeredGET /.well-known/t3/environmentwith 200. Both state databases held one project and zero threads.Not run: Windows, the Electron desktop app, and the stable-to-nightly migration.
Model: GPT-6.1-Sol, Claude Opus 5.5, Claude Fable 5.1 (review), GPT-6-Astra (review). Harness: Codex, Claude Code.