• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 30280044065

27 Jul 2026 03:27PM UTC coverage: 69.606% (+0.006%) from 69.6%
30280044065

push

github

web-flow
Strip reserved io.modelcontextprotocol/* keys from responses (#6024)

* Generalize reserved _meta strip to the namespace

StripReservedModernMeta removed four named io.modelcontextprotocol/*
keys, which was enough for its only job at the time: keeping a
downstream Modern caller's per-request protocol metadata off a Legacy
backend hop. The response-path counterpart needs the same guard against
keys this list does not name -- serverInfo, subscriptionId, and whatever
a future revision adds -- so match the reserved namespace instead of
enumerating it, and drop the "Modern" from the name now that it guards
both revisions in both directions.

Matching a namespace over-reaches in one direction the old list could
not: the reserved prefix holds two kinds of key. Per-hop control keys
are a gateway's to terminate, but end-to-end semantic keys are merely
carried, and stripping those breaks the feature that depends on them.
passthroughMetaKeys exempts the two the 2025-11-25 task facility defines
-- related-task is a MUST on task-related responses, the direction the
response-path change filters. vMCP does not route tasks/* today, so
these are inert; the point is that this strip is what would silently
break them later.

Delete ReservedModernMetaKeys. It has no production consumers once the
predicate is a prefix, and its three test readers get stronger looping
on the namespace: they now catch any reserved key, not four named ones.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Own the reserved _meta namespace on responses

On the response path both revisions forwarded every backend _meta key
untouched. Modern overwrote io.modelcontextprotocol/serverInfo and let
the rest through; Legacy filtered nothing. A backend could therefore set
protocolVersion, clientInfo, or any other reserved key on a tools/call
result and have it reach the client as if vMCP had set it. vMCP, not the
backend, is the client's MCP peer, so no backend may speak for it -- and
of the res... (continued)

80518 of 115676 relevant lines covered (69.61%)

86.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.56
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc