feat(setup): offer native Windows and WSL gateway modes - #938
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 2:51 PM ET / 18:51 UTC. Summary Reproducibility: yes. for the blocking PR defect: start the tray with a managed native gateway, terminate the gateway after startup, and observe that it is not restarted until a manual action or tray relaunch. Source inspection provides a high-confidence path even though this review did not execute Windows. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep WSL 2 recommended, present native Windows as explicitly lower-isolation, add ownership-checked recurring or event-driven crash recovery that honors user stop intent, and prove the exact head through fresh install, failure recovery, switching, and uninstall. Do we have a high-confidence way to reproduce the issue? Yes for the blocking PR defect: start the tray with a managed native gateway, terminate the gateway after startup, and observe that it is not restarted until a manual action or tray relaunch. Source inspection provides a high-confidence path even though this review did not execute Windows. Is this the best way to solve the issue? No, not yet; the ownership model is reasonable, but an app-managed native runtime needs ongoing recovery rather than a one-time startup ensure. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0afbc425fb7. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
|
@steipete this is a massive deal, we will do a bunch of testing and report back |
|
Can we consider shipping the native Windows experience as an opt-in capability initially? Running OpenClaw natively on Windows without any form of containment appears too risky for many enterprise scenarios. At the same time, introducing containment from day one may significantly impact usability until we have sufficient experience tuning and validating the appropriate policy set. An opt-in approach would allow us to gather real-world feedback, understand customer adoption patterns, and iteratively refine the containment model before making it the default experience. For reference, the current containment work is tracked in Containment PR - openclaw/openclaw#97086 |
Pre-merge blockers and native/WSL parity gapsI took a pass through the PR locally and compared the native Windows path against the current WSL path and the macOS gateway-control model. I think these should be addressed before merge. Merge blockers / must-fix before merge
Important parity gaps
Recommended framing changeCurrent PR wording says native is recommended because it is simpler/no WSL. I’d change the product framing to:
Things that look okay
|
6bda31f to
51ed356
Compare
Restore WSL as the recommended local setup path while keeping native Windows available as the simpler lower-isolation option. Avoid desktop-only wizard dead ends by auto-deferring terminal hatch and skipping redundant gateway service runtime prompts. Add setup-owned native gateway lifecycle metadata, controls, keepalive suppression after explicit stop, and stale node token recovery. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Make native Windows gateway setup fast, deterministic on reinstall, and non-blocking in the wizard, mirroring the WSL appliance flow while still repairing real Windows CLI/Scheduled-Task/profile state. - Wizard: give note/acknowledge steps the slow timeout ceiling so the finalize "Security" note ack survives the gateway's shell-completion work instead of timing out and stranding setup. - Install: skip the native CLI reinstall when the app-owned launcher is already at the pinned version; probe only the managed launcher and fall through to a full install on any mismatch or failure. - Configure: write one `config set --batch-file` instead of per-key CLI calls; keep the auth token in a temp file (never on argv), sweep stale temp files, and always delete it in finally. - Start: wait for the install-launched Scheduled Task via /healthz polling and fail terminal on timeout instead of issuing a destructive `gateway start`; verify ownership fail-closed on the identity signals the real `gateway status --json` reports (port, label, profile, sourcePath). - Installer: apply the PowerShell 5 SQLite-probe quoting workaround only when the probe is present; otherwise proceed and surface a warning. - Reinstall: reset the app-owned native profile on clean runs to clear stale device/token state. - CPU: sample usage via GetSystemTimes instead of a synchronous PerformanceCounter first-touch that stalled node connect. - Remove the superseded device-token finalization helpers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Only apply the Windows PowerShell 5 quote workaround to the old inline sqlite probe assignment. The current installer pipes the probe over stdin, so rewriting the shared probe body makes node detection fail even when node.exe is on PATH. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ca8dfa2 to
5eebb5d
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(setup): offer native Windows and WSL gateway modes This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
PATHentriesBuilds on the onboarding redesign from #925.
Implementation notes
%LOCALAPPDATA%\OpenClawTray\native-cli\tools\nodenative-cli\openclaw.ps1andopenclaw.cmd, which directly execute the privatenode.exeplus OpenClaw entry pointinstall-cli.shmodelValidation
Current rebased head:
5eebb5dbonmainatd2638ddb..\build.ps1: 5 projects, 0 warnings, 0 errorsdotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,219 passed, 31 skippeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 1,971 passeddotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: 864 passeddotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore: 450 passedWizardConsoleTailtimeout occurred during the first post-rebase tray run; its isolated rerun passed, then the complete required build/shared/tray closeout passedReal behavior proof
From current head on Windows with system/portable Node locations removed from the setup process
PATH:v24.15.0(x64)OpenClaw 2026.6.11using the private runtime and an already-populated npm cachegateway.cmddirectly referenced the privatenode.exeand private OpenClaw package200; operator finalization and Windows node pairing completed13308to PID29424with health restored to200gateway stopremained stopped beyond the retry interval with zero managed gateway processesNot verified / blocked
A fresh live npm package download is not claimed because
registry.npmjs.orgreturned endpoint-wide TLS handshake failures from Node, curl, and PowerShell on this host. The same private-runtime install completed from the populated npm cache, while the official Node ZIP download remained live and successful.Review