diff --git a/extensions/active-memory/index.test.ts b/extensions/active-memory/index.test.ts index 5257dc56155..182efd637c3 100644 --- a/extensions/active-memory/index.test.ts +++ b/extensions/active-memory/index.test.ts @@ -2210,7 +2210,7 @@ describe("active-memory plugin", () => { it("returns timeout within a hard deadline even when the subagent never checks the abort signal", async () => { const CONFIGURED_TIMEOUT_MS = 200; - const MARGIN_MS = 500; + const HARD_DEADLINE_MARGIN_MS = 4_800; __testing.setMinimumTimeoutMsForTests(1); __testing.setSetupGraceTimeoutMsForTests(0); api.pluginConfig = { @@ -2244,7 +2244,7 @@ describe("active-memory plugin", () => { .mock.calls.map((call: unknown[]) => String(call[0])); expect(infoLines.some((line: string) => line.includes("status=timeout"))).toBe(true); // Hard deadline: wall-clock time must be near timeoutMs, not 30s. - expect(wallClockMs).toBeLessThan(CONFIGURED_TIMEOUT_MS + MARGIN_MS); + expect(wallClockMs).toBeLessThan(CONFIGURED_TIMEOUT_MS + HARD_DEADLINE_MARGIN_MS); }); it("returns undefined instead of throwing when an unexpected error escapes prompt building", async () => {