Skip to content

Commit d66b514

Browse files
authored
fix: allow slower gateway readiness after updates (#117032)
1 parent 6883176 commit d66b514

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎.agents/skills/openclaw-live-updater/scripts/update-main.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
const DEFAULT_CHECKOUT = "/Users/steipete/openclaw";
3737
const DEFAULT_EXPECTED_ORIGIN = "openclaw/openclaw";
3838
const FULL_SHA_RE = /^[0-9a-f]{40}$/u;
39-
const GATEWAY_READINESS_ATTEMPTS = 3;
39+
const GATEWAY_READINESS_ATTEMPTS = 7;
4040
const GATEWAY_READINESS_RETRY_DELAY_MS = 5_000;
4141
const GATEWAY_CLI_TIMEOUT_MS = 30_000;
4242
const GATEWAY_STOP_PROOF_ATTEMPTS = 100;

‎test/scripts/openclaw-live-updater.test.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ describe("openclaw live updater", () => {
528528
(command: string, args: string[]) => {
529529
const call = [command, ...args].join(" ");
530530
calls.push(call);
531-
if (call.includes("gateway status") && ++statusAttempts < 3) {
531+
if (call.includes("gateway status") && ++statusAttempts < 7) {
532532
throw new Error("RPC warming up");
533533
}
534534
},
@@ -537,8 +537,12 @@ describe("openclaw live updater", () => {
537537
(ms: number) => delays.push(ms),
538538
);
539539

540-
expect(delays).toEqual([5_000, 5_000]);
540+
expect(delays).toEqual([5_000, 5_000, 5_000, 5_000, 5_000, 5_000]);
541541
expect(calls).toEqual([
542+
"pnpm openclaw gateway status --deep --require-rpc --json",
543+
"pnpm openclaw gateway status --deep --require-rpc --json",
544+
"pnpm openclaw gateway status --deep --require-rpc --json",
545+
"pnpm openclaw gateway status --deep --require-rpc --json",
542546
"pnpm openclaw gateway status --deep --require-rpc --json",
543547
"pnpm openclaw gateway status --deep --require-rpc --json",
544548
"pnpm openclaw gateway status --deep --require-rpc --json",
@@ -1809,7 +1813,7 @@ describe("openclaw live updater", () => {
18091813
},
18101814
),
18111815
).toThrow("RPC unavailable");
1812-
expect(statusCalls).toBe(4);
1816+
expect(statusCalls).toBe(8);
18131817
expect(auditCalls).toBe(1);
18141818
});
18151819

0 commit comments

Comments
 (0)