Skip to content

docs(plan): add mole-parity phases 7-11 and R7-R9 scope - #3

Merged
baroitrung merged 2 commits into
mainfrom
docs/mole-parity-phases-7-11
Oct 23, 2026
Merged

baroitrung merged 2 commits into
mainfrom
docs/mole-parity-phases-7-11

Conversation

@baroitrung

@baroitrung baroitrung commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Refine docs/plans/active/mole-parity.md: pin moved to Mole V1.61.0, status: active, new requirements R7 (menu), R8 (Analyze UX), R9 (safety hardening), NG6–NG7.
  • Add the approach and phases 7–11 with story IDs, waves, and exact checks. Docs only, no code changes.

Todo

  • Phase 7 menu-alignment (MU-008): Analyze after Optimize; drop Purge/Installer from menu (CLI kept); rewrite menu_items_order
  • Phase 8 upstream-safety-hardening (MU-009): unreadable config fails closed; purge/installer load whitelist; mu remove without TTY/--yes exits 1; uninstall NonInteractive nonzero
  • Phase 9 analyze-batch-delete (MU-010): Space select, ⌫/Delete batch SafeDelete (ancestor dedupe, re-lstat, default NO), / filter
  • Phase 10 analyze-overview (MU-011): no-arg overview, insights, cleanable badges, R/O/P/F via Runner
  • Phase 11 analyze-scan-cache (MU-012): versioned atomic cache, R bypass, invalidate on delete, no new flags

Test plan

  • Plan file only; story IDs unique, phases 1–6 untouched
  • Each phase's checks run during work

from therealTINHTUTE with love ❤️❤️❤️

Agent prompts (Parallel Execution Map)

Shared rules for every agent: read CLAUDE.md, AGENTS.md, and your phase block in docs/plans/active/mole-parity.md. Edit only the files in your Owns column. If you need any other file, stop and report to the lead. Run your phase's Checks before reporting, and report the outcome, the diff stat and the check output. Never push to main.

B1 · A1: Phase 7 menu-alignment (worktree, branch feat/menu-alignment)

Implement Phase 7 (T7.1–T7.2) of docs/plans/active/mole-parity.md.
- Set MENU_ITEMS in src/tui/menu.rs to Audit, Clean, Uninstall, Optimize, Analyze, Status, Quit; remove Purge and Installer. Wire the analyze command to run_analyze_tui.
- Rewrite menu_items_order to assert the full ordered command list, and fix any other menu test or snapshot that depends on the count or on indices.
Owns: src/tui/menu.rs, the menu dispatch in src/tui/mod.rs. Must not touch: src/config.rs, src/remove.rs, src/uninstall/, src/purge/, src/installer/, tests/golden/.
Checks: cargo test tui::menu; make test; git diff --stat tests/golden is empty; mu purge --help and mu installer --help exit 0.

B1 · A2: Phase 8 T8.1 + T8.2 (worktree, branch fix/safety-hardening)

Implement T8.1 and T8.2 of Phase 8 in docs/plans/active/mole-parity.md.
- T8.1: add a test that load_whitelist_from errors when config.toml is unreadable (chmod 000).
- T8.2: make purge and installer load the whitelist before scan/execute, and fail closed (nonzero exit, no trash calls) when the config is malformed or unreadable.
Owns: tests in src/config.rs, src/purge/, src/installer/. Must not touch: src/tui/, src/remove.rs, src/uninstall/.
Checks: cargo test config::tests; cargo test purge; cargo test installer; make lint.

B1 · A3: Phase 8 T8.3 (worktree, branch fix/noninteractive-exit)

Implement T8.3 of Phase 8 in docs/plans/active/mole-parity.md.
- src/remove.rs:232: when run non-interactively without --yes, return exit 1 instead of 0.
- src/uninstall/mod.rs:424: when ConfirmOutcome::NonInteractive, assert a nonzero exit, and fix it if needed.
If any golden or integration test expects exit 0, STOP and report; do not update goldens.
Owns: src/remove.rs, src/uninstall/mod.rs. Must not touch: src/tui/, src/config.rs.
Checks: cargo test remove; cargo test uninstall; mu remove </dev/null exits 1; make lint.

B1-join · lead: Phase 8 T8.4

After merging A2 and A3 into fix/safety-hardening, add integration tests to tests/cli_integration.rs for every R9 case, using a temp XDG_CONFIG_HOME. Then run make test && make lint. Merge Phase 7 first, then rebase Phase 8 onto it.

B2 · A4: Phases 9 → 10 → 11 (one worktree, branch feat/analyze-ux, start after B1 is merged)

Implement Phases 9, 10, 11 of docs/plans/active/mole-parity.md in order, committing each phase separately and running its Checks before starting the next.
Key safety points (R8):
- Batch delete: drop descendants of selected ancestors, re-lstat and whitelist-check each path, then trash::safe_delete, then write an oplog entry. Default NO. Continue on partial failure and report it. --dry-run deletes nothing.
- In filter mode, ⌫ edits the text. Add no new CLI flags; tests/golden must stay unchanged.
- O/F go through the Runner trait (tested with FakeRunner).
- Cache: atomic write; a corrupt file or version mismatch counts as a miss.
Owns: src/tui/analyze.rs, src/analyze/. Must not touch: menu, config, remove, uninstall.

Align main menu with upstream (Analyze in, Purge/Installer out), add upstream V1.61.0 safety hardening, and split Analyze UX parity into batch delete, overview, and scan cache phases.

👾 · from therealTINHTUTE with love
👾 · from therealTINHTUTE with love
@baroitrung
baroitrung merged commit 31566ed into main Oct 23, 2026
0 of 2 checks passed
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