From 7a69069bfca1fe0b611780b8099efd7cb389433b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 29 Apr 2026 13:31:25 +0100 Subject: [PATCH] ci: retry release live smokes faster --- .../openclaw-live-and-e2e-checks-reusable.yml | 4 ++-- scripts/openclaw-cross-os-release-checks.ts | 5 ++++- .../openclaw-cross-os-release-checks.test.ts | 13 +++++++++++++ test/scripts/package-acceptance-workflow.test.ts | 5 ++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml b/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml index 7896c016e81..2442b743e79 100644 --- a/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml +++ b/.github/workflows/openclaw-live-and-e2e-checks-reusable.yml @@ -2060,8 +2060,8 @@ jobs: live-cli-backend-docker) echo "OPENCLAW_LIVE_CLI_BACKEND_MODEL=codex-cli/gpt-5.5" >> "$GITHUB_ENV" echo "OPENCLAW_LIVE_CLI_BACKEND_AUTH=api-key" >> "$GITHUB_ENV" - echo 'OPENCLAW_LIVE_CLI_BACKEND_ARGS=["exec","--json","--color","never","--sandbox","danger-full-access","--skip-git-repo-check"]' >> "$GITHUB_ENV" - echo 'OPENCLAW_LIVE_CLI_BACKEND_RESUME_ARGS=["exec","resume","{sessionId}","-c","sandbox_mode=\"danger-full-access\"","--skip-git-repo-check"]' >> "$GITHUB_ENV" + echo 'OPENCLAW_LIVE_CLI_BACKEND_ARGS=["exec","--json","--color","never","--sandbox","danger-full-access","-c","service_tier=\"fast\"","--skip-git-repo-check"]' >> "$GITHUB_ENV" + echo 'OPENCLAW_LIVE_CLI_BACKEND_RESUME_ARGS=["exec","resume","{sessionId}","-c","sandbox_mode=\"danger-full-access\"","-c","service_tier=\"fast\"","--skip-git-repo-check"]' >> "$GITHUB_ENV" echo "OPENCLAW_LIVE_CLI_BACKEND_DEBUG=1" >> "$GITHUB_ENV" echo "OPENCLAW_CLI_BACKEND_LOG_OUTPUT=1" >> "$GITHUB_ENV" echo "OPENCLAW_TEST_CONSOLE=1" >> "$GITHUB_ENV" diff --git a/scripts/openclaw-cross-os-release-checks.ts b/scripts/openclaw-cross-os-release-checks.ts index 7af9f670f6f..9ca3773162e 100644 --- a/scripts/openclaw-cross-os-release-checks.ts +++ b/scripts/openclaw-cross-os-release-checks.ts @@ -91,6 +91,7 @@ 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_TURN_TIMEOUT_SECONDS = 180; if (isMainModule()) { try { @@ -2708,13 +2709,15 @@ function buildReleaseAgentTurnArgs(sessionId) { "Reply with exact ASCII text OK only.", "--thinking", "minimal", + "--timeout", + String(CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS), "--json", ]; } export function shouldRetryCrossOsAgentTurnError(error) { const message = error instanceof Error ? error.message : String(error); - return /failed to (?:install|stage) bundled runtime deps|failed to stage bundled runtime deps after|Agent output did not contain the expected OK marker|model idle timeout|did not produce a response before the model idle timeout/u.test( + return /failed to (?:install|stage) bundled runtime deps|failed to stage bundled runtime deps after|Agent output did not contain the expected OK marker|model idle timeout|did not produce a response before the model idle timeout|gateway request timeout for agent|Command timed out|timed out and could not be terminated cleanly/u.test( message, ); } diff --git a/test/scripts/openclaw-cross-os-release-checks.test.ts b/test/scripts/openclaw-cross-os-release-checks.test.ts index 37728b42412..8c6f214143b 100644 --- a/test/scripts/openclaw-cross-os-release-checks.test.ts +++ b/test/scripts/openclaw-cross-os-release-checks.test.ts @@ -30,6 +30,7 @@ import { CROSS_OS_WINDOWS_GATEWAY_READY_TIMEOUT_MS, CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS, CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS, + CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS, isImmutableReleaseRef, looksLikeReleaseVersionRef, normalizeRequestedRef, @@ -120,6 +121,16 @@ describe("scripts/openclaw-cross-os-release-checks", () => { ), ), ).toBe(true); + expect( + shouldRetryCrossOsAgentTurnError( + new Error("gateway request timeout for agent after 210000ms"), + ), + ).toBe(true); + expect( + shouldRetryCrossOsAgentTurnError( + new Error("Command timed out and could not be terminated cleanly"), + ), + ).toBe(true); }); it("allows cross-OS provider smoke models to use faster CI overrides", () => { @@ -150,6 +161,8 @@ describe("scripts/openclaw-cross-os-release-checks", () => { const source = readFileSync("scripts/openclaw-cross-os-release-checks.ts", "utf8"); expect(source).toContain('"--thinking",\n "minimal"'); + expect(CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS).toBeLessThanOrEqual(180); + expect(source).toContain('"--timeout",\n String(CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS)'); expect(source.match(/buildReleaseAgentTurnArgs\(sessionId\)/g)?.length).toBeGreaterThanOrEqual( 2, ); diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index e4284655dcb..982b94603b3 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -132,7 +132,10 @@ describe("package artifact reuse", () => { expect(workflow).toContain("OPENCLAW_LIVE_CLI_BACKEND_MODEL=codex-cli/gpt-5.5"); expect(workflow).toContain("OPENCLAW_LIVE_CLI_BACKEND_AUTH=api-key"); expect(workflow).toContain("OPENCLAW_LIVE_CLI_BACKEND_USE_CI_SAFE_CODEX_CONFIG=1"); - expect(workflow).toContain('service_tier=\\"fast\\"'); + expect((workflow.match(/service_tier=\\"fast\\"/g) ?? []).length).toBeGreaterThanOrEqual(2); + expect(workflow).not.toContain( + 'OPENCLAW_LIVE_CLI_BACKEND_ARGS=["exec","--json","--color","never","--sandbox","danger-full-access","--skip-git-repo-check"]', + ); expect(workflow).toContain("bash .release-harness/scripts/ci-live-command-retry.sh"); expect(workflow).toContain("suite_id: native-live-src-gateway-core"); expect(workflow).toContain("suite_id: native-live-src-gateway-backends");