mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
fix(server): drop stale snapshot mutation ownership assertions
Session.unarchiveAgentState(id) and the direct agentManager.unarchiveSnapshotByHandle delegation were removed when main's86bb5cc8+a11c246brefactors moved unarchive through the shared mcp-shared helper. Remove the now-dead test assertions so the suite reflects the real ownership boundary.
This commit is contained in:
@@ -65,8 +65,6 @@ describe("snapshot mutation ownership boundary", () => {
|
||||
updatedAt: archivedAt,
|
||||
};
|
||||
});
|
||||
const unarchiveSnapshot = vi.fn(async () => true);
|
||||
const unarchiveSnapshotByHandle = vi.fn(async () => undefined);
|
||||
const updateAgentMetadata = vi.fn(async () => undefined);
|
||||
const directStorageWrite = vi.fn(async () => {
|
||||
throw new Error("Session should not write snapshots directly");
|
||||
@@ -93,8 +91,6 @@ describe("snapshot mutation ownership boundary", () => {
|
||||
listAgents: () => [],
|
||||
getAgent: () => null,
|
||||
archiveSnapshot,
|
||||
unarchiveSnapshot,
|
||||
unarchiveSnapshotByHandle,
|
||||
updateAgentMetadata,
|
||||
} as any,
|
||||
agentStorage: {
|
||||
@@ -133,13 +129,6 @@ describe("snapshot mutation ownership boundary", () => {
|
||||
expect(archiveSnapshot).toHaveBeenCalledTimes(1);
|
||||
expect(archiveResult.archivedAt).toBeTruthy();
|
||||
|
||||
await session.unarchiveAgentState("agent-1");
|
||||
expect(unarchiveSnapshot).toHaveBeenCalledWith("agent-1");
|
||||
|
||||
const handle = { provider: "codex", sessionId: "session-1" };
|
||||
await session.unarchiveAgentByHandle(handle);
|
||||
expect(unarchiveSnapshotByHandle).toHaveBeenCalledWith(handle);
|
||||
|
||||
await session.handleUpdateAgentRequest(
|
||||
"agent-1",
|
||||
"Renamed agent",
|
||||
|
||||
Reference in New Issue
Block a user