test: fix stale expectations after gpt-5.5 model promotion
Updates test expectations across agent, cli, shared, plugin, and tools tests to match gpt-5.5 as the new default for oracle, hephaestus, and deep agents. Includes snapshot updates for model-fallback tests. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+17
-17
@@ -103,7 +103,7 @@ describe("mergeConfigs", () => {
|
||||
it("should deep merge agents", () => {
|
||||
const base = createConfig({
|
||||
agents: {
|
||||
oracle: { model: "openai/gpt-5.4" },
|
||||
oracle: { model: "openai/gpt-5.5" },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ describe("mergeConfigs", () => {
|
||||
|
||||
const result = mergeConfigs(base, override);
|
||||
|
||||
expect(result.agents?.oracle).toMatchObject({ model: "openai/gpt-5.4" });
|
||||
expect(result.agents?.oracle).toMatchObject({ model: "openai/gpt-5.5" });
|
||||
expect(result.agents?.oracle?.temperature).toBe(0.5);
|
||||
expect(result.agents?.explore).toMatchObject({ model: "anthropic/claude-haiku-4-5" });
|
||||
});
|
||||
@@ -183,7 +183,7 @@ describe("parseConfigPartially", () => {
|
||||
it("should return the full config when everything is valid", () => {
|
||||
const rawConfig = {
|
||||
agents: {
|
||||
oracle: { model: "openai/gpt-5.4" },
|
||||
oracle: { model: "openai/gpt-5.5" },
|
||||
momus: { model: "openai/gpt-5.4" },
|
||||
},
|
||||
disabled_hooks: ["comment-checker"],
|
||||
@@ -192,7 +192,7 @@ describe("parseConfigPartially", () => {
|
||||
const result = parseConfigPartially(rawConfig);
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.4" });
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.5" });
|
||||
expect(result!.agents?.momus).toMatchObject({ model: "openai/gpt-5.4" });
|
||||
expect(result!.disabled_hooks).toEqual(["comment-checker"]);
|
||||
});
|
||||
@@ -206,7 +206,7 @@ describe("parseConfigPartially", () => {
|
||||
it("should preserve valid agent overrides when another section is invalid", () => {
|
||||
const rawConfig = {
|
||||
agents: {
|
||||
oracle: { model: "openai/gpt-5.4" },
|
||||
oracle: { model: "openai/gpt-5.5" },
|
||||
momus: { model: "openai/gpt-5.4" },
|
||||
prometheus: {
|
||||
permission: {
|
||||
@@ -227,7 +227,7 @@ describe("parseConfigPartially", () => {
|
||||
it("should preserve valid agents when a non-agent section is invalid", () => {
|
||||
const rawConfig = {
|
||||
agents: {
|
||||
oracle: { model: "openai/gpt-5.4" },
|
||||
oracle: { model: "openai/gpt-5.5" },
|
||||
},
|
||||
disabled_hooks: ["not-a-real-hook"],
|
||||
};
|
||||
@@ -235,7 +235,7 @@ describe("parseConfigPartially", () => {
|
||||
const result = parseConfigPartially(rawConfig);
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.4" });
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.5" });
|
||||
expect(result!.disabled_hooks).toEqual(["not-a-real-hook"]);
|
||||
});
|
||||
});
|
||||
@@ -286,7 +286,7 @@ describe("parseConfigPartially", () => {
|
||||
it("should ignore unknown keys and return valid sections", () => {
|
||||
const rawConfig = {
|
||||
agents: {
|
||||
oracle: { model: "openai/gpt-5.4" },
|
||||
oracle: { model: "openai/gpt-5.5" },
|
||||
},
|
||||
some_future_key: { foo: "bar" },
|
||||
};
|
||||
@@ -294,7 +294,7 @@ describe("parseConfigPartially", () => {
|
||||
const result = parseConfigPartially(rawConfig);
|
||||
|
||||
expect(result).not.toBeNull();
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.4" });
|
||||
expect(result!.agents?.oracle).toMatchObject({ model: "openai/gpt-5.5" });
|
||||
expect((result as Record<string, unknown>)["some_future_key"]).toBeUndefined();
|
||||
});
|
||||
});
|
||||
@@ -344,7 +344,7 @@ describe("loadPluginConfig", () => {
|
||||
tempDirs.push(rootDir)
|
||||
mkdirSync(userConfigDir, { recursive: true })
|
||||
mkdirSync(projectConfigDir, { recursive: true })
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.4" } } }))
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.5" } } }))
|
||||
|
||||
process.env.OPENCODE_CONFIG_DIR = userConfigDir
|
||||
|
||||
@@ -357,8 +357,8 @@ describe("loadPluginConfig", () => {
|
||||
// then
|
||||
expect(existsSync(legacyConfigPath)).toBe(false)
|
||||
expect(existsSync(backupConfigPath)).toBe(true)
|
||||
expect(readFileSync(canonicalConfigPath, "utf-8")).toContain('"openai/gpt-5.4"')
|
||||
expect(reloadedConfig.agents?.oracle?.model).toBe("openai/gpt-5.4")
|
||||
expect(readFileSync(canonicalConfigPath, "utf-8")).toContain('"openai/gpt-5.5"')
|
||||
expect(reloadedConfig.agents?.oracle?.model).toBe("openai/gpt-5.5")
|
||||
})
|
||||
|
||||
it("should still load config from legacy path when migration fails", async () => {
|
||||
@@ -372,7 +372,7 @@ describe("loadPluginConfig", () => {
|
||||
tempDirs.push(rootDir)
|
||||
mkdirSync(userConfigDir, { recursive: true })
|
||||
mkdirSync(projectConfigDir, { recursive: true })
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.4" } } }))
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.5" } } }))
|
||||
|
||||
// Make the directory read-only so migration write fails
|
||||
// (simulates Windows file lock / permission issues)
|
||||
@@ -395,7 +395,7 @@ describe("loadPluginConfig", () => {
|
||||
}
|
||||
|
||||
// then - should still load the config from legacy path
|
||||
expect(config.agents?.oracle?.model).toBe("openai/gpt-5.4")
|
||||
expect(config.agents?.oracle?.model).toBe("openai/gpt-5.5")
|
||||
})
|
||||
|
||||
it("should load migrated legacy project config on the first load", async () => {
|
||||
@@ -410,7 +410,7 @@ describe("loadPluginConfig", () => {
|
||||
tempDirs.push(rootDir)
|
||||
mkdirSync(userConfigDir, { recursive: true })
|
||||
mkdirSync(projectConfigDir, { recursive: true })
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.4" } } }))
|
||||
writeFileSync(legacyConfigPath, JSON.stringify({ agents: { oracle: { model: "openai/gpt-5.5" } } }))
|
||||
|
||||
process.env.OPENCODE_CONFIG_DIR = userConfigDir
|
||||
|
||||
@@ -421,7 +421,7 @@ describe("loadPluginConfig", () => {
|
||||
// then
|
||||
expect(existsSync(legacyConfigPath)).toBe(false)
|
||||
expect(existsSync(canonicalConfigPath)).toBe(true)
|
||||
expect(config.agents?.oracle?.model).toBe("openai/gpt-5.4")
|
||||
expect(config.agents?.oracle?.model).toBe("openai/gpt-5.5")
|
||||
})
|
||||
|
||||
it("should preserve explicit user git_master settings when project config omits git_master", async () => {
|
||||
@@ -449,7 +449,7 @@ describe("loadPluginConfig", () => {
|
||||
join(projectConfigDir, "oh-my-openagent.jsonc"),
|
||||
JSON.stringify({
|
||||
agents: {
|
||||
hephaestus: { model: "openai/gpt-5.4" },
|
||||
hephaestus: { model: "openai/gpt-5.5" },
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user