From a77312c371899609729df7fd22117db52872eb7f Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 17 May 2026 03:56:39 +0900 Subject: [PATCH] test(atlas): exclude isSessionActive timeout from retry timer assertion The status timeout uses setTimeout internally, which the test's mocked setTimeout captures. Filter it alongside the dispatch timeout. --- src/hooks/atlas/index.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/atlas/index.test.ts b/src/hooks/atlas/index.test.ts index fb9094d4c..35718e30d 100644 --- a/src/hooks/atlas/index.test.ts +++ b/src/hooks/atlas/index.test.ts @@ -12,6 +12,7 @@ import { import type { BoulderState } from "../../features/boulder-state" import { _resetForTesting, registerAgentName, subagentSessions, updateSessionAgent } from "../../features/claude-code-session-state" import { DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS } from "../../shared/prompt-async-gate" +import { DEFAULT_SESSION_STATUS_TIMEOUT_MS } from "../../shared/session-idle-settle" import type { AtlasHookOptions, PendingTaskRef } from "./types" import { createAtlasHook } from "./index" import { createToolExecuteAfterHandler } from "./tool-execute-after" @@ -1703,7 +1704,7 @@ session_id: ses_untrusted_999 // then - stale idle is consumed, not converted into another scheduled continuation expect(mockInput._promptMock).toHaveBeenCalledTimes(1) - expect(scheduledDelays.filter((delay) => delay >= 5_000 && delay !== DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS)).toHaveLength(0) + expect(scheduledDelays.filter((delay) => delay >= 5_000 && delay !== DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS && delay !== DEFAULT_SESSION_STATUS_TIMEOUT_MS)).toHaveLength(0) } finally { globalThis.setTimeout = originalSetTimeout }