From d66b514a7e7565d89c87ab6f1a509623128093f0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 31 Jul 2026 13:38:06 -0700 Subject: [PATCH] fix: allow slower gateway readiness after updates (#117032) --- .../openclaw-live-updater/scripts/update-main.mjs | 2 +- test/scripts/openclaw-live-updater.test.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.agents/skills/openclaw-live-updater/scripts/update-main.mjs b/.agents/skills/openclaw-live-updater/scripts/update-main.mjs index 61c74956d9ec..f187aa15ddab 100644 --- a/.agents/skills/openclaw-live-updater/scripts/update-main.mjs +++ b/.agents/skills/openclaw-live-updater/scripts/update-main.mjs @@ -36,7 +36,7 @@ import { const DEFAULT_CHECKOUT = "/Users/steipete/openclaw"; const DEFAULT_EXPECTED_ORIGIN = "openclaw/openclaw"; const FULL_SHA_RE = /^[0-9a-f]{40}$/u; -const GATEWAY_READINESS_ATTEMPTS = 3; +const GATEWAY_READINESS_ATTEMPTS = 7; const GATEWAY_READINESS_RETRY_DELAY_MS = 5_000; const GATEWAY_CLI_TIMEOUT_MS = 30_000; const GATEWAY_STOP_PROOF_ATTEMPTS = 100; diff --git a/test/scripts/openclaw-live-updater.test.ts b/test/scripts/openclaw-live-updater.test.ts index f3b7d2da60d1..198e4d8782ce 100644 --- a/test/scripts/openclaw-live-updater.test.ts +++ b/test/scripts/openclaw-live-updater.test.ts @@ -528,7 +528,7 @@ describe("openclaw live updater", () => { (command: string, args: string[]) => { const call = [command, ...args].join(" "); calls.push(call); - if (call.includes("gateway status") && ++statusAttempts < 3) { + if (call.includes("gateway status") && ++statusAttempts < 7) { throw new Error("RPC warming up"); } }, @@ -537,8 +537,12 @@ describe("openclaw live updater", () => { (ms: number) => delays.push(ms), ); - expect(delays).toEqual([5_000, 5_000]); + expect(delays).toEqual([5_000, 5_000, 5_000, 5_000, 5_000, 5_000]); expect(calls).toEqual([ + "pnpm openclaw gateway status --deep --require-rpc --json", + "pnpm openclaw gateway status --deep --require-rpc --json", + "pnpm openclaw gateway status --deep --require-rpc --json", + "pnpm openclaw gateway status --deep --require-rpc --json", "pnpm openclaw gateway status --deep --require-rpc --json", "pnpm openclaw gateway status --deep --require-rpc --json", "pnpm openclaw gateway status --deep --require-rpc --json", @@ -1809,7 +1813,7 @@ describe("openclaw live updater", () => { }, ), ).toThrow("RPC unavailable"); - expect(statusCalls).toBe(4); + expect(statusCalls).toBe(8); expect(auditCalls).toBe(1); });