From beb2fded6d149c29b9909fd0446b9650cc77fbd6 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 19 Apr 2026 08:41:58 +0100 Subject: [PATCH] test: stabilize standalone Parallels smoke lanes --- scripts/e2e/parallels-windows-smoke.sh | 60 +++++++++++++++---- scripts/stage-bundled-plugin-runtime-deps.mjs | 5 ++ 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/scripts/e2e/parallels-windows-smoke.sh b/scripts/e2e/parallels-windows-smoke.sh index 9190413176f..f032803dca7 100644 --- a/scripts/e2e/parallels-windows-smoke.sh +++ b/scripts/e2e/parallels-windows-smoke.sh @@ -45,7 +45,7 @@ TIMEOUT_UPDATE_S=300 TIMEOUT_UPDATE_POLL_GRACE_S=60 TIMEOUT_VERIFY_S=120 TIMEOUT_ONBOARD_S=240 -TIMEOUT_ONBOARD_PHASE_S=$((TIMEOUT_ONBOARD_S + 60)) +TIMEOUT_ONBOARD_PHASE_S=$((TIMEOUT_ONBOARD_S + 120)) # verify_gateway_reachable runs six 30s probes plus short retry sleeps. TIMEOUT_GATEWAY_S=240 TIMEOUT_AGENT_S=180 @@ -1997,8 +1997,10 @@ param( try { \$openclaw = Join-Path \$env:APPDATA 'npm\openclaw.cmd' - \$cmdLine = ('"{0}" onboard --non-interactive --mode local --auth-choice ${AUTH_CHOICE} --secret-input-mode ref --gateway-port 18789 --gateway-bind loopback --install-daemon --skip-skills --skip-health --accept-risk --json > "{1}" 2>&1' -f \$openclaw, \$LogPath) + Set-Content -Path \$LogPath -Value 'onboard.start' + \$cmdLine = ('"{0}" onboard --non-interactive --mode local --auth-choice ${AUTH_CHOICE} --secret-input-mode ref --gateway-port 18789 --gateway-bind loopback --install-daemon --skip-skills --skip-health --accept-risk --json >> "{1}" 2>&1' -f \$openclaw, \$LogPath) & cmd.exe /d /s /c \$cmdLine + Add-Content -Path \$LogPath -Value ('onboard.exit={0}' -f \$LASTEXITCODE) Set-Content -Path \$DonePath -Value ([string]\$LASTEXITCODE) } catch { if (Test-Path \$LogPath) { @@ -2015,6 +2017,7 @@ run_ref_onboard() { local api_key_env_q api_key_value_q script_url local runner_name log_name done_name done_status launcher_state local poll_rc state_rc log_rc start_seconds poll_deadline startup_checked + local guest_log log_state_path api_key_env_q="$(ps_single_quote "$API_KEY_ENV")" api_key_value_q="$(ps_single_quote "$API_KEY_VALUE")" write_onboard_runner_script @@ -2025,6 +2028,8 @@ run_ref_onboard() { start_seconds="$SECONDS" poll_deadline=$((SECONDS + TIMEOUT_ONBOARD_S + 60)) startup_checked=0 + log_state_path="$(mktemp "${TMPDIR:-/tmp}/openclaw-onboard-log-state.XXXXXX")" + : >"$log_state_path" guest_powershell "$(cat <= poll_deadline )); then warn "windows onboard helper timed out while polling done file" + rm -f "$log_state_path" return 1 fi sleep 2 continue fi + set +e + stream_windows_onboard_log + log_rc=$? + set -e + if [[ $log_rc -ne 0 ]]; then + warn "windows onboard helper live log poll failed; retrying" + fi if [[ -n "$done_status" ]]; then - set +e - guest_powershell_poll 20 "\$log = Join-Path \$env:TEMP '$log_name'; if (Test-Path \$log) { Get-Content \$log }" - log_rc=$? - set -e - if [[ $log_rc -ne 0 ]]; then + if ! stream_windows_onboard_log; then warn "windows onboard helper log drain failed after completion" fi + rm -f "$log_state_path" [[ "$done_status" == "0" ]] return $? fi @@ -2076,18 +2114,16 @@ EOF startup_checked=1 if [[ $state_rc -eq 0 && "$launcher_state" == *"runner=False"* && "$launcher_state" == *"log=False"* && "$launcher_state" == *"done=False"* ]]; then warn "windows onboard helper failed to materialize guest files" + rm -f "$log_state_path" return 1 fi fi if (( SECONDS >= poll_deadline )); then - set +e - guest_powershell_poll 20 "\$log = Join-Path \$env:TEMP '$log_name'; if (Test-Path \$log) { Get-Content \$log }" - log_rc=$? - set -e - if [[ $log_rc -ne 0 ]]; then + if ! stream_windows_onboard_log; then warn "windows onboard helper log drain failed after timeout" fi warn "windows onboard helper timed out waiting for done file" + rm -f "$log_state_path" return 1 fi sleep 2 diff --git a/scripts/stage-bundled-plugin-runtime-deps.mjs b/scripts/stage-bundled-plugin-runtime-deps.mjs index d1ddf4c7635..cef89d6e272 100644 --- a/scripts/stage-bundled-plugin-runtime-deps.mjs +++ b/scripts/stage-bundled-plugin-runtime-deps.mjs @@ -815,7 +815,10 @@ function runNpmInstall(params) { const npmEnv = { ...(params.npmRunner.env ?? process.env), CI: "1", + npm_config_audit: "false", + npm_config_fund: "false", npm_config_loglevel: "error", + npm_config_progress: "false", npm_config_yes: "true", }; const result = spawnSync(params.npmRunner.command, params.npmRunner.args, { @@ -1021,6 +1024,8 @@ function installPluginRuntimeDeps(params) { npmArgs: [ "install", "--omit=dev", + "--no-audit", + "--no-fund", "--ignore-scripts", "--legacy-peer-deps", "--package-lock=false",