feat(mcp): expose conservative tools list cache contract - #170
Draft
seonghobae wants to merge 10 commits into
Draft
feat(mcp): expose conservative tools list cache contract#170seonghobae wants to merge 10 commits into
seonghobae wants to merge 10 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
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.
Partial MCP adapter implementation stacked on exact current PR #168 head
9520ffeca808bf75a17c059047534ae494691815.Buyer-visible gap
PR #168 provides one deterministic reviewed MCP tool catalog, but the 2026-07-28 adapter line had no typed
tools/listresult contract carrying reviewed result disposition and cache semantics. A transport adapter could otherwise invent completeness, freshness, or shareability independently from the reviewed catalog.This branch also closes one routing-integrity/resource-boundary defect discovered while revalidating the adapter: each untrusted routing/body tool name must satisfy the bounded ASCII tool-name contract before the two attacker-controlled values are correlated. Otherwise an oversized or malformed cross-field mismatch can take the generic
HeaderBodyMismatchpath before the intended 128-byte/syntax boundary is enforced.Live dependency / exact state
The independently refetched live prerequisite remains exact #168 head
9520ffeca808bf75a17c059047534ae494691815. Current exact #170 head is1ff5d5f3acc3ed81edf17d3e4733adfb216cd7c5. Keep Draft while #168 remains active. No prerequisite check, review, mergeability, approval, or predecessor evidence transfers.RED -> implementation
The original typed list-page slice was established test-first: exact test-only head
e241631b8198605f2a7996c295f3801416bf5df4required one typed list page derived fromsupported_mcp_tools()with conservative zero freshness, private cache scope, and no continuation cursor; CI run31934119252, Rust contracts job95133305928, reached the locked workspace compile boundary and failed becauseMcpCacheScope/mcp_tools_list_pagedid not exist.The newly discovered routing-boundary defect was also repaired test-first. Test-only head
9c7981d10acf482e955eb739224f64ae98d0068baddedmcp_route_validates_each_untrusted_tool_name_before_cross_field_comparison. CI run31967698063, Rust contracts job95215276820, passed repository contracts, formatting, and workspace checking and then failed atRun tests, proving the old production ordering returned the wrong boundary classification for malformed/oversized cross-field inputs.Production head
1ff5d5f3acc3ed81edf17d3e4733adfb216cd7c5now validates bothrouting_tool_nameandbody_tool_namewith the same bounded ASCII contract before header/body correlation. Valid bounded disagreements still returnHeaderBodyMismatch; unsupported methods still fail closed; unknown valid tool names still returnUnknownTool.The complete current implementation therefore:
McpToolsListPage::tools()directly from the same reviewedMCP_TOOL_CATALOGused by request routing;McpResultType::Completefor this fixed complete catalog;ttl_ms = 0and cache sharing to typedMcpCacheScope::Private;Current exact-head evidence
On unchanged exact head
1ff5d5f3acc3ed81edf17d3e4733adfb216cd7c5against unchanged exact prerequisite9520ffeca808bf75a17c059047534ae494691815:31967771855, Rust contracts job95215481897: success — repository contracts, canonical formatting, locked workspace check, full tests, strict Clippy, and rustdoc all passed;31967771855, Production coverage job95215482006: success, including exact owned-production function/line/region/branch enforcement;31967772157, pinned Chrome fixture job95215450157: success, including the real pinned browser fixture;This stacked Draft has no protected-main Security Scan, SAST, or central OpenCode/Noema/Strix integration proof on this exact head; absent workflows are absent, not passing. No predecessor-head, prerequisite-head, queued, skipped, cancelled, absent, synthetic-merge, status-only, or model-only evidence is promoted as current proof.
Standards / truth boundary
The canonical browser/agent protocol doctoring records the MCP 2026-07-28 result-type/cache-hint evidence and the conservative OriginWeave boundary in APA 7 form. This remains an adapter refinement under the accepted architecture rather than a new binding architecture decision.
This slice is typed MCP discovery/routing metadata only. It does not serialize JSON-RPC/HTTP, implement transport caching, authenticate a client/server, implement OAuth, perform general pagination, invoke a tool, expose arbitrary JavaScript, disclose secrets, persist discovery state, or prove a complete MCP server. The transport adapter must serialize the reviewed value without widening its result, cache, routing, or authority semantics.
Passing automation is not authorization to merge. This scheduled actor follows protected-main
AGENTS.mdand does not merge, self-approve, alter workflows, add secrets, weaken gates, tag, or publish.