Skip to content

feat(optimize): add Spotlight deep reset#916

Closed
thedavidweng wants to merge 1 commit into
tw93:mainfrom
thedavidweng:feat/spotlight-deep-reset
Closed

feat(optimize): add Spotlight deep reset#916
thedavidweng wants to merge 1 commit into
tw93:mainfrom
thedavidweng:feat/spotlight-deep-reset

Conversation

@thedavidweng
Copy link
Copy Markdown

Summary

  • add explicit mo optimize --spotlight-deep-reset flow with typed confirmation before sudo
  • limit deletion to current-user Spotlight/CoreSpotlight cache targets and keep default clean behavior unchanged
  • expose the option in optimize help, shell completions, optimize whitelist, and security notes

Test Plan

  • bash -n mole bin/optimize.sh lib/optimize/tasks.sh lib/core/help.sh bin/completion.sh tests/optimize.bats tests/completion.bats
  • git diff --check
  • bats tests/optimize.bats tests/completion.bats
  • env GOCACHE=/private/tmp/mole-go-build GOPATH=/private/tmp/mole-go go test ./...
  • env GOCACHE=/private/tmp/mole-go-build GOPATH=/private/tmp/mole-go scripts/test.sh tests/optimize.bats tests/completion.bats
  • manual dry-run, confirmation, symlink refusal, and simulated mdutil flow checks

Note: a full local scripts/test.sh run on a clean temp worktree still has the existing baseline failures in tests/cli.bats for mo status --json; the same four failures reproduce without this patch.

@thedavidweng thedavidweng requested a review from tw93 as a code owner May 18, 2026 03:35
@tw93
Copy link
Copy Markdown
Owner

tw93 commented May 22, 2026

@thedavidweng Thanks for the thoughtful implementation and tests. I am going to close this one because the feature direction is outside Mole’s current safety boundary.

mdutil -E /, toggling Spotlight indexing, and restarting corespotlightd are system-level repair actions. Mole is trying to stay focused on helping users safely find and remove cleanable space after confirmation, not becoming a broader macOS repair suite. Without a concrete issue showing this flow is needed and safe for real users, I do not want to ship a deep Spotlight reset command.

Appreciate the work here; the implementation discipline is good, but the product boundary is the blocker.

@tw93 tw93 closed this May 22, 2026
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.

2 participants