feat: doctor warns on multiple active installs#116
Merged
Conversation
Add a WARN-only 'single active install' check to run_doctor(), reusing inventory's ACTIVE / PYENV-SHIM classification (#101). Counts distinct active, non-shim install roots: a shim and the version it resolves to collapse to one, while two real installs (even same-version editables at different source roots) stay distinct. WARN-only — the name is not in the required set, so the exit code stays 0; no auto-fix, no cleanup. Message points to `agent-sudo inventory` to choose one canonical install. Closes #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #111. Fourth in the founder-dogfood self-identity chain; reuses inventory's classification (#101).
Principle: a permission tool must clearly identify which copy of itself is guarding the user. The dogfood machine had three installs and
doctorpassed green — the duplicate signal existed only insideagent-sudo inventory, the command a confused user doesn't know to run.What
One WARN-only check in
run_doctor():single active install. It counts distinct active, non-shim install roots from the inventory report and WARNs on more than one:Reuse, not new detection
Uses inventory's existing
ACTIVE/PYENV-SHIMstatuses (#101). No new discovery logic:Scope discipline
doctor's required set, so the exit code stays0. No auto-fix, no cleanup/deletion.Tests / validation
DuplicateInstallCheckTestsintests/test_doctor.py, exactly the four requested cases:ruffclean.command_reference.mddoctorentry notes the duplicate-install WARN.