Stub unarchiveSnapshot in stale AgentManager test doubles

Commit 25252d1b8 added AgentManager.unarchiveSnapshot, now called from
the shared unarchiveAgentState helper. The hand-rolled manager doubles in
the session-workspaces and import-sessions suites were not updated, so the
refresh/import RPC paths hit an unstubbed method and failed. Add the
method to those doubles; no production change.
This commit is contained in:
Mohamed Boudra
2026-06-20 23:24:03 +07:00
parent a924059daf
commit 02838ca8bc
2 changed files with 3 additions and 0 deletions
@@ -374,6 +374,7 @@ test("importProviderSession imports a selected provider session without listing"
const agentManager = {
importProviderSession: vi.fn().mockResolvedValue(snapshot),
getTimeline: vi.fn().mockReturnValue(timeline),
unarchiveSnapshot: vi.fn().mockResolvedValue(false),
} as unknown as AgentManager;
const agentStorage = {
list: vi.fn().mockResolvedValue([]),
@@ -414,6 +415,7 @@ test("importProviderSession passes labels through the manager import operation",
const agentManager = {
importProviderSession: vi.fn().mockResolvedValue(snapshot),
getTimeline: vi.fn().mockReturnValue([]),
unarchiveSnapshot: vi.fn().mockResolvedValue(false),
} as unknown as AgentManager;
const agentStorage = {
list: vi.fn().mockResolvedValue([]),
@@ -543,6 +543,7 @@ function createSessionForWorkspaceTests(
getAgent: () => null,
archiveAgent: async () => ({ archivedAt: new Date().toISOString() }),
archiveSnapshot: async () => ({}),
unarchiveSnapshot: async () => true,
clearAgentAttention: async () => {},
notifyAgentState: () => {},
}),