Use Arm64-aware wording when WSL reports virtualization off - #594
Conversation
The SetupEngine preflight-wsl step previously surfaced x86-only firmware terminology (VT-x/AMD-V, BIOS/UEFI) when wsl.exe reported 'virtualization is not enabled'. On ARM64 devices (e.g. Surface) those terms don't apply, leaving the remediation message confusing. Split TryGetEnvironmentIssue into a public 1-arg method that delegates to a new internal overload taking System.Runtime.InteropServices. Architecture. The Arm64 branch emits UEFI-/Intune-aware wording; other architectures keep the existing x64 wording. RuntimeInformation. OSArchitecture reflects OS arch (not process arch), so this works even when the app runs as win-x64 under Prism on ARM64 Windows. Fixes openclaw#593 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs real behavior proof before merge. Reviewed June 5, 2026, 2:24 PM ET / 18:24 UTC. Summary Reproducibility: yes. from source and linked issue evidence: current master always emits x86-specific VT-x/AMD-V wording for the matched WSL virtualization-off output, and the linked ARM64 report shows that wording surfacing in setup. I did not run a live Windows ARM64 setup flow in this read-only Linux checkout. Review metrics: 1 noteworthy metric.
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:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused wording and regression-test change after redacted ARM64 setup proof confirms the remediation no longer names VT-x, AMD-V, or SVM, and track localized WSL-output detection separately. Do we have a high-confidence way to reproduce the issue? Yes, from source and linked issue evidence: current master always emits x86-specific VT-x/AMD-V wording for the matched WSL virtualization-off output, and the linked ARM64 report shows that wording surfacing in setup. I did not run a live Windows ARM64 setup flow in this read-only Linux checkout. Is this the best way to solve the issue? Yes, the architecture-aware message split is a narrow maintainable fix that preserves the existing public helper and non-Arm64 wording while adding direct tests for the Arm64 branch. The localized WSL-output/HRESULT question is better handled as a follow-up because this PR does not change detection semantics. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against afa6218338d6. Label changesLabel justifications:
Evidence reviewedAcceptance 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
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #593.
Problem
On ARM64 devices (e.g. Surface), when wsl.exe reports virtualization is off, the SetupEngine preflight-wsl step surfaces x86-only firmware terminology — "VT-x/AMD-V (Intel VT or AMD SVM) in your computer's BIOS/UEFI" — which doesn't apply on ARM64 (no VT-x, no AMD-V, no SVM; UEFI has its own generic "Virtualization Support" label).
Fix
Split
TryGetEnvironmentIssueinto:RuntimeInformation.OSArchitecture.System.Runtime.InteropServices.Architecture, exposed to tests via the existingInternalsVisibleTo.The Arm64 branch emits UEFI- and Intune-aware wording; all other architectures keep the existing x64 wording.
RuntimeInformation.OSArchitecturereflects OS architecture (not process), so this works correctly even when SetupEngine.UI runs aswin-x64under Prism on ARM64 Windows.Tests
DetectsFirmwareVirtualizationOfftest pinned toArchitecture.X64(asserts BIOS + VT-x wording).UsesArm64WordingOnArm64test exercisesArchitecture.Arm64and asserts the message contains "ARM64" + "UEFI" + "virtualization" and does not contain "VT-x", "AMD-V", or "SVM".PreflightWsl_FailsTerminalWhenVirtualizationDisabledInFirmwarerelaxed to assert "virtualization" (architecture-agnostic) instead of "BIOS".Validation:
./build.ps1✅ · SetupEngine tests 233/0 ✅ · Shared 2045/29 skipped ✅ · Tray 936/0 ✅.Locale dependency
This PR does not introduce any new dependency on English wsl.exe output. The guard condition (
"virtualization is not enabled"substring match) is unchanged from master — only the remediation message string is branched on CPU architecture. If wsl.exe emits English here, both the old code and the new code fire the branch; if wsl.exe emits a localized string, neither fires (same as today).Known limitation (out of scope for this PR — needs follow-up)
Per @shanselman's comment on #593: the detection itself is a literal English substring match (
"virtualization is not enabled") against wsl.exe output. The existing code comment inSetupSteps.csalready flags this risk and prefers HRESULT matching where available (e.g. the sibling0x80370102branch is locale-stable), but no HRESULT is currently used for this firmware-off case.On a non-English Windows install, wsl.exe is likely to emit localized text and this branch won't fire at all — users would fall through to the generic failure path with no remediation hint. This PR does not change that behavior; it only fixes the wording when the branch does fire.
Open questions worth confirming with @craigloewen-msft or Ben Hillis:
Review
Adversarial dual-model review (Claude Opus 4.6 + GPT-5.2 Codex) — both converged on "ship it"; no actionable findings. Critical question resolved:
RuntimeInformation.OSArchitecturereturns Arm64 under Prism (it reflects the machine, not the process).