fix(mcp): preserve platform selectors across namespace rollout - #4468
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds list-only metadata support to remote MCP discovery. Veryfront API sources request legacy tool names on every ChangesMCP naming compatibility
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Veryfront API discovery now requests legacy tool names while preserving unchanged tool-call payloads and non-Veryfront sources. The change is covered across pagination and policy behavior, with no actionable merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant AgentStreamHandler
participant RemoteMCPToolSource
participant VeryfrontAPIMCPServer
AgentStreamHandler->>RemoteMCPToolSource: Configure legacy list metadata
RemoteMCPToolSource->>VeryfrontAPIMCPServer: tools/list with _meta and cursor
VeryfrontAPIMCPServer-->>RemoteMCPToolSource: Tool names and nextCursor
RemoteMCPToolSource->>VeryfrontAPIMCPServer: tools/call without _meta
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 7 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
Code Review: 80/100 — Good, small well-scoped fix; one test doesn't cover what it claims toStrengths
Concerns
Actionable suggestions
Otherwise this is a clean, well-documented, backward-compatible fix. Nice to see the architecture doc updated alongside the code. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5a664b141
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to discovery request metadata, includes targeted regression tests (pagination and policy behavior), and does not alter tools/call request construction beyond existing behavior.
Pull request overview
This PR keeps remote MCP tool discovery stable during the rollout from legacy tool names (for example get_file) to canonical platform-prefixed names (for example veryfront__get_file) by allowing the Veryfront API MCP source to request legacy naming explicitly via per-page discovery metadata.
Changes:
- Extend
RemoteMCPToolSourceConfigwith optionallistMeta, sent asparams._metaon everytools/listpage (including paginated requests). - Configure the Veryfront API MCP source to request legacy tool names during discovery (
_meta["veryfront/tool-names"] = "legacy"), without changingtools/callpayload behavior. - Add regression tests covering pagination + metadata preservation, and policy stability across old/new API naming behavior; document the behavior in architecture docs.
File summaries
| File | Description |
|---|---|
| src/tool/remote-mcp.ts | Adds listMeta and ensures it is included on every tools/list request page. |
| src/tool/remote-mcp.test.ts | Tests that discovery metadata is sent on every page and is not added to tool calls. |
| src/agent/service/mcp-server-config.ts | Sets listMeta for Veryfront API MCP discovery to request legacy tool names. |
| src/agent/service/mcp-server-config.test.ts | Verifies legacy allow/deny and invocation stability across API naming versions. |
| docs/architecture/21-agent-tool-registration-current-state.md | Documents why and how legacy naming metadata is requested for Veryfront API discovery. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|



The Veryfront API can advertise
veryfront__platform names, while saved selections and runtime allow/deny rules still use legacy names. Request legacy discovery explicitly for the Veryfront API MCP source so staggered API deployments keep tool selection, policy checks, invocation, and stream identities stable.Service and stream-time platform discovery both request legacy names. Optional
listMetais sent on everytools/listpage. Generic and Studio MCP sources keep their existing requests, andtools/callpayloads are unchanged. Older APIs that ignore naming metadata still work.Validation: red/green regression tests for discovery, pagination, and old/new API policy behavior; 78 tests with 223 steps passed across agent services, remote MCP, MCP policy, and hosted tool access. Targeted typecheck, formatting, lint, module boundaries, and generated documentation checks passed. The final feedback batch additionally passed 129 focused test steps, full lint, targeted typecheck, and the semantic test classification audit. Protocol compatibility coverage lives in the integration suite; pure configuration assertions remain unit tests. Local review found no actionable issues.
Part of veryfront/veryfront-issue-inbox#1055. The issue remains open until consumer rollout and staging evidence are complete.
Summary by CodeRabbit
New Features
Bug Fixes