From ab17e06057132cedc7f311328a1d34b84f740ec8 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 28 Apr 2026 23:12:11 +0100 Subject: [PATCH] test(release): extend slow live release timeouts --- scripts/openclaw-cross-os-release-checks.ts | 10 ++++++++-- src/agents/models.profiles.live.test.ts | 4 ++-- .../scripts/openclaw-cross-os-release-checks.test.ts | 12 ++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/scripts/openclaw-cross-os-release-checks.ts b/scripts/openclaw-cross-os-release-checks.ts index 6fabc2b59e0..b39a4e5db46 100644 --- a/scripts/openclaw-cross-os-release-checks.ts +++ b/scripts/openclaw-cross-os-release-checks.ts @@ -69,6 +69,8 @@ export const CROSS_OS_GATEWAY_STATUS_COMMAND_TIMEOUT_MS = CROSS_OS_GATEWAY_STATUS_RPC_TIMEOUT_MS + 45_000; export const CROSS_OS_GATEWAY_READY_TIMEOUT_MS = 3 * 60_000; export const CROSS_OS_WINDOWS_GATEWAY_READY_TIMEOUT_MS = 5 * 60_000; +export const CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS = 15 * 60; +export const CROSS_OS_AGENT_TURN_TIMEOUT_MS = 20 * 60_000; if (isMainModule()) { try { @@ -1871,12 +1873,14 @@ async function runInstalledAgentTurn(params) { sessionId, "--message", "Reply with exact ASCII text OK only.", + "--timeout", + String(CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS), "--json", ], cwd: params.cwd, env: params.env, logPath: params.logPath, - timeoutMs: 10 * 60 * 1000, + timeoutMs: CROSS_OS_AGENT_TURN_TIMEOUT_MS, }); if (!agentOutputHasExpectedOkMarker(result.stdout, { logPath: params.logPath })) { throw new Error("Agent output did not contain the expected OK marker."); @@ -2628,10 +2632,12 @@ async function runAgentTurn(params) { sessionId, "--message", "Reply with exact ASCII text OK only.", + "--timeout", + String(CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS), "--json", ], logPath: params.logPath, - timeoutMs: 10 * 60 * 1000, + timeoutMs: CROSS_OS_AGENT_TURN_TIMEOUT_MS, }); if (!agentOutputHasExpectedOkMarker(result.stdout, { logPath: params.logPath })) { throw new Error("Agent output did not contain the expected OK marker."); diff --git a/src/agents/models.profiles.live.test.ts b/src/agents/models.profiles.live.test.ts index eb805c9e8dd..fe9a8738c18 100644 --- a/src/agents/models.profiles.live.test.ts +++ b/src/agents/models.profiles.live.test.ts @@ -361,12 +361,12 @@ function resolveLiveModelsJsonTimeoutMs( modelsJsonTimeoutRaw?: string, setupTimeoutMs = LIVE_SETUP_TIMEOUT_MS, ): number { - return Math.max(setupTimeoutMs, toInt(modelsJsonTimeoutRaw, 120_000)); + return Math.max(setupTimeoutMs, toInt(modelsJsonTimeoutRaw, 180_000)); } describe("resolveLiveModelsJsonTimeoutMs", () => { it("defaults models.json preparation to a longer setup timeout", () => { - expect(resolveLiveModelsJsonTimeoutMs(undefined, 45_000)).toBe(120_000); + expect(resolveLiveModelsJsonTimeoutMs(undefined, 45_000)).toBe(180_000); }); it("never goes below the shared live setup timeout", () => { diff --git a/test/scripts/openclaw-cross-os-release-checks.test.ts b/test/scripts/openclaw-cross-os-release-checks.test.ts index 2a576e4afc3..d237db69548 100644 --- a/test/scripts/openclaw-cross-os-release-checks.test.ts +++ b/test/scripts/openclaw-cross-os-release-checks.test.ts @@ -15,6 +15,8 @@ import { canConnectToLoopbackPort, buildDiscordSmokeGuildsConfig, buildRealUpdateEnv, + CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS, + CROSS_OS_AGENT_TURN_TIMEOUT_MS, CROSS_OS_GATEWAY_READY_TIMEOUT_MS, CROSS_OS_GATEWAY_STATUS_COMMAND_TIMEOUT_MS, CROSS_OS_GATEWAY_STATUS_RPC_TIMEOUT_MS, @@ -66,6 +68,16 @@ describe("scripts/openclaw-cross-os-release-checks", () => { expect(CROSS_OS_WINDOWS_GATEWAY_READY_TIMEOUT_MS).toBeGreaterThanOrEqual(300_000); }); + it("keeps agent turns more patient than the CLI reply timeout", () => { + expect(CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS).toBeGreaterThanOrEqual(900); + expect(CROSS_OS_AGENT_TURN_TIMEOUT_MS).toBeGreaterThan( + CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS * 1000, + ); + expect(readFileSync("scripts/openclaw-cross-os-release-checks.ts", "utf8")).toContain( + '"--timeout",\n String(CROSS_OS_AGENT_REPLY_TIMEOUT_SECONDS)', + ); + }); + it("accepts OK agent output from the captured log when stdout is empty", () => { const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-output-")); try {