From b70dbe32d0311808e95448e0f78dee8931e09664 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 4 May 2026 15:50:21 +0100 Subject: [PATCH] test(release): match versioned Windows upgrade tarballs --- scripts/openclaw-cross-os-release-checks.ts | 2 +- test/scripts/openclaw-cross-os-release-checks.test.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/openclaw-cross-os-release-checks.ts b/scripts/openclaw-cross-os-release-checks.ts index c667429927d..2f4379125ac 100644 --- a/scripts/openclaw-cross-os-release-checks.ts +++ b/scripts/openclaw-cross-os-release-checks.ts @@ -1392,7 +1392,7 @@ export function isRecoverableWindowsPackagedUpgradeTimeoutError( const message = error instanceof Error ? error.message : String(error); return ( /\bCommand timed out:/u.test(message) && - /[/\\]openclaw\.mjs update --tag http:\/\/127\.0\.0\.1:\d+\/openclaw-current\.tgz --yes --json --timeout \d+/u.test( + /[/\\]openclaw\.mjs update --tag http:\/\/127\.0\.0\.1:\d+\/openclaw[^/\s]*\.tgz --yes --json --timeout \d+/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 c197732a3ab..c719284c27c 100644 --- a/test/scripts/openclaw-cross-os-release-checks.test.ts +++ b/test/scripts/openclaw-cross-os-release-checks.test.ts @@ -733,10 +733,18 @@ describe("scripts/openclaw-cross-os-release-checks", () => { it("recognizes the shipped Windows updater packaged-upgrade timeout", () => { const error = new Error( - "Command timed out: C:\\hostedtoolcache\\windows\\node\\24.15.0\\x64\\node.exe C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\openclaw-upgrade-q9DsA7\\prefix\\node_modules\\openclaw\\openclaw.mjs update --tag http://127.0.0.1:49951/openclaw-current.tgz --yes --json --timeout 1500", + "Command timed out: C:\\hostedtoolcache\\windows\\node\\24.15.0\\x64\\node.exe C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\openclaw-upgrade-q9DsA7\\prefix\\node_modules\\openclaw\\openclaw.mjs update --tag http://127.0.0.1:49951/openclaw-2026.5.4-beta.1.tgz --yes --json --timeout 1500", ); expect(isRecoverableWindowsPackagedUpgradeTimeoutError(error, "win32")).toBe(true); + expect( + isRecoverableWindowsPackagedUpgradeTimeoutError( + new Error( + "Command timed out: C:\\prefix\\node_modules\\openclaw\\openclaw.mjs update --tag http://127.0.0.1:49951/openclaw-current.tgz --yes --json --timeout 1500", + ), + "win32", + ), + ).toBe(true); expect(isRecoverableWindowsPackagedUpgradeTimeoutError(error, "linux")).toBe(false); expect( isRecoverableWindowsPackagedUpgradeTimeoutError(