From d85d782a0a27bcbc77c04d6c1808535334c6cc5e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 2 May 2026 01:54:02 +0100 Subject: [PATCH] test: stabilize active-memory timeout assertion --- extensions/active-memory/index.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 () => {