authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:12:34-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:12:34-07:00
log1550f1b742138df8b31b24e34ddea58c80afb3cc
treebc60c4042e6c5661f1a2d759b493e26fbd8e192a
parent2fc630c9e85321b7b3963372fd316877a7581639
signature Signed by PGP key B5690EEEBB952194

test(server): assert the dispatched welcome thread model (#9980)


2 files changed, 9 insertions(+), 13 deletions(-)

apps/server/src/serverRuntimeStartup.test.ts+8-12
......@@ -17,13 +17,6 @@ import * as AnalyticsService from "./telemetry/AnalyticsService.ts";
1717import * as ServerRuntimeStartup from "./serverRuntimeStartup.ts";
1818import * as GitVcsDriver from "./vcs/GitVcsDriver.ts";
1919
20it("uses the canonical Codex default for the auto-bootstrapped welcome thread", () => {
21 assert.deepStrictEqual(ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(), {
22 instanceId: ProviderInstanceId.make("codex"),
23 model: DEFAULT_MODEL,
24 });
25});
26
2720it.effect("automatic pull only updates enabled, behind, clean default-branch checkouts", () =>
2821 Effect.gen(function* () {
2922 const pulled: string[] = [];
......@@ -201,7 +194,10 @@ it.effect("resolveAutoBootstrapWelcomeTargets returns existing project and threa
201194 id: bootstrapProjectId,
202195 title: "Startup Project",
203196 workspaceRoot: "/tmp/startup-project",
204 defaultModelSelection: ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(),
197 defaultModelSelection: {
198 instanceId: ProviderInstanceId.make("codex"),
199 model: DEFAULT_MODEL,
200 },
205201 scripts: [],
206202 createdAt: "2026-01-01T00:00:00.000Z",
207203 updatedAt: "2026-01-01T00:00:00.000Z",
......@@ -298,10 +294,10 @@ it.effect("resolveAutoBootstrapWelcomeTargets creates a project and thread when
298294 ["project.create", "thread.create"],
299295 );
300296 assert.equal("defaultModelSelection" in commands[0]!, false);
301 assert.deepStrictEqual(
302 commands[1]?.modelSelection,
303 ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(),
304 );
297 assert.deepStrictEqual(commands[1]?.modelSelection, {
298 instanceId: ProviderInstanceId.make("codex"),
299 model: DEFAULT_MODEL,
300 });
305301 }),
306302);
307303
apps/server/src/serverRuntimeStartup.ts+1-1
......@@ -176,7 +176,7 @@ export const launchStartupHeartbeat = recordStartupHeartbeat.pipe(
176176 Effect.asVoid,
177177);
178178
179export const getAutoBootstrapThreadModelSelection = (): ModelSelection => ({
179const getAutoBootstrapThreadModelSelection = (): ModelSelection => ({
180180 instanceId: ProviderInstanceId.make("codex"),
181181 model: DEFAULT_MODEL,
182182});