test: remove duplicate agent reset e2e

This commit is contained in:
Peter Steinberger
2026-04-10 19:30:00 +01:00
parent cbce38d78c
commit a52d38275e

View File

@@ -373,38 +373,6 @@ describe("gateway server agent", () => {
expectAgentRoutingCall({ channel: "webchat", deliver: false });
});
test(
"agent routes bare /new through session reset before running greeting prompt",
{
timeout: 45_000,
},
async () => {
await writeMainSessionEntry({ sessionId: "sess-main-before-reset" });
const spy = vi.mocked(agentCommand);
const calls = spy.mock.calls;
const callsBefore = calls.length;
const res = await rpcReq(
ws,
"agent",
{
message: "/new",
sessionKey: "main",
idempotencyKey: "idem-agent-new",
},
30_000,
);
expect(res.ok).toBe(true);
await vi.waitFor(() => expect(calls.length).toBeGreaterThan(callsBefore));
const call = (calls.at(-1)?.[0] ?? {}) as Record<string, unknown>;
expect(call.message).toBeTypeOf("string");
expect(call.message).toContain("Run your Session Startup sequence");
expect(call.message).toContain("Current time:");
expect(typeof call.sessionId).toBe("string");
expect(call.sessionId).not.toBe("sess-main-before-reset");
},
);
test("write-scoped callers cannot reset conversations via agent", async () => {
await withGatewayServer(async ({ port }) => {
await useTempSessionStorePath();