test(release): extend slow live release timeouts

This commit is contained in:
Peter Steinberger
2026-04-28 23:12:11 +01:00
parent 3978d44fa8
commit ab17e06057
3 changed files with 22 additions and 4 deletions

View File

@@ -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.");

View File

@@ -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", () => {

View File

@@ -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 {