feat: add clean Windows validation infrastructure - #1116
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Automate verified Windows 11 Enterprise Evaluation installation with owned answer media, DPAPI credentials, bounded readiness, cleanup, and focused lifecycle coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Set the signed-in user as owner when UAC-created setup material defaults to Administrators, and document safe pre-VM recovery. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the canonical MicrosoftWindows template and safely resume an owned Off VM whose security setup failed before first boot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Establish and preserve the VM key protector before applying secure-boot firmware, then conditionally enable vTPM and reverify before start. Pin the shared fresh and resume ordering contract and document safe partial-state recovery. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject every four-byte Hyper-V key-protector sentinel, re-read newly created protectors, and fail before firmware or vTPM unless the host reports a substantive blob. Add executable sentinel and ordering regressions and update resume guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Poll Hyper-V until owned installation media detach state converges and permit already-detached continuation only for the exact owned powershell-direct-ready recovery state. Preserve strict first-attempt media requirements and complete credential rotation and guest verification on resume. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Persist owned pending checkpoint intent before creation, poll for eventual snapshot visibility, and finalize identity only after observation. Add explicit confirmed recovery for exact completed unattended clean-windows snapshots while keeping pending markers unauthorized for destructive operations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Treat an active Hyper-V differencing disk as owned only when a bounded, cycle-safe Get-VHD parent chain terminates at the exact owner-marked base VHD. Preserve strict single-disk and VM marker identity checks with focused checkpoint ancestry coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Enable WSL platform features before reboot, install the package through bounded native process capture, reboot again after installation, and verify WSL before developer prerequisites. Preserve PowerShell Direct failure reasons with bounded sanitized diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Route status-ready version-failing clean guests through one fixed noninteractive WSL web update, require the second owned reboot after update, and retain final zero-exit status and version verification before developer prerequisites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Treat WSL status as authoritative: install immediately when absent without invoking the interactive version bootstrap, and probe version only for status-ready guests before deciding whether an update is required. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Force the exact machine-scope PowerShell 7.6.4 Wix package in the Hyper-V guest and verify the trusted executable path and engine version after installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require a clean committed HEAD and move one validated Git archive into the guest with hash, extraction, provenance, and cleanup guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allocate a canonical, unique child beneath the configured artifact base for every smoke invocation so retries preserve prior evidence while retaining CreateNew extraction safety. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Install only the pinned VC Redist component through the clean-runner package recovery path and verify its exact vswhere and x64 CRT payload before checkpointing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require the individual x64/x86 VC tools component alongside the redistributable update so clean-runner publish verification matches the loose CRT files consumed by MSBuild. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wait for the existing guest validation process to close its artifact writers after an exact PowerShell Direct transport loss, without launching validation twice. Record recovery proof separately and cover bounded success, failure, timeout, and classifier behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Scale the aggregate WSL gateway configuration deadline by emitted command count using real clean-distro timing, and retain sanitized bounded failure diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Poll guest completion in short bounded calls so an existing smoke process can survive multiple PowerShell Direct target recycles without duplicate validation or premature artifact packaging. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Treat a timed-out gateway start as success only when the active systemd service MainPID owns the configured listener and the normal HTTP health check passes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Poll the exact generated distro under one bounded monotonic deadline after successful installation, with fail-closed identity checks, sanitized diagnostics, and exact-distro cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the bounded diagnostic regression while avoiding a dummy value that review bundle safety correctly classifies as secret-like. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep terminal WSL diagnostics fail-closed, but treat the command runner's explicit timeout signal as retryable under the existing exact-distro and absolute-deadline guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Codex review: found issues before merge. Reviewed August 9, 2026, 4:44 AM ET / 08:44 UTC. ClawSweeper reviewWhat this changesThis branch adds clean-Windows VM, installed and upgrade smoke, desktop-proof, and opt-in live-parity validation infrastructure, alongside setup recovery and test coverage changes. Merge readiness⛔ Blocked by patch quality or review findings - 9 items remain Keep open. This collaborator-authored draft adds validation capabilities not on current main, but it has an unfixed P1 self-hosted workflow security defect, incomplete central roundtrip proof, and a dirty merge state. Likely related people: Barbara Kudiess for recent setup recovery work, Dallin Romney for recent release-validation work, and Karen for fresh-WSL retry behavior. Priority: P1 Review scores
Verification
How this fits togetherThe Windows validation subsystem builds and installs the tray app, drives gateway and desktop checks on Windows runners or owned VMs, and publishes proof artifacts for maintainers. Its workflows download prerequisites, start test environments, then collect smoke and UI evidence. flowchart LR
A[PR validation change] --> B[Manual validation workflows]
B --> C[Runtime installer download]
C --> D[Trust verification]
D --> E[Desktop proof runner]
A --> F[Clean Windows guest]
F --> G[Installed gateway smoke]
E --> H[Proof artifacts]
G --> H
Decision needed
Why: The 76-file feature spans multiple long-lived validation lanes and repository policy calls for one cohesive seam per PR; only maintainers can decide the permanent supported scope. Before merge
Findings
Agent review detailsSecurityNeeds attention: The new self-hosted workflow executes a downloaded Runtime installer without verifying its identity. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Split or rebase the work into maintainable validation seams, verify the Runtime installer signer, Microsoft publisher, and expected version before execution, then publish a successful current-head clean-machine roundtrip artifact. Do we have a high-confidence way to reproduce the issue? Yes, from source: the workflow's current head downloads a redirected executable and invokes it without a signature, publisher, or version check. Is this the best way to solve the issue? No. The implementation needs a verified installer trust boundary, a rebase, and a successful end-to-end proof before this broad validation program is a safe landing path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 582a44713860. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Summary
Validation
./build.ps1: 5/5 targets passed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 3,170 passed, 31 skipped.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 2,278 passed.dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj --no-restore: 744 passed.WindowsProofSkillContractTests: 20 passed.CreateWslInstancetests: 23 passed.Real behavior proof
OpenClaw-Clean-Windows.86c929002ba095d88d147884a48b6023da6726e3.TestResults\CleanWindows\HyperV\Installed\20260806-201406-469-49d515b7.5FDF2D0DAC58CBEF58E254CF67FD1F99A7A9FD2BE02CE5DD89951FEEBCC573E8.999D5D5032AA6212313427C941FA8208F13434319F01CAB302745FBD96A07AC7.host-smoke-manifest.json.preflight,build,install,installed-payload, andcleanup.roundtrip.Offat the ownedopenclaw-prerequisitescheckpoint.Known blocker
The pristine nested WSL first launch terminated with
Wsl/Service/E_UNEXPECTEDafter two bounded 30-second readiness timeouts. The controller correctly failed closed and cleaned up only the exact generated distro. Full installed roundtrip is not verified, so this PR remains draft.Upgrade, active-desktop screenshot proof, Crabbox Azure, and live model/Discord are implemented or configured lanes but were not real-run in this closeout.
Review
The final scoped Claude Opus 4.8 max-effort review completed cleanly. An earlier review identified that timed-out readiness probes containing incidental partial output could be misclassified as terminal. The implementation was corrected so explicit timeouts remain retryable under the exact-distro and absolute-deadline guards, while genuine terminal WSL diagnostics remain fail-closed. Focused tests cover the corrected behavior.
Security and compatibility