You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Support global OpenCode MCP installation - #3075
Nit (2 votes): Include OpenCode in the no-runtime warning’s supported list.
src/apm_cli/adapters/client/opencode.py
Supports global MCP writes.
Moderate (1 vote): Set mcp_servers_key to mcp for conflict and ownership handling. Nit (4 votes): Update the stale module documentation about user-scope directory creation.
active_targets_user_scope() also scans every target directory under the real Path.home(). On a developer or runner that already has another supported client configured, this exact-list assertion returns additional targets and becomes machine-dependent. Patch Path.home to the test's temporary root before discovery.
This issue also appears on line 114 of the same file.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
Configured-root symlinks remain traversable, Windows external roots can evade cleanup, and the new path authority lacks required architecture guardrails.
Get a fresh assessment by requesting another Copilot review.
Locator grouping is duplicated instead of centralized
src/apm_cli/install/manifest_reconcile.py:60
This duplicates the locator-grouping decision in install/phases/cleanup.py:38-44. Move the grouping behavior to the canonical deployment-ledger owner and call it from both reconciliation paths so fixes to composite locator handling cannot diverge.
Duplicate locator grouping implementations can diverge
src/apm_cli/install/phases/cleanup.py:44
This introduces a second implementation of locator grouping; install/manifest_reconcile.py:54-60 contains the same decision. Because cleanup correctness depends on preserving every composite locator sharing a compatibility value, centralize this operation on the deployment-ledger owner and have both callers use it rather than allowing the two copies to drift.
Added the canonical-owner architecture guard in efc54f1a6:
registered opencode_paths.py as the owner of OpenCode config-root precedence and lexical/resolved path identity;
added a static guard rejecting direct OPENCODE_CONFIG_DIR/XDG_CONFIG_HOME reads and duplicated default-path resolution outside the owner;
registered the guard and added owner-rule mutation plus rule-inventory coverage.
Ruff and Ruff format pre-commit hooks passed, and git diff --check passed. The architecture boundary script reports only the two pre-existing baseline findings in deployment_ledger.py and manifest_reconcile.py; focused pytest could not run in the clean checkout because its pyenv environment has no pytest executable.
Generated by receiving-code-review. This comment is AI-generated and may contain errors.
Remove unreachable duplicate Claude project condition
src/apm_cli/install/deployed_paths.py:72
This second Claude/project condition is unreachable: the identical condition immediately above always either returns or continues. Remove the dead branch so the absolute-root projection has one clear implementation.
Implemented the remaining canonical-owner architecture follow-up in efc54f1:\n\n- registered src/apm_cli/integration/opencode_paths.py in the architecture owner registry;\n- added a static guard preventing consumers from duplicating OpenCode environment/default path resolution;\n- registered the guard and added mutation plus rule-inventory coverage.\n\nRuff hooks and git diff --check passed. The architecture linter reports only the two pre-existing baseline findings in deployment_ledger.py and manifest_reconcile.py. Focused pytest was unavailable in the clean checkout because its pyenv environment has no pytest executable.\n\n---\n\nGenerated by receiving-code-review. This comment is AI-generated and may contain errors.
Skip symlink test when filesystem lacks symlink support
tests/unit/test_opencode_mcp.py:76
This unguarded symlink creation fails on Windows or restricted filesystems before the behavior can be tested. The repository convention is to catch OSError/NotImplementedError and skip when symlinks are unavailable (for example, tests/unit/marketplace/test_builder.py:2061-2064).
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
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.
Adds global MCP installation support for OpenCode, including target paths, integration behavior, documentation, and tests.