fix(mcp): repo-less agents keep PAT read path in multi-installation mode#40
Merged
Merged
Conversation
…on mode Multi-installation mode previously required every [[mcp.agents]] entry to have a non-empty repos allowlist, which broke legacy unrestricted read agents (e.g. a search-capable read-only agent) the moment [[mcp.github_apps]] was configured. - Repo-less agents now skip fan-out and routing entirely: they keep the legacy pooled-PAT read path (initialize pins a PAT session as before) - Writes remain impossible for them: startup validation rejects a repo-less agent allowlisting a write-classified tool when writes are enabled, and the proxy denies write calls from repo-less agents in multi mode as defense-in-depth (writes never run on pooled PATs) Verified: clippy -D warnings clean, 99 passed / 0 failed (2 new tests: PAT read path preserved without fan-out; write denied with 403 even when enable_writes is on)
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
Unblocks deploying
[[mcp.github_apps]]alongside legacy unrestricted read agents (b2-style). Previously multi mode required every agent to have a repos allowlist, so enabling multi-installation routing would have broken repo-less read agents whose tools (search_code, …) are inherently repo-less.Behavior
Tested
clippy
-D warningsclean;cargo test99 passed / 0 failed. New:test_multi_repoless_agent_keeps_pat_read_path(single upstream request, PAT credential, PAT pin),test_multi_repoless_agent_writes_denied_even_when_enabled(403 with repository-scoped message, upstream untouched, no audit record). Config validation matrix updated.Review Contract
Scope: multi-mode agent-envelope handling only. Acceptance: legacy single-app/PAT/Phase-1 behavior unchanged; repo-scoped multi routing unchanged; no write path over pooled PATs.