Fix Windows build detection without OS env var - #822
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 10:05 AM ET / 14:05 UTC. Summary Reproducibility: yes. from source inspection: current main checks only Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this focused Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main checks only Is this the best way to solve the issue? Yes; using PowerShell's AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e7982bafb86. Label changesLabel justifications:
Evidence reviewedWhat 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
|
|
@clawsweeper re-review Local follow-up on the single failing CI shard at the exact PR head 4337fe7. I reproduced the same setup-connect E2E lane locally, matching the workflow shape:
Result: passed locally, 15/15 tests. Environment used for the local run:
The failing GitHub shard appears to fail before any individual setup/connect assertion runs. The downloaded CI artifact shows wsl-create timing out while probing a freshly installed WSL distro:
The equivalent local step completed successfully:
Local teardown also completed successfully and left no OpenClawE2E-* distro registered. So the current evidence suggests the red setup-connect shard is a GitHub runner WSL startup/probe timeout rather than a regression from this one-file �uild.ps1 change. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
Fixes #821.
build.ps1no longer relies on the mutableOS=Windows_NTenvironment variable to decide whether it is running on Windows.The script now uses:
$IsWindowsautomatic variable when available.[System.Environment]::OSVersion.Platformas a Windows PowerShell-compatible fallback.Why
On a Windows Insider/preview host (
25H2, build26200.8737), a PowerShell 7 process can run without$env:OSpopulated. In that case the previous check rejected a real Windows host with:Validation
On Windows
25H2build26200.8737:./build.ps1 -CheckOnlywith$env:OS = $nullpassed and reportedWindows detected../build.ps1with$env:OS = $nullpassed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restorepassed: 2417 passed, 29 skipped.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restorepassed: 1154 passed.openclaw-autoreviewon the one-file diff reported no accepted/actionable findings.Notes:
--no-restoretest attempt hit the repository-documented first-run asset gotcha. I ran the same test projects once with restore to materialize assets, then reran the canonical--no-restorecommands above.