From 30083c796b442c1b3cdfd175eabe37d7fc21564e Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 06:05:51 +0100 Subject: [PATCH] test: check compaction auth lookup --- src/agents/pi-hooks/compaction-safeguard.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agents/pi-hooks/compaction-safeguard.test.ts b/src/agents/pi-hooks/compaction-safeguard.test.ts index 98de776fa9e..44d53d6946b 100644 --- a/src/agents/pi-hooks/compaction-safeguard.test.ts +++ b/src/agents/pi-hooks/compaction-safeguard.test.ts @@ -2130,7 +2130,7 @@ describe("compaction-safeguard double-compaction guard", () => { }); expect(result).toEqual({ cancel: true }); - expect(getApiKeyAndHeadersMock).toHaveBeenCalled(); + expect(getApiKeyAndHeadersMock).toHaveBeenCalledWith(model); }); it("falls back to visible custom session branch entries before writing an empty boundary", async () => { @@ -2233,7 +2233,7 @@ describe("compaction-safeguard double-compaction guard", () => { apiKey: null, }); expect(result).toEqual({ cancel: true }); - expect(getApiKeyAndHeadersMock).toHaveBeenCalled(); + expect(getApiKeyAndHeadersMock).toHaveBeenCalledWith(model); }); it("treats tool results as real conversation only when linked to a meaningful user ask", () => {