fix: restart windows gateway after npm update

This commit is contained in:
Peter Steinberger
2026-03-23 10:19:34 +00:00
parent a0ad47440a
commit 9d3d7f9e65
2 changed files with 5 additions and 0 deletions

View File

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

View File

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