feat: multi-install cleanup + upgrade discoverability#101
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 71.33% 72.45% +1.12%
==========================================
Files 22 22
Lines 3359 3402 +43
==========================================
+ Hits 2396 2465 +69
+ Misses 963 937 -26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces multi-install cleanup and upgrade discoverability features, adding new make targets (reconcile-all and reconcile-all-dry-run), CLI arguments, and interactive prompts in the guide to resolve duplicate tool installations. The review feedback highlights two important issues: a thread-safety race condition in _resolve_candidates when resolving candidates concurrently, and an incorrect exit code logic in cmd_reconcile that incorrectly treats expected blocks on protected tools as execution failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR adds a first-class “reconcile duplicate installs” flow across the CLI (audit.py --reconcile), the interactive guide, and Make targets, with additional discoverability hints and safety prompts to help users clean up multi-installs and find bulk-upgrade functionality.
Changes:
- Introduces
audit.py --reconcile(plan + optional--apply) wired to the existingcli_audit.reconcileengine, plus catalog-candidate resolution for alternate binary names. - Enhances
scripts/guide.shto render richer multi-install warnings (version/active/keep) and adds an inline cleanup action (c), plus summary hints. - Adds
make reconcile-all/make reconcile-all-dry-run, a pin/lock override warning inauto_update.sh, and new tests/docs to cover the safety-critical boundary.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
audit.py |
Adds --reconcile command routing and plan/apply JSON/human output. |
cli_audit/reconcile.py |
Adds catalog-candidate resolution to detect alternate-named duplicates. |
cli_audit/render.py |
Prints discoverability hints for reconcile/upgrade-managed. |
scripts/guide.sh |
Renders reconcile-based multi-install details and adds inline duplicate cleanup action. |
scripts/auto_update.sh |
Adds an interactive warning that native manager upgrades bypass pins/lockfiles. |
Makefile.d/user.mk |
Adds reconcile-all and reconcile-all-dry-run targets. |
Makefile |
Exposes new reconcile-all targets in the top-level target list. |
tests/test_reconcile_cli.py |
Adds unit tests for reconcile plan shaping, candidate resolution, and JSON output. |
tests/test_reconcile_dryrun.sh |
Adds a shell test guarding that dry-run targets never pass --apply. |
docs/superpowers/specs/2026-07-08-reconcile-and-upgrade-discoverability-design.md |
Adds the design spec documenting goals, safety model, and UX expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
…talls Expose reconcile.py as an audit.py entrypoint: --reconcile <tool> reports the plan (versions, which install is active on PATH, which is preferred/kept), and --apply removes the non-preferred duplicates (aggressive mode, honoring the system-tool safelist). --all sweeps the full catalog. JSON via CLI_AUDIT_JSON=1 for shell consumers. reconcile_tool now resolves catalog candidates when a caller omits them, so alternate-named duplicates (pip/pip3, fd/fdfind) are detected in bulk sweeps too. Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
a741fd8 to
0dfdf71
Compare
0dfdf71 to
10fbca1
Compare
6fd2661 to
dec5423
Compare
dec5423 to
3c24cc7
Compare
…ability guide.sh now renders per-install version + active (PATH default) + preferred (kept) markers for duplicates and offers an inline 'c' action to remove the non-preferred ones. Adds 'make reconcile-all' (confirm-each) and 'reconcile-all-dry-run' (plan only). The audit readiness line and guide summary hint at 'make reconcile-all' (when duplicates exist) and 'make upgrade-managed'. auto_update.sh warns that native manager upgrades bypass cli-audit pins and project lockfiles before running (skipped on dry-run or FORCE=1). Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
3c24cc7 to
46660c9
Compare
|

Closes the gap where
make upgradewarns about duplicate installs but offers noway to act, and where the existing bulk-upgrade commands are undiscoverable.
Design:
docs/superpowers/specs/2026-07-08-reconcile-and-upgrade-discoverability-design.md.What changed
audit.py --reconcile(new CLI over the existingreconcile.pyengine)--reconcile <tool>reports the plan: per-install version, which installis active on PATH (the default when called without a path), and which is
preferred (kept).
--applyremoves the non-preferred duplicates(aggressive mode, honoring the system-tool safelist).
--allsweeps the fullcatalog. JSON via
CLI_AUDIT_JSON=1.reconcile_toolto resolve catalog candidates when a caller omits them,so alternate-named duplicates (pip/pip3, fd/fdfind) are caught in bulk sweeps.
Previously
bulk_reconcileonly looked atconfig.tools(5 tools); the sweepnow finds all of them (37 on the author's machine).
Guide (
scripts/guide.sh)⚠️ Multiple installationslisting now shows version +→ active+✓ keepper install, and notes when cleanup would change which binary runs.c = clean up duplicatesaction (confirms, then applies).Make targets
make reconcile-all(confirm-each) andmake reconcile-all-dry-run(plan only).Discoverability + safety
make reconcile-all(whenduplicates exist) and
make upgrade-managed.auto_update.shwarns that native manager upgrades bypass cli-audit pins andproject lockfiles before running (skipped on dry-run /
FORCE=1).Example
Verification
pytest: 644 passed, 1 skipped (+10 new reconcile-CLI tests; +1 shellguard test that the dry-run target never passes
--apply).E9,F63,F7,F82): clean. Smoke: pass. mypy: no new errors.test_guide_multi_install.sh: unchanged (same 3 pre-existing failures onmain; no regression).make reconcile-all-dry-runverified non-destructive;--allsweep + rendermarkers verified against real duplicates.
Safety model: confirm-each + dry-run; nothing removed without explicit yes;
critical-tools protect list honored; removing the active install gets an extra
heads-up. No version bump / CHANGELOG (feature branch).