Tests: repair latest main type drift

This commit is contained in:
Peter Steinberger
2026-04-07 23:25:11 +01:00
parent d1019eaa9f
commit 6affd09dbe
3 changed files with 6 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ const runtimeStub = {
type DownloadGraphMediaParams = Parameters<typeof downloadMSTeamsGraphMedia>[0];
type DownloadGraphMediaOverrides = Partial<
Omit<DownloadGraphMediaParams, "messageUrl" | "tokenProvider" | "maxBytes">
Omit<DownloadGraphMediaParams, "messageUrl" | "tokenProvider">
>;
type FetchFn = typeof fetch;
type LabeledCase = { label: string };

View File

@@ -10,7 +10,7 @@ const mocks = vi.hoisted(() => ({
onAgentEvent: vi.fn(() => noop),
loadConfig: vi.fn(() => ({
agents: { defaults: { subagents: { archiveAfterMinutes: 0 } } },
session: { mainKey: "main", scope: "per-sender" },
session: { mainKey: "main", scope: "per-sender" as const },
})),
loadSessionStore: vi.fn(() => ({})),
resolveAgentIdFromSessionKey: vi.fn((sessionKey: string) => {
@@ -21,7 +21,9 @@ const mocks = vi.hoisted(() => ({
emitSessionLifecycleEvent: vi.fn(),
persistSubagentRunsToDisk: vi.fn(),
restoreSubagentRunsFromDisk: vi.fn(() => 0),
getSubagentRunsSnapshotForRead: vi.fn((runs: Map<string, unknown>) => new Map(runs)),
getSubagentRunsSnapshotForRead: vi.fn(
(runs: Map<string, import("./subagent-registry.types.js").SubagentRunRecord>) => new Map(runs),
),
resetAnnounceQueuesForTests: vi.fn(),
captureSubagentCompletionReply: vi.fn(async () => "final completion reply"),
runSubagentAnnounceFlow: vi.fn(async () => true),
@@ -110,7 +112,7 @@ describe("subagent registry seam flow", () => {
mocks.onAgentEvent.mockReturnValue(noop);
mocks.loadConfig.mockReturnValue({
agents: { defaults: { subagents: { archiveAfterMinutes: 0 } } },
session: { mainKey: "main", scope: "per-sender" },
session: { mainKey: "main", scope: "per-sender" as const },
});
mocks.resolveAgentIdFromSessionKey.mockImplementation((sessionKey: string) => {
return sessionKey.match(/^agent:([^:]+)/)?.[1] ?? "main";

View File

@@ -369,7 +369,6 @@ describe("sanitizeHostExecEnv", () => {
GOPRIVATE: "example.invalid/*",
GOENV: "/tmp/evil-goenv",
GOPATH: "/tmp/evil-go",
CARGO_HOME: "/tmp/evil-cargo",
PYTHONUSERBASE: "/tmp/evil-python-userbase",
VIRTUAL_ENV: "/tmp/evil-venv",
SHELLOPTS: "xtrace",