|
| 1 | +# Parallels Windows proof backend |
| 2 | + |
| 3 | +Use this optional backend only from macOS when Parallels Desktop is installed and activated and a |
| 4 | +Windows 11 VM has already been downloaded. Run commands from the `openclaw-windows-node` repo root. |
| 5 | + |
| 6 | +The sibling OpenClaw repo owns the general Windows VM lifecycle. Read |
| 7 | +`../../../../openclaw/.agents/skills/openclaw-parallels-smoke/SKILL.md` for `prlctl` transport, |
| 8 | +WSL/Git/Node provisioning, clean/E2E snapshots, OpenClaw smoke, and general troubleshooting. Keep |
| 9 | +the `openclaw` and `openclaw-windows-node` checkouts beside each other, or set `OPENCLAW_REPO`. |
| 10 | + |
| 11 | +## Prepare the app layer |
| 12 | + |
| 13 | +```bash |
| 14 | +./scripts/parallels-windows-vm.sh inventory |
| 15 | +./scripts/parallels-windows-vm.sh prepare |
| 16 | +./scripts/parallels-windows-vm.sh verify |
| 17 | +``` |
| 18 | + |
| 19 | +The wrapper restores the newest general `e2e` snapshot, then adds only the native app prerequisites: |
| 20 | + |
| 21 | +1. .NET 10 SDK. |
| 22 | +2. Windows SDK 10.0.26100. |
| 23 | +3. WebView2 Runtime. |
| 24 | +4. A clean `openclaw-windows-node` checkout and `scripts/setup-dev.ps1 -CheckOnly`. |
| 25 | +5. A dated power-off `pre-openclaw-windows-app-e2e-*` snapshot. |
| 26 | + |
| 27 | +When today's app snapshot exists, `prepare` restores and verifies it. This discards post-snapshot |
| 28 | +guest changes. Package installation reuses the OpenClaw controller's official WinGet manifest hash, |
| 29 | +Authenticode publisher, ACL-restricted staging, reboot handling, and bounded transport. |
| 30 | + |
| 31 | +## Restore snapshots |
| 32 | + |
| 33 | +- `clean`: newest raw Windows snapshot. |
| 34 | +- `e2e`: newest general OpenClaw Windows snapshot. |
| 35 | +- `app`: newest native Windows app snapshot. |
| 36 | + |
| 37 | +```bash |
| 38 | +./scripts/parallels-windows-vm.sh restore --snapshot app |
| 39 | +./scripts/parallels-windows-vm.sh restore --snapshot "pre-openclaw-windows-app-e2e-<date>" |
| 40 | +``` |
| 41 | + |
| 42 | +Never restore while another developer or smoke lane owns the VM. Use an exact name or id for |
| 43 | +historical reproduction; aliases select the newest matching snapshot. |
| 44 | + |
| 45 | +## Run required validation |
| 46 | + |
| 47 | +```bash |
| 48 | +./scripts/parallels-windows-vm.sh run-tests |
| 49 | +./scripts/parallels-windows-vm.sh run-tests --ref <pushed-branch-or-full-sha> |
| 50 | +``` |
| 51 | + |
| 52 | +The default restores `app`. The controller copies the current |
| 53 | +`scripts/parallels-run-validation.ps1` into guest temp, launches it in the desktop session, polls |
| 54 | +with short host-bounded `prlctl exec` calls, stops the process tree at 90 minutes, and runs: |
| 55 | + |
| 56 | +- `./build.ps1` |
| 57 | +- Shared tests |
| 58 | +- Tray tests |
| 59 | + |
| 60 | +For an unpushed reviewed change, restore `app`, sync an isolated guest checkout, then use |
| 61 | +`run-tests --no-restore`. Never use `--no-restore` as clean-snapshot evidence. |
| 62 | + |
| 63 | +Continue with the proof checklist in [SKILL.md](SKILL.md) when the change needs screenshots/video, |
| 64 | +`winnode` or raw MCP output, Gateway invocation, accessibility, permissions, Command Center, |
| 65 | +chat/canvas, or MXC evidence. |
| 66 | + |
| 67 | +## Remote execution rules |
| 68 | + |
| 69 | +- Use `--current-user` for checkout, app launch, tests, Git, and user state. |
| 70 | +- Use SYSTEM only for machine installers through the shared verified staging path. |
| 71 | +- Use explicit `.cmd` shims for `npm`, `pnpm`, and `openclaw` when resolution is ambiguous. |
| 72 | + |
| 73 | +## Troubleshooting |
| 74 | + |
| 75 | +- Missing .NET, Windows SDK, or WebView2: rerun `prepare`; do not add app prerequisites to the |
| 76 | + general `e2e` snapshot. |
| 77 | +- Missing `app` snapshot: run `prepare`; an older general E2E snapshot does not contain the native |
| 78 | + app layer. |
| 79 | +- Locked build output: stop the companion/WinUI process, restore `app`, and rerun all required |
| 80 | + suites. |
| 81 | +- Missing sibling controller/API: use an OpenClaw revision containing |
| 82 | + `scripts/e2e/parallels-windows-prepare.sh`. |
0 commit comments