fix(coding-agent): mark retrying agent end events

This commit is contained in:
Mario Zechner
2026-05-19 10:33:16 +02:00
parent 32bcdc9739
commit c685b27369
4 changed files with 28 additions and 7 deletions

View File

@@ -113,14 +113,13 @@ describe("AgentSession auto-compaction queue resume", () => {
const runAutoCompaction = (
session as unknown as {
_runAutoCompaction: (reason: "overflow" | "threshold", willRetry: boolean) => Promise<void>;
_runAutoCompaction: (reason: "overflow" | "threshold", willRetry: boolean) => Promise<boolean>;
}
)._runAutoCompaction.bind(session);
await runAutoCompaction("threshold", false);
await vi.advanceTimersByTimeAsync(100);
await expect(runAutoCompaction("threshold", false)).resolves.toBe(true);
expect(continueSpy).toHaveBeenCalledTimes(1);
expect(continueSpy).not.toHaveBeenCalled();
});
it("should not compact repeatedly after overflow recovery already attempted", async () => {