fix(paths): clarify managed paths and avoid global install side effects - #431
Closed
juemuel wants to merge 9 commits into
Closed
fix(paths): clarify managed paths and avoid global install side effects#431juemuel wants to merge 9 commits into
juemuel wants to merge 9 commits into
Conversation
- [P1] Guard tools_dir().mkdir() behind 'not dry_run' so --dry-run creates zero files. Route default dry-run through safe-mode check output instead of install-language output. - [P1] _uninstall_skill() now returns bool; _cmd_uninstall uses it instead of unconditionally setting removed_any=True. - [P2] format_report() accepts optional config_path; all callers (_cmd_install, _cmd_doctor, AgentReach.doctor_report) pass the active Config instance path so the permission check inspects the actual config file, not a separately-resolved default.
Previously Config() called _ensure_dir() unconditionally at the top of _cmd_install, creating <AGENT_REACH_HOME>/ before the dry_run guard. Now Config is lazily initialised only when the code path actually needs to write (proxy save or channel testing), keeping --dry-run and --system --dry-run entirely side-effect-free.
Owner
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.
Summary
Fixes #402.
AGENT_REACH_HOME/~/.agent-reach.agent-reach pathsand--jsonoutput to distinguish Agent Reach-managed paths, agent-platform registration paths, and upstream-managed tools.--systemfor those operations.Test Plan
AGENT_REACH_HOME=<workspace temp> python -m pytest tests/ -v186 passed, 8 skippedgit diff --check upstream/main...HEADpython -m agent_reach.cli pathspython -m agent_reach.cli paths --jsonpython -m agent_reach.cli install --dry-runpython -m agent_reach.cli install --dry-run --systemAGENT_REACH_HOMEdry-run creates no files