test: skip bootstrap in release validation onboarding

This commit is contained in:
Peter Steinberger
2026-04-27 17:01:46 +01:00
parent 1fd0802b88
commit 04b5dd097d
3 changed files with 73 additions and 42 deletions

View File

@@ -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"

View File

@@ -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,
});

View File

@@ -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);