Skip to content

Commit 3ec9020

Browse files
committed
fix(tests): align rebased sol/terra/luna branch with post-restructure tree
- codex-account-store dynamic imports -> src/codex/account-store - router test: glm-5.2 alias-map assertion scoped to the model (provider still carries thinking-toggle alias maps) - WS usage-log expectation includes cache_write_tokens in display total
1 parent 7b34878 commit 3ec9020

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/codex-account-store.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe("codex-account-store CRUD", () => {
185185
readCodexAccountRecord,
186186
saveCodexAccountCredential,
187187
saveCodexAccountCredentialIfGeneration,
188-
} = await import("../src/codex-account-store");
188+
} = await import("../src/codex/account-store");
189189
const first = { accessToken: "first", refreshToken: "first-r", expiresAt: 1, chatgptAccountId: "acc" };
190190
const second = { accessToken: "second", refreshToken: "second-r", expiresAt: 2, chatgptAccountId: "acc" };
191191
const third = { accessToken: "third", refreshToken: "third-r", expiresAt: 3, chatgptAccountId: "acc" };
@@ -214,7 +214,7 @@ describe("codex-account-store CRUD", () => {
214214
markCodexAccountValidationFailed,
215215
readCodexAccountRecord,
216216
saveCodexAccountCredential,
217-
} = await import("../src/codex-account-store");
217+
} = await import("../src/codex/account-store");
218218
saveCodexAccountCredential("failed-warmup", { accessToken: "sensitive-access", refreshToken: "sensitive-refresh", expiresAt: 1, chatgptAccountId: "sensitive-account" });
219219
markCodexAccountValidated("failed-warmup", 1234);
220220
markCodexAccountValidationFailed("failed-warmup", "http_status:401");

tests/router.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ describe("routeModel registry effort defaults", () => {
107107

108108
const route = routeModel(config, "opencode-go/glm-5.2");
109109

110-
expect(route.provider.modelReasoningEffortMap).toBeUndefined();
110+
// glm-5.2 itself must have NO alias map (identity labels incl. native `max`); the provider
111+
// still carries thinking-toggle alias maps for mimo/glm-5.x models, which is unrelated.
112+
expect(route.provider.modelReasoningEffortMap?.["glm-5.2"]).toBeUndefined();
111113
expect(mapReasoningEffort(route.provider, route.modelId, "xhigh")).toBe("xhigh");
112114
expect(mapReasoningEffort(route.provider, route.modelId, "max")).toBe("max");
113115
});

tests/server-auth.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,11 +1362,13 @@ describe("server local API auth", () => {
13621362
terminalStatus: "completed",
13631363
closeReason: "terminal",
13641364
usageStatus: "reported",
1365-
totalTokens: 29,
1365+
// display total includes cache-write tokens (25 + 4 + 2) since cache_write_tokens support
1366+
totalTokens: 31,
13661367
usage: {
13671368
inputTokens: 25,
13681369
outputTokens: 4,
13691370
cachedInputTokens: 5,
1371+
cacheCreationInputTokens: 2,
13701372
},
13711373
});
13721374
} finally {

0 commit comments

Comments
 (0)