test(server): assert the dispatched welcome thread model (#9980)
This commit is contained in:
1 parent
2fc630c9e8
commit
1550f1b742
2 files changed
+9
-13
No files matched your search
@@ -17,13 +17,6 @@ import * as AnalyticsService from "./telemetry/AnalyticsService.ts";
|
||||
import * as ServerRuntimeStartup from "./serverRuntimeStartup.ts";
|
||||
import * as GitVcsDriver from "./vcs/GitVcsDriver.ts";
|
||||
|
||||
it("uses the canonical Codex default for the auto-bootstrapped welcome thread", () => {
|
||||
assert.deepStrictEqual(ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(), {
|
||||
instanceId: ProviderInstanceId.make("codex"),
|
||||
model: DEFAULT_MODEL,
|
||||
});
|
||||
});
|
||||
|
||||
it.effect("automatic pull only updates enabled, behind, clean default-branch checkouts", () =>
|
||||
Effect.gen(function* () {
|
||||
const pulled: string[] = [];
|
||||
@@ -201,7 +194,10 @@ it.effect("resolveAutoBootstrapWelcomeTargets returns existing project and threa
|
||||
id: bootstrapProjectId,
|
||||
title: "Startup Project",
|
||||
workspaceRoot: "/tmp/startup-project",
|
||||
defaultModelSelection: ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(),
|
||||
defaultModelSelection: {
|
||||
instanceId: ProviderInstanceId.make("codex"),
|
||||
model: DEFAULT_MODEL,
|
||||
},
|
||||
scripts: [],
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
@@ -298,10 +294,10 @@ it.effect("resolveAutoBootstrapWelcomeTargets creates a project and thread when
|
||||
["project.create", "thread.create"],
|
||||
);
|
||||
assert.equal("defaultModelSelection" in commands[0]!, false);
|
||||
assert.deepStrictEqual(
|
||||
commands[1]?.modelSelection,
|
||||
ServerRuntimeStartup.getAutoBootstrapThreadModelSelection(),
|
||||
);
|
||||
assert.deepStrictEqual(commands[1]?.modelSelection, {
|
||||
instanceId: ProviderInstanceId.make("codex"),
|
||||
model: DEFAULT_MODEL,
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ export const launchStartupHeartbeat = recordStartupHeartbeat.pipe(
|
||||
Effect.asVoid,
|
||||
);
|
||||
|
||||
export const getAutoBootstrapThreadModelSelection = (): ModelSelection => ({
|
||||
const getAutoBootstrapThreadModelSelection = (): ModelSelection => ({
|
||||
instanceId: ProviderInstanceId.make("codex"),
|
||||
model: DEFAULT_MODEL,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user