diff --git a/scripts/e2e/lib/bundled-channel/root-owned.sh b/scripts/e2e/lib/bundled-channel/root-owned.sh index ae51c46631a..e0600351d67 100644 --- a/scripts/e2e/lib/bundled-channel/root-owned.sh +++ b/scripts/e2e/lib/bundled-channel/root-owned.sh @@ -39,7 +39,11 @@ trap cleanup EXIT echo "Installing mounted OpenClaw package into root-owned global npm..." package_tgz="${OPENCLAW_CURRENT_PACKAGE_TGZ:?missing OPENCLAW_CURRENT_PACKAGE_TGZ}" -npm install -g "$package_tgz" --no-fund --no-audit >/tmp/openclaw-root-owned-install.log 2>&1 +if ! npm install -g "$package_tgz" --no-fund --no-audit >/tmp/openclaw-root-owned-install.log 2>&1; then + echo "root-owned global npm install failed" >&2 + cat /tmp/openclaw-root-owned-install.log >&2 + exit 1 +fi root="$(package_root)" test -d "$root/dist/extensions/$CHANNEL" diff --git a/scripts/openclaw-cross-os-release-checks.ts b/scripts/openclaw-cross-os-release-checks.ts index 6c060d1f35e..09de747daf8 100644 --- a/scripts/openclaw-cross-os-release-checks.ts +++ b/scripts/openclaw-cross-os-release-checks.ts @@ -1559,29 +1559,12 @@ async function ensureDevUpdateGitInstall(params) { async function runOnboardWithInstalledCli(params) { await withAllocatedGatewayPort(params.lane, async () => { - const args = [ - "onboard", - "--non-interactive", - "--mode", - "local", - "--auth-choice", - params.providerConfig.authChoice, - "--secret-input-mode", - "ref", - "--gateway-port", - String(params.lane.gatewayPort), - "--gateway-bind", - "loopback", - "--skip-skills", - "--accept-risk", - "--json", - ]; - if (params.installDaemon) { - args.push("--install-daemon"); - } - if (!params.installDaemon || shouldSkipInstallerDaemonHealthCheck()) { - args.push("--skip-health"); - } + const args = buildReleaseOnboardArgs({ + authChoice: params.providerConfig.authChoice, + gatewayPort: params.lane.gatewayPort, + installDaemon: params.installDaemon, + skipHealth: !params.installDaemon || shouldSkipInstallerDaemonHealthCheck(), + }); await runInstalledCli({ cliPath: params.cliPath, args, @@ -1593,6 +1576,34 @@ async function runOnboardWithInstalledCli(params) { }); } +export function buildReleaseOnboardArgs(params) { + const args = [ + "onboard", + "--non-interactive", + "--mode", + "local", + "--auth-choice", + params.authChoice, + "--secret-input-mode", + "ref", + "--gateway-port", + String(params.gatewayPort), + "--gateway-bind", + "loopback", + "--skip-skills", + "--skip-bootstrap", + "--accept-risk", + "--json", + ]; + if (params.installDaemon) { + args.push("--install-daemon"); + } + if (params.skipHealth) { + args.push("--skip-health"); + } + return args; +} + async function startManualGatewayFromInstalledCli(params) { mkdirSync(dirname(params.logPath), { recursive: true }); const gatewayLog = createWriteStream(params.logPath, { flags: "a" }); @@ -2360,24 +2371,11 @@ async function runOnboard(params) { await runOpenClaw({ lane: params.lane, env: params.env, - args: [ - "onboard", - "--non-interactive", - "--mode", - "local", - "--auth-choice", - params.providerConfig.authChoice, - "--secret-input-mode", - "ref", - "--gateway-port", - String(params.lane.gatewayPort), - "--gateway-bind", - "loopback", - "--skip-skills", - "--skip-health", - "--accept-risk", - "--json", - ], + args: buildReleaseOnboardArgs({ + authChoice: params.providerConfig.authChoice, + gatewayPort: params.lane.gatewayPort, + skipHealth: true, + }), logPath: params.logPath, timeoutMs: 10 * 60 * 1000, }); diff --git a/test/scripts/openclaw-cross-os-release-checks.test.ts b/test/scripts/openclaw-cross-os-release-checks.test.ts index a0763045651..ee77e1048ef 100644 --- a/test/scripts/openclaw-cross-os-release-checks.test.ts +++ b/test/scripts/openclaw-cross-os-release-checks.test.ts @@ -6,6 +6,7 @@ import { setTimeout as delay } from "node:timers/promises"; import { describe, expect, it } from "vitest"; import { agentOutputHasExpectedOkMarker, + buildReleaseOnboardArgs, buildWindowsDevUpdateToolchainCheckScript, buildWindowsFreshShellVersionCheckScript, buildInstalledBrowserOverrideImportProbeScript, @@ -272,6 +273,34 @@ describe("scripts/openclaw-cross-os-release-checks", () => { expect(shouldUseManagedGatewayService("linux")).toBe(false); }); + it("skips workspace bootstrap during release onboarding", () => { + expect( + buildReleaseOnboardArgs({ + authChoice: "openai-api-key", + gatewayPort: 34111, + skipHealth: true, + }), + ).toEqual([ + "onboard", + "--non-interactive", + "--mode", + "local", + "--auth-choice", + "openai-api-key", + "--secret-input-mode", + "ref", + "--gateway-port", + "34111", + "--gateway-bind", + "loopback", + "--skip-skills", + "--skip-bootstrap", + "--accept-risk", + "--json", + "--skip-health", + ]); + }); + it("keeps the Windows installer runtime on the manual gateway after managed lifecycle checks", () => { expect(shouldExerciseManagedGatewayLifecycleAfterInstall("win32")).toBe(true); expect(shouldUseManagedGatewayForInstallerRuntime("win32")).toBe(false);