Skip to content

docs: add uninstall info to README and uninstall skill - #1275

Closed
larroy wants to merge 5 commits into
openclaw:mainfrom
larroy:docs/uninstall-info-and-skill
Closed

larroy wants to merge 5 commits into
openclaw:mainfrom
larroy:docs/uninstall-info-and-skill

Conversation

@larroy

@larroy larroy commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Documents the user-facing uninstall path in the README and setup guide.
  • Adds the agent uninstall procedure for a side-by-side dev build (.agents/skills/uninstall/SKILL.md).

Rebase update (2026-09-08): PR is now docs-only

The runtime fix previously included in this PR (cherry-pick ab5c4b3c, "Fix uninstall when dev WSL distro is absent") was merged to main as e29bc418 (#1348, fix(setup): let uninstall recover from absent WSL distro), including its follow-up hardening (IsWslUnavailableResult, RunAsyncAllowingInheritedPipeHandleEscape, and the additional regression tests). During the rebase onto current main, that commit was dropped as fully superseded; its guard, its regression test WindowsNodeContext_Rollback_SkipsLegacyCleanupWhenDistroIsAbsent, and its extension tests are all present on main verbatim. No C# changes remain in this PR.

Consequently, the previously requested absent-distro rerun proof applies to code now owned by #1348 on main, not to any file in this PR. The destructive-uninstall evidence below was collected against that runtime code while it lived on this branch and remains valid as validation history for the merged fix.

Required proof pools

  • none with reason: this PR changes only Markdown documentation (README.md, docs/SETUP.md, .agents/skills/uninstall/SKILL.md). It registers no code paths, commands, or MCP tools; scripts/validate-docs.ps1 proof-pool validation passes with the declared pools.

Validation

Tested heads: destructive-uninstall proof at ab5c4b3c (then-head, runtime fix included); docs validation re-run at a2699df7 (current head after rebase).

  • ./build.ps1 -DevBuild at ab5c4b3c: passed.
  • dotnet test tests/OpenClaw.Shared.Tests: 3872 passed, 32 skipped, 0 failed.
  • dotnet test tests/OpenClaw.SetupEngine.Tests: 1027 passed, 0 failed (includes the missing-distro regression tests, since merged to main via fix(setup): let uninstall recover from absent WSL distro #1348).
  • dotnet test tests/OpenClaw.Tray.Tests: 2812 passed, 0 failed.
  • ./scripts/validate-docs.ps1 at a2699df7: passed; 47 Markdown files checked, proof-pool validation 7 named pools.

Real Behavior Proof (validation history for the runtime fix now on main via #1348)

Environment: native Windows x64 dev build (app-identity.txt = dev), head ab5c4b3c. Pre-state: OpenClawGateway-Dev WSL2 distro present and running, %LOCALAPPDATA%\OpenClawTray-Dev contained run.marker, setup-state.json, setup-managed-distro.json, windows-node-context.json, LocalAI\, wsl\, wsl-keepalive\; %APPDATA%\OpenClawTray-Dev contained one gateway record (c293944b4e224c08) with its device-key-ed25519.json identity file.

  1. Dry run: OpenClaw.Tray.WinUI.exe --uninstall --dry-run exited 0, listed all 37 rollback steps, ended with UNINSTALL COMPLETE.
  2. Real run: --uninstall --confirm-destructive exited 1: 1 rollback(s) failed: configure-local-ai-gateway (pre-existing Local AI manifest validation issue, below). All other rollbacks succeeded, including wsl --unregister OpenClawGateway-Dev exit 0, tray-artifact cleanup (Deleted run.marker, Removed autostart scheduled task, Reset onboarding settings), exit code 1.
  3. Post-state: wsl -l -v shows OpenClawGateway-Dev absent; run.marker, setup-state.json, setup-managed-distro.json, windows-node-context.json, LocalAI\, wsl\, wsl-keepalive\, Logs\, exec-approvals.json, gateway identity dir and device-key-ed25519.json all absent; gateways.json has 0 gateways; settings.json has GatewayUrl removed, EnableNodeMode=false, AutoStart=false; autostart Run-key value and scheduled task absent.
  4. The absent-distro rerun scenario (the target of the merged fix) is covered by regression tests now on main: WindowsNodeContext_Rollback_SkipsLegacyCleanupWhenDistroIsAbsent, ..._SkipsLegacyCleanupWhenWslHasNoDistributions, ..._SkipsLegacyCleanupWhenWslExeCannotStart, ..._FailsWhenDistroInspectionIsAmbiguous, ..._FailsWhenDistroInspectionTimesOut (SetupEngine.Tests, 1027 passed at ab5c4b3c).

Known issue found during proof (pre-existing, tracked separately)

With LocalAi.Enabled=false in the bundled default-config.json, a fresh-process uninstall whose machine still has a Local AI gateway provider configured fails the configure-local-ai-gateway rollback when a manifest exists but cannot be validated, so uninstall reports exit 1 even though every artifact is cleaned. Tracked separately; not introduced by this PR.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 6:08 PM ET / 22:08 UTC (Revision 9).

ClawSweeper review

What this changes

Adds uninstall guidance to the README and setup guide, plus an agent procedure for safely removing a development installation.

Merge readiness

✅ Ready for maintainer review

The documentation remains useful and is not implemented on main. The updated body resolves the previous review’s scope and validation-history blocker, and no actionable patch defects remain.

Priority: P3
Reviewed head: a2699df7429833b003377ab7b424b882f1a562af

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused documentation update with relevant Windows execution evidence, corrected safety guidance, and resolved prior review feedback.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.
Evidence reviewed 7 items Verified documentation-only scope: The pinned base-to-head comparison contains only the new uninstall skill, README.md, and docs/SETUP.md: 138 additions and 2 deletions. The final working-tree status was clean.
Guidance remains absent from main and the supplied latest release: Main has no uninstall skill, and its setup guide still broadly claims device identities are preserved. The setup guide at release commit c7c6fb0 contains that same older wording, so the documentation contribution is not redundant.
Installer choices and identity cleanup match the revised text: The installer explicitly offers preservation or removal of the local gateway. The cleanup script removes setup-managed gateway identity directories, preserves external gateway records, and conditionally clears root tokens.
Findings None None.
Security None None.

How this fits together

OpenClaw Companion supports uninstall through Windows Settings and a headless development command. These instructions explain gateway preservation choices, destructive cleanup, and the artifacts users should expect afterward.

flowchart TD
  A[Uninstall request] --> B[Windows Settings]
  A --> C[Development CLI]
  B --> D{Remove local gateway?}
  D -->|No| E[Preserve gateway state]
  D -->|Yes| F[Gateway and artifact cleanup]
  C --> G[Check dev identity and preview]
  G -->|User confirms| F
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

None.

Technical review

Best possible solution:

Keep the uninstall instructions aligned with the existing installer and SetupEngine, including explicit destructive consent and accurate preservation expectations.

Do we have a high-confidence way to reproduce the issue?

Not applicable: the current patch documents existing behavior, and its commands and cleanup claims were checked against the production implementation.

Is this the best way to solve the issue?

Yes. Extending the existing setup guide and documenting the existing development CLI is a focused solution without creating a competing implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f9bfc871f6d1.

Labels

Label changes:

  • add P3: The remaining change documents existing uninstall behavior without modifying runtime, configuration, or installation defaults.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: The remaining change documents existing uninstall behavior without modifying runtime, configuration, or installation defaults.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded native Windows dev run exercises the documented CLI through SetupEngine and shows distro removal and artifact cleanup matching the corrected instructions. Its separate Local AI failure is disclosed, and current-head documentation validation is separately dated; absent-distro recovery is now owned by the merged runtime PR.

Evidence

What I checked:

  • Verified documentation-only scope: The pinned base-to-head comparison contains only the new uninstall skill, README.md, and docs/SETUP.md: 138 additions and 2 deletions. The final working-tree status was clean. (.agents/skills/uninstall/SKILL.md:1, a2699df74298)
  • Guidance remains absent from main and the supplied latest release: Main has no uninstall skill, and its setup guide still broadly claims device identities are preserved. The setup guide at release commit c7c6fb0 contains that same older wording, so the documentation contribution is not redundant. (docs/SETUP.md:188, f9bfc871f6d1)
  • Installer choices and identity cleanup match the revised text: The installer explicitly offers preservation or removal of the local gateway. The cleanup script removes setup-managed gateway identity directories, preserves external gateway records, and conditionally clears root tokens. (scripts/Uninstall-LocalGateway.ps1:316, a2699df74298)
  • CLI safety and cleanup postconditions: The CLI passes identity-specific directories and distro names to SetupEngine and requires either dry-run or destructive confirmation. SetupEngine keeps its logger and journal open during artifact cleanup, supporting the corrected active-log exception; inspected tests cover dry-run avoiding rollback and settings preservation when gateways remain. (src/OpenClaw.SetupEngine/Program.cs:251, a2699df74298)
  • Previous blocker resolved and real procedure evidence retained: The supplied body snapshot, sourceRevision 12444b236614593cc7e5be8476c40e550e182349cd10f09cd5e2203eee3635ad, explicitly separates current-head documentation validation from historical Windows x64 uninstall evidence. The contributor’s docs: add uninstall info to README and uninstall skill #1275 (comment) records dev identity, dry-run output, actual distro removal, and artifact postconditions. It transparently reports exit 1 from a separate Local AI rollback failure; this is not evidence of a completely successful uninstall.
  • Runtime fix is separately merged: GitHub confirms fix(setup): let uninstall recover from absent WSL distro #1348 merged on September 7. It owns absent-distro recovery, which no longer appears in this PR’s introduced delta; it does not replace the remaining documentation. (e29bc418c3f2)

Likely related people:

  • Ranjesh: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-08-31T19:46:25.757Z sha 9837822 :: needs real behavior proof before merge. :: [P2] Describe the optional gateway cleanup | [P2] Check individual cleanup artifacts, not the AppData roots
  • reviewed 2026-09-01T18:24:48.029Z sha 0114b18 :: needs real behavior proof before merge. :: [P2] Correct the AppData Logs postcondition | [P3] Replace prohibited em-dash punctuation
  • reviewed 2026-09-01T22:16:04.486Z sha c4cf1cd :: needs real behavior proof before merge. :: [P2] Correct the active AppData Logs postcondition | [P3] Reference the dry-run output step | [P3] Replace prohibited em-dash punctuation
  • reviewed 2026-09-02T16:35:09.226Z sha b1ad38b :: needs real behavior proof before merge. :: [P2] Correct the active AppData Logs postcondition
  • reviewed 2026-09-04T05:30:22.148Z sha ab5c4b3 :: blocked before merge. :: [P2] Correct the active AppData Logs postcondition
  • reviewed 2026-09-04T05:45:45.619Z sha 33b29b4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-04T21:42:27.562Z sha 33b29b4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-08T22:05:19.363Z sha a2699df :: blocked before merge. :: none

larroy pushed a commit to larroy/openclaw-windows-node that referenced this pull request Sep 1, 2026
- README: the Windows installer uninstall prompts Yes/No for removing the
  local WSL gateway (installer.iss:177 EnsureLocalGatewayCleanupChoice);
  choosing No preserves it. Previous wording implied it always happens.
- uninstall skill: TrayArtifactCleanup (src/OpenClaw.SetupEngine/
  TrayArtifactCleanup.cs) resets/removes selected files in place and does
  not delete the AppData roots, so asserting Test-Path on
  %APPDATA%\OpenClawTray[-Dev] / %LOCALAPPDATA%\OpenClawTray[-Dev] can
  report a successful uninstall as failed. Check the specific artifacts
  the cleanup actually removes (Logs dir, run.marker) instead.

Addresses ClawSweeper review findings on PR openclaw#1275.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@larroy

larroy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

larroy pushed a commit to larroy/openclaw-windows-node that referenced this pull request Sep 1, 2026
- README: the Windows installer uninstall prompts Yes/No for removing the
  local WSL gateway (installer.iss:177 EnsureLocalGatewayCleanupChoice);
  choosing No preserves it. Previous wording implied it always happens.
- uninstall skill: TrayArtifactCleanup (src/OpenClaw.SetupEngine/
  TrayArtifactCleanup.cs) resets/removes selected files in place and does
  not delete the AppData roots, so asserting Test-Path on
  %APPDATA%\OpenClawTray[-Dev] / %LOCALAPPDATA%\OpenClawTray[-Dev] can
  report a successful uninstall as failed. Check the specific artifacts
  the cleanup actually removes (Logs dir, run.marker) instead.

Addresses ClawSweeper review findings on PR openclaw#1275.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@larroy
larroy force-pushed the docs/uninstall-info-and-skill branch from 7ba5512 to c4cf1cd Compare September 1, 2026 22:11
@karkarl

karkarl commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adversarial consensus verdict: block until the dev-identity and process-scope findings are fixed. Two independent reviews used the same complete PR diff and implementation evidence.

HIGH consensus

Issue Opus Codex Fix confidence
.agents/skills/uninstall/SKILL.md tells users to build with .\build.ps1, but DevBuild defaults off. The resulting Debug executable has release identity and can unregister OpenClawGateway and mutate %APPDATA%\OpenClawTray while the skill claims isolated -Dev state. Require .\build.ps1 -DevBuild, verify app-identity.txt, and derive paths from actual output. CRITICAL HIGH 99%
Step 2 force-stops every process named OpenClaw.Tray.WinUI before confirmation. Release and dev instances share that name, and repo guidance forbids name-based kills. Enumerate executable paths, confirm first, then stop only selected PIDs. HIGH HIGH 95%
Step 6 verifies too little cleanup and says the roaming Logs directory should be absent even though the current uninstall log and journal are opened there before cleanup and disposed afterward. Make that postcondition conditional or move verification after handle closure, and verify registry/task, gateway records, tokens, setup state, exec approvals, Local AI, Tailscale, and node-context outcomes as applicable. LOW MEDIUM 95%
README promises headless CLI details in docs/SETUP.md#uninstalling, but that section contains no headless command. Add the procedure there or link the document that contains it. MEDIUM MEDIUM 99%
The new agent-facing skill uses an em dash, contrary to AGENTS.md user-facing copy policy. MEDIUM LOW 99%

LOW consensus

Issue Opus Codex Fix confidence
Step 4 says the distro is named in step 2 output, but it is printed by the step 3 dry-run. HIGH n/a 99%
Frontmatter understates the destructive scope, omitting identity/token, exec-approval, autostart, Local AI, settings, and node-context cleanup. MEDIUM n/a 95%
README broadly says device identity files are not removed, but selecting gateway cleanup deletes setup-managed local identity directories and may clear root tokens. Narrow the preservation claim. n/a MEDIUM 95%
Dry-run emits rollback IDs, not concrete target paths or affected state, so the skill should require inspection of recorded node-context, Local AI, Tailscale, gateway registry, and settings targets before consent. LOW n/a 85%
ARM64 detection via Win32_OperatingSystem.OSArchitecture may be unreliable. n/a MEDIUM 60%

Disputed assessment: I do not treat the ARM64 item as established. OSArchitecture is intended to report the OS ISA and avoids the emulated-shell ambiguity of PROCESSOR_ARCHITECTURE; using RuntimeInformation.OSArchitecture would still align better with existing repo tooling. The README identity-preservation item is real despite one reviewer rejecting it: Uninstall-LocalGateway.ps1 explicitly removes setup-managed identity directories.

Validation scope: complete diff for head c4cf1cd, repository guidance, README/setup/uninstall docs, Inno uninstall hooks, PowerShell uninstall scripts, SetupEngine CLI/pipeline and every destructive rollback family, identity/build selection, logger lifetime, and related packaging/setup/tray tests. Static review only; no destructive uninstall was executed.

larroy pushed a commit to larroy/openclaw-windows-node that referenced this pull request Sep 2, 2026
- README: the Windows installer uninstall prompts Yes/No for removing the
  local WSL gateway (installer.iss:177 EnsureLocalGatewayCleanupChoice);
  choosing No preserves it. Previous wording implied it always happens.
- uninstall skill: TrayArtifactCleanup (src/OpenClaw.SetupEngine/
  TrayArtifactCleanup.cs) resets/removes selected files in place and does
  not delete the AppData roots, so asserting Test-Path on
  %APPDATA%\OpenClawTray[-Dev] / %LOCALAPPDATA%\OpenClawTray[-Dev] can
  report a successful uninstall as failed. Check the specific artifacts
  the cleanup actually removes (Logs dir, run.marker) instead.

Addresses ClawSweeper review findings on PR openclaw#1275.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@larroy
larroy force-pushed the docs/uninstall-info-and-skill branch from c4cf1cd to b1ad38b Compare September 2, 2026 16:31
@larroy

larroy commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the consensus review findings:

  • Skill step 1 now requires -DevBuild and verifies app-identity.txt says dev before proceeding (bare .\build.ps1 defaults to release identity even in Debug, which would touch the real gateway/AppData).
  • Step 2 now kills only the resolved dev-build PID (matched by .Path), not by process name, per this repo's kill-by-PID-only convention.
  • ARM64 detection switched from a WMI/CIM query to RuntimeInformation.OSArchitecture, matching existing repo convention.
  • Fixed the stale step-4 cross-reference, dropped the em dash per AGENTS.md, and broadened the verification checklist and skill description beyond just WSL distro + Logs (exec-approvals, node-context, settings.json, autostart).
  • README/SETUP.md: narrowed the "device identity files are never removed automatically" claim — choosing Yes to remove the local gateway does delete that gateway's identity directory and can clear root device tokens.
  • Added the headless-CLI pointer and Yes/No gateway-cleanup wording to docs/SETUP.md#uninstalling so it matches what the README already promised there.

Not re-run live in this pass (no WSL dev distro available in this environment) — the original request for fresh real-behavior evidence is still open if it resurfaces.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@joelagnel

Copy link
Copy Markdown
Collaborator

Review/Merge after 9/6, not needed for mvp

@larroy

larroy commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

CI failure assessment for Build and Test run https://github.com/openclaw/openclaw-windows-node/actions/runs/33655444632 (merge SHA ee3de40):

  • The test job had one failure after 3,903 passing tests: OpenClawGatewayClientTests.SendWizardRequestAsync_DisposeBeforeResponse_ThrowsCancellationAndCleansTracking timed out at OpenClawGatewayClientTests.cs:703 after about 7 seconds. This appears timing-sensitive and is unrelated to this documentation-only PR.
  • The setup-connect E2E job's primary failure was WSL provisioning: wsl-create waited about 900 seconds creating OpenClawE2E-3a493aa4 from Ubuntu-24.04, then failed with exit -1: no output. The 21 setup/connect test failures and later windows-node-context cleanup error follow from that missing distro.

Neither failure is attributable to this PR's README/uninstall-skill changes. A CI rerun is appropriate; the E2E job needs runner/WSL provisioning investigation if it reproduces.

@larroy

larroy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

Cherry-picked ab5c4b3 and added current-head destructive uninstall proof plus validation evidence to the PR body. @clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 4, 2026
@larroy

larroy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

Current-head real-behavior proof collected on PR head ab5c4b3c (win-x64 dev build, app-identity.txt = dev). PR body updated.

Dry run: OpenClaw.Tray.WinUI.exe --uninstall --dry-run exited 0, all 37 rollback steps listed, UNINSTALL COMPLETE.

Destructive run: --uninstall --confirm-destructive exited 1 with one failed rollback, configure-local-ai-gateway (pre-existing Local AI manifest validation issue, detailed in the PR body). Everything this PR touches succeeded:

wsl.exe exit=0: --unregister OpenClawGateway-Dev
[Uninstall] Deleted run.marker
[Uninstall] Removed autostart scheduled task
[Uninstall] Reset onboarding settings (GatewayUrl, EnableNodeMode, AutoStart)

Post-state (matches the skill's step-6 checklist):

  • wsl -l -v: OpenClawGateway-Dev gone.
  • Absent: run.marker, setup-state.json, setup-managed-distro.json, windows-node-context.json, LocalAI\, wsl\, wsl-keepalive\, local Logs\, exec-approvals.json, gateway identity dir + device-key-ed25519.json.
  • gateways.json: 0 gateways. settings.json: GatewayUrl removed, EnableNodeMode=false, AutoStart=false. Autostart Run-key value and scheduled task absent.

Validation at ab5c4b3c:

  • ./build.ps1 -DevBuild: passed
  • Shared.Tests: 3872 passed, 32 skipped, 0 failed
  • SetupEngine.Tests: 1027 passed, 0 failed (includes the new missing-distro regression tests)
  • Tray.Tests: 2812 passed, 0 failed (the earlier chat lifecycle failure no longer reproduces)
  • ./scripts/validate-docs.ps1: passed

One pre-existing finding surfaced (documented in the PR body, not introduced by this PR): with LocalAi.Enabled=false and a stale Local AI gateway configuration present, the uninstall reports exit 1 via the configure-local-ai-gateway rollback failure even though every artifact is cleaned up.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@larroy

larroy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed the remaining P2 finding and pushed: 33b29b44 docs: correct active-log postcondition in uninstall skill (now the PR head).

The skill's step 6 no longer asserts %APPDATA%\OpenClawTray-Dev\Logs should be absent. It now asserts what the program can actually achieve, matching my current-head run: the roaming Logs\Setup directory retains only the current run's own uninstall-engine-<timestamp> log and journal (the Setup Engine still holds them open when TrayArtifactCleanup runs), and the Failed to delete AppData Logs directory warning for that file is expected. A warning naming any other file, or leftovers from earlier runs, still indicates a process holding files open (step 2's PID-scoped kill).

./scripts/validate-docs.ps1 re-run after the edit: passed, 51 Markdown files checked.

My current-head run (PR body + comment above) already showed the corrected behavior end to end: every artifact in the checklist was absent after the destructive run except the current run's own log/journal pair, exactly as the fixed postcondition now states.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient Contributor real behavior proof is sufficient. labels Sep 4, 2026
@clawsweeper clawsweeper Bot removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 4, 2026
@larroy

larroy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@karkarl Could you retrigger CI on this PR?

Assessment of the current-head failure (run https://github.com/openclaw/openclaw-windows-node/actions/runs/33841455355, head 33b29b44): 22 of 23 checks passed, including the Setup and connect E2E job. The only red job was "Tray, setup, and integration tests", where 2835/2836 tests passed and the single failure was OpenClaw.Tray.Tests.ActivationRouterTests.StopAsync_CancelsPendingConfirmationAndPreventsLateDispatch, a TimeoutException on a 2-second named-pipe stop/drain wait at ActivationRouterTests.cs:480. None of this PR's files (README, docs/SETUP.md, the uninstall skill, WindowsNodeBootstrapContextStep.cs, SetupStepsTests.cs) are on the activation-router path, and the same test passes locally at this head.

This matches a repo-wide flake pattern in recent CI runs on other branches and main, each failing on a different one-off timing test: McpHttpServerIntegrationTests.SystemRun_Where_ReturnsExpectedOutput (35cb92d), BoundedProcessWaitTests.WaitAsync_CancellationKillsProcessWithoutUsingTimeoutBudget (8e5526b), and the setup-connect E2E WSL-provisioning timeout (585c177). One different timing-sensitive test per run points to runner/environment flakiness rather than a regression from this PR. A CI rerun is appropriate; if the setup-connect E2E WSL provisioning failure reproduces again, that needs separate runner investigation.

@larroy

larroy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper review again, what's missing here to get maintainer review?

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

plarroy-nv and others added 5 commits September 8, 2026 14:59
- README: add an Uninstall section (GUI path, AppData cleanup note,
  link to docs/SETUP.md#uninstalling).
- .agents/skills/uninstall: new skill documenting the headless
  --uninstall --dry-run / --confirm-destructive CLI path on a dev
  build, including architecture matching, WSL distro checks, and
  verification steps.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
- README: the Windows installer uninstall prompts Yes/No for removing the
  local WSL gateway (installer.iss:177 EnsureLocalGatewayCleanupChoice);
  choosing No preserves it. Previous wording implied it always happens.
- uninstall skill: TrayArtifactCleanup (src/OpenClaw.SetupEngine/
  TrayArtifactCleanup.cs) resets/removes selected files in place and does
  not delete the AppData roots, so asserting Test-Path on
  %APPDATA%\OpenClawTray[-Dev] / %LOCALAPPDATA%\OpenClawTray[-Dev] can
  report a successful uninstall as failed. Check the specific artifacts
  the cleanup actually removes (Logs dir, run.marker) instead.

Addresses ClawSweeper review findings on PR openclaw#1275.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
- Require -DevBuild and verify app-identity.txt before running the
  headless uninstall skill; .\build.ps1 alone defaults to release
  identity, which would touch the real gateway/AppData state instead
  of the -Dev copies.
- Kill only the resolved dev-build PID, not by process name, matching
  this repo's kill-by-PID-only convention.
- Use RuntimeInformation.OSArchitecture for ARM64 detection instead of
  a WMI/CIM query, matching existing repo convention.
- Fix a stale step cross-reference, drop an em dash per AGENTS.md, and
  broaden the skill's postcondition checklist and description beyond
  just WSL/Logs.
- Narrow the README/SETUP.md claim that device identity files are
  never removed automatically: choosing Yes to remove the local
  gateway does delete that gateway's identity directory and can clear
  root device tokens.
- Add the missing headless-CLI pointer and Yes/No gateway-cleanup
  wording to docs/SETUP.md#uninstalling so it matches what the README
  promises there.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The default headless uninstall cannot remove the roaming Logs directory:
Setup Engine opens its log and journal under Logs\Setup and only disposes
them at process exit, after TrayArtifactCleanup has already tried. Assert
that Logs\Setup retains only the current run's files instead of requiring
the directory to be absent, matching the observed current-head behavior.
@larroy
larroy force-pushed the docs/uninstall-info-and-skill branch from 33b29b4 to a2699df Compare September 8, 2026 22:01
@larroy

larroy commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto current main and force-pushed; head is now a2699df7.

Important change from the rebase: the runtime fix this PR carried (ab5c4b3c, "Fix uninstall when dev WSL distro is absent") was merged to main as e29bc418 (#1348) while this PR was in review, including the follow-up hardening (IsWslUnavailableResult, extra regression tests). The commit was dropped during the rebase as fully superseded, so this PR is now docs-only (README.md, docs/SETUP.md, .agents/skills/uninstall/SKILL.md).

The PR body is updated accordingly: the previously requested absent-distro production rerun proof applies to code now owned by #1348, not to any file in this PR's diff. The destructive-uninstall evidence collected at ab5c4b3c remains in the body as validation history for the merged fix. Required proof pools are now declared none with the docs-only reason; scripts/validate-docs.ps1 passes at the new head (47 Markdown files, 7 proof pools).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 8, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

Superseded by #1383 (docs: document safe uninstall and dev cleanup), which preserves this documentation on current main and adds final safety corrections for redirected data paths and the actual external-gateway root-token condition. Thank you for the original documentation and proof work.

@shanselman shanselman closed this Sep 9, 2026
shanselman added a commit that referenced this pull request Sep 9, 2026
Preserves #1275's uninstall documentation on current main with fail-closed path-override and credential-preservation corrections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants