From 9d3d7f9e650bbf3dfcba94da5b214a9525b97d3e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 23 Mar 2026 10:19:34 +0000 Subject: [PATCH] fix: restart windows gateway after npm update --- .agents/skills/openclaw-parallels-smoke/SKILL.md | 1 + scripts/e2e/parallels-npm-update-smoke.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.agents/skills/openclaw-parallels-smoke/SKILL.md b/.agents/skills/openclaw-parallels-smoke/SKILL.md index ee137097423..d8182e399b4 100644 --- a/.agents/skills/openclaw-parallels-smoke/SKILL.md +++ b/.agents/skills/openclaw-parallels-smoke/SKILL.md @@ -23,6 +23,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo - Preferred entrypoint: `pnpm test:parallels:npm-update` - Flow: fresh snapshot -> install npm package baseline -> smoke -> install current main tgz on the same guest -> smoke again. - Same-guest update verification should set the default model explicitly to `openai/gpt-5.4` before the agent turn and use a fresh explicit `--session-id` so old session model state does not leak into the check. +- On Windows same-guest update checks, restart the gateway after the npm upgrade before `gateway status` / `agent`; in-place global npm updates can otherwise leave stale hashed `dist/*` module imports alive in the running service. - Linux same-guest update verification should also export `HOME=/root`, pass `OPENAI_API_KEY` via `prlctl exec ... /usr/bin/env`, and use `openclaw agent --local`; the fresh Linux baseline does not rely on persisted gateway credentials. ## macOS flow diff --git a/scripts/e2e/parallels-npm-update-smoke.sh b/scripts/e2e/parallels-npm-update-smoke.sh index cea1c3a3983..8e5ed9d4b5c 100755 --- a/scripts/e2e/parallels-npm-update-smoke.sh +++ b/scripts/e2e/parallels-npm-update-smoke.sh @@ -224,6 +224,10 @@ if (\$version -notmatch '$head_short') { throw 'version mismatch: expected substring $head_short' } & \$openclaw models set openai/gpt-5.4 +# Windows can keep the old hashed dist modules alive across in-place global npm upgrades. +# Restart the gateway/service before verifying status or the next agent turn. +& \$openclaw gateway restart +Start-Sleep -Seconds 5 & \$openclaw gateway status --deep --require-rpc & \$openclaw agent --agent main --session-id parallels-npm-update-windows-$head_short --message 'Reply with exact ASCII text OK only.' --json EOF