Session: enforce startup sequence on bare reset greeting

This commit is contained in:
Vignesh Natarajan
2026-02-20 20:38:42 -08:00
parent 7417c36268
commit cd6bbe8cea
5 changed files with 6 additions and 1 deletions

View File

@@ -342,6 +342,7 @@ describe("gateway agent handler", () => {
| { message?: string; sessionId?: string }
| undefined;
expect(call?.message).toBe(BARE_SESSION_RESET_PROMPT);
expect(call?.message).toContain("Execute your Session Startup sequence now");
expect(call?.sessionId).toBe("reset-session-id");
});

View File

@@ -285,6 +285,8 @@ describe("gateway server agent", () => {
await vi.waitFor(() => expect(calls.length).toBeGreaterThan(callsBefore));
const call = (calls.at(-1)?.[0] ?? {}) as Record<string, unknown>;
expect(call.message).toBe(BARE_SESSION_RESET_PROMPT);
expect(call.message).toBeTypeOf("string");
expect(call.message).toContain("Execute your Session Startup sequence now");
expect(typeof call.sessionId).toBe("string");
expect(call.sessionId).not.toBe("sess-main-before-reset");
});