Skip to content

feat(cli): uninstall finds every copy — PATH/standard scan + Windows live-drive coverage#499

Merged
githubrobbi merged 1 commit into
mainfrom
feat/uninstall-retired-names
Jun 30, 2026
Merged

feat(cli): uninstall finds every copy — PATH/standard scan + Windows live-drive coverage#499
githubrobbi merged 1 commit into
mainfrom
feat/uninstall-retired-names

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

What

Makes uffs --uninstall discover and remove UFFS wherever it actually lives, across both platforms, while never touching a shared bin dir it does not own.

Cross-platform

  • PATH + standard-dir scan (which-style, stat-only, no filesystem walk): finds copies that are neither running nor the invoking exe (e.g. a second uffs on PATH), folded into the main plan. Reuses the real channel/scope classifier, so a WinGet copy is still delegated and a root-owned /usr/local/bin copy is still flagged for sudo.
  • Retired/optional names (uffs-daemon, uffs-mcp, uffs_tui, …) swept wherever they sit in a root.
  • PATH safety gate: only a dedicated uffs*-only directory is offered for PATH removal; a shared ~/bin / ~/.local/bin is left alone (we never added it).

Windows-only (UFFS indexes the live drives there)

  • Deep sweep: ask UFFS itself for stray copies on the live drives, version them, and remove under a separate second confirmation (a copy the user placed themselves might be among them).
  • Drive-coverage offer: before the sweep, compare indexed NTFS drives vs all NTFS drives; if any are missing, offer to start the daemon (via the broker, no UAC) and index them. Runs under --dry-run too — start/index are non-destructive; only deletions are withheld.

Off Windows there is no daemon sweep (UFFS indexes offline captures there, not the live filesystem), so the deep-sweep subsystem is #[cfg(windows)].

Testing

  • 107 uffs-cli tests pass on macOS.
  • Clean on macOS clippy and Windows cargo xwin clippy --all-targets.
  • ⚠️ The Windows daemon/drive-coverage paths compile + lint under xwin but still need a live run on Windows to validate the start/index/sweep flow end-to-end.

🤖 Generated with Claude Code

…live-drive coverage

Make `uffs --uninstall` discover and remove UFFS wherever it actually lives,
across both platforms, while never touching a shared bin dir it does not own.

- PATH + standard-dir scan (which-style, stat-only, no walk): finds copies that
  are neither running nor the invoking exe, folded into the main plan. Reuses
  the real channel/scope classifier (WinGet delegated, root-owned dirs flagged
  for sudo).
- Retired/optional binary names (uffs-daemon, uffs-mcp, uffs_tui, …) swept
  wherever they sit in a root.
- PATH safety gate: only a dedicated uffs*-only directory is offered for PATH
  removal; a shared ~/bin / ~/.local/bin is left alone (we never added it).
- Windows deep sweep: ask UFFS itself for stray copies on the live drives,
  version them, and remove under a SEPARATE confirmation (a copy placed by the
  user might be among them).
- Windows drive-coverage: before the sweep, check which NTFS drives the daemon
  indexes and offer to start it / index the missing ones for a complete sweep.
  Runs under --dry-run too (start/index are non-destructive); only deletions
  are withheld.

Off Windows there is no daemon sweep (UFFS indexes offline captures there, not
the live filesystem), so the deep-sweep subsystem is #[cfg(windows)].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge June 30, 2026 05:50
@githubrobbi githubrobbi added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit ea63ae7 Jun 30, 2026
21 checks passed
@githubrobbi githubrobbi deleted the feat/uninstall-retired-names branch June 30, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant