Repository navigation
fix(setup): bind cleanup to live WSL registration - #1230
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 8:12 PM ET / August 26, 2026, 00:12 UTC. ClawSweeper reviewWhat this changesThe branch binds automatic WSL cleanup to a live registry base path, while also replacing the gateway control stdin script with a Bash argv command and changing a Copilot setup action pin. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 12 items remain Keep open. The live-registration cleanup hardening is not on main, but this branch regresses the current main WSL gateway-control fix and needs a security-boundary decision before merge. Priority: P1 Review scores
Verification
How this fits togetherWindows setup creates and replaces an app-owned WSL gateway. Cleanup combines durable OpenClaw metadata with the current-user WSL registration before it can terminate, unregister, or delete WSL data; the tray also uses WSL commands to start and restart that gateway. flowchart LR
A[Setup request] --> B[Cleanup stage]
B --> C[Durable OpenClaw evidence]
B --> D[Live WSL registration]
C --> E[Ownership decision]
D --> E
E -->|Exact path match| F[Scoped WSL cleanup]
E -->|Missing or mismatched| G[Preserve data]
H[Explicit user confirmation] --> F
Decision needed
Why: The current check observes a mutable name-to-path mapping before later destructive commands that act only by name, so maintainer policy is needed for the residual reassignment window. Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff changes a destructive local-data authorization boundary and includes an unexplained third-party workflow-action downgrade. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Restore the stdin-backed WSL control path, then permit automatic cleanup only when the registration binding remains valid through the final destructive effect; otherwise require explicit destructive consent. Do we have a high-confidence way to reproduce the issue? Yes for the WSL control regression: the repository documents a concrete Windows WSL reproduction for argv expansion, and this branch places Is this the best way to solve the issue? No. The cleanup binding is a reasonable direction, but the branch undoes the current stdin safeguard and does not prove that a reassigned registration is rejected before the final destructive effect. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3365e6e1b8b8. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Follow-up safety fix for #1050 after #1229.
Summary
BasePathbinding before automatic unregister\\?\drive paths equivalently--confirm-destructiveas explicit overridesOwnership remains in
ManagedDistroOwnership;WindowsWslRegistrationInspectoris the narrow Windows metadata seam. The preserved invariant is that automatic cleanup cannot terminate, unregister, or delete same-named foreign WSL data.Diff: 10 files, +789/-44.
Validation
./build.ps1- passed; documentation validation checked 46 Markdown files and all 5 build targets succeededdotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore- 978 passed, 0 failed, 0 skippeddotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore- 3,813 passed, 0 failed, 32 skipped, 3,845 totaldotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore- 2,712 passed, 0 failed, 0 skippedReal behavior proof
Current-head synthetic proof ran 12 focused cases with fake WSL inventory and synthetic unowned directories:
BasePath\\?\drive path was acceptedEach destructive-boundary test asserted the command runner received only
wsl --list --quiet; no terminate, unregister, or directory-delete operation occurred. Real destructive proof was intentionally not performed to avoid touching any real WSL distro. No validation blockers.