Repository navigation
fix(setup): require ownership before WSL cleanup - #1229
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
shanselman
marked this pull request as ready for review
August 25, 2026 23:19
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(setup): require ownership before WSL cleanup 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. |
This was referenced Aug 26, 2026
3 of 16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1050.
Summary
--confirm-destructiveCLI consent or ephemeral UI consent scoped to the exact distro name.DistroInstallPathPolicypath, canonicalization, collision, and reparse-point hardening.This is a focused recovery of exactly 11 paths from snapshot
afa4ed08b8555b0fc230df990d33f132a914f2b2onorigin/recover-maintainer-patches. No unrelated files are included.Ownership transfer: durable ownership evidence parsing and marker lifecycle move from
ExistingConfigDetector,CleanupStaleDistroStep, andCreateWslInstanceStepinto authoritativeManagedDistroOwnership. The detector and setup steps retain only ownership queries and scoped marker operations.Validation
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --filter "FullyQualifiedName~CleanupStaleDistro|FullyQualifiedName~ManagedDistroOwnership|FullyQualifiedName~SetupConfig_UiDestructiveConfirmation|FullyQualifiedName~BuildReplacementSummary_Unowned|FullyQualifiedName~CreateWslInstance_ClaimsOwnership"dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore.\build.ps1git diff --name-only origin/main...HEADafa4ed08b8555b0fc230df990d33f132a914f2b2exactly.The first focused
--no-restoreinvocation encountered the documented fresh-worktree missing-assets condition. The test project was restored by rerunning without--no-restore; all final validation above then passed.Real behavior proof
Current-head proof used isolated temporary roaming and local data directories. The only synthetic target was an empty
local\wsl\OpenClawGatewaydirectory with no ownership marker, setup state, or gateway registry binding. Read-onlywsl --list --quietconfirmed there was no realOpenClawGatewaydistro before or after the proof.The setup UI displayed:
Permanently delete WSL distro 'OpenClawGateway'?WSL data for 'OpenClawGateway' is not proven to be app-owned. Continuing will permanently delete itDelete and replaceand defaultCancelCancelwas selected. The synthetic unowned directory remained present, and the real WSL inventory remained unchanged. The isolated process and temporary proof directories were then removed.No real WSL distro was unregistered or deleted, by design. The current-head isolated UI proof exercises the destructive-consent gate without risking user data, so the absence of a real destructive run is not a review-readiness blocker.