[AI-assisted] test: fix typing and test fixture issues (#31444)

* test: fix typing and test fixture issues

* Fix type-test harness issues from session routing and mock typing

* Add routing regression test for session.mainKey precedence
This commit is contained in:
Vincent Koc
2026-03-02 00:41:21 -08:00
committed by GitHub
parent 1443bb9a84
commit 29c3ce9454
13 changed files with 195 additions and 104 deletions

View File

@@ -81,7 +81,7 @@ describe("runCronIsolatedAgentTurn — cron model override (#21057)", () => {
// Hold onto the cron session *object* — the code may reassign its
// `sessionEntry` property (e.g. during skills snapshot refresh), so
// checking a stale reference would give a false negative.
let cronSession: { sessionEntry: ReturnType<typeof makeFreshSessionEntry>; [k: string]: unknown };
let cronSession: ReturnType<typeof makeCronSession>;
beforeEach(() => {
previousFastTestEnv = clearFastTestEnv();
@@ -103,7 +103,7 @@ describe("runCronIsolatedAgentTurn — cron model override (#21057)", () => {
cronSession = makeCronSession({
sessionEntry: makeFreshSessionEntry(),
}) as { sessionEntry: ReturnType<typeof makeFreshSessionEntry>; [k: string]: unknown };
});
resolveCronSessionMock.mockReturnValue(cronSession);
});