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

stacklok / toolhive / 45814641201
75%

Build:
DEFAULT BRANCH: main
Ran 26 Nov 2026 12:02PM UTC
Jobs 1
Files 1079
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Nov 2026 11:53AM UTC coverage: 74.503% (+0.06%) from 74.443%
45814641201

push

github

web-flow
Validate upstream JSON-RPC responses in transparent proxy (#7317)

* Validate upstream JSON-RPC responses in proxy

The transparent proxy forwarded whatever a backend returned, so a
broken backend's malformed answer to a JSON-RPC request reached the
client as a successful 200. It now checks the 200 application/json
answer to every id-bearing POST before acting on it, and replaces an
invalid one with a 502 carrying a JSON-RPC error that echoes the
client's request id.

The check runs in tracingTransport.RoundTrip, before the response can
register a proxy session or mark the server initialized, and reuses
the MCP envelope rules through a new mcp.ValidateResponse that
inspects the envelope only. The client's Accept-Encoding is withheld
from id-bearing requests so Go's transport decodes gzip and the body
can be read; a body still carrying a content coding fails closed.
Bodies are buffered up to 100 MiB.

This reworks the approach from #5288, which validated in
ModifyResponse after session registration and rejected some
spec-valid responses.

Fixes #5247

Co-authored-by: Bishnu Bista <bishnubista@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Isolate proxy tests from the shared transport

httptest.Server.Close calls CloseIdleConnections on
http.DefaultTransport, so a parallel test reusing a pooled connection
can fail with "CloseIdleConnections called". The new upstream
validation tests close many servers in parallel, which made this hit
TestPrefixHandlers_WellKnownNamespaceCoexistence in CI. Give that test
a dedicated client and the validation tests a dedicated backend
transport, as #6264 did for the dial-error test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Bishnu Bista <bishnubista@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

114 of 122 new or added lines in 3 files covered. (93.44%)

6 existing lines in 4 files now uncovered.

102281 of 137284 relevant lines covered (74.5%)

986.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
85.96
pkg/mcp/response_validation.go

Coverage Regressions

Lines Coverage ∆ File
2
93.55
-1.61% pkg/vmcp/aggregator/caching_aggregator.go
2
63.89
4.68% pkg/workloads/manager.go
1
94.24
0.0% pkg/authserver/storage/memory.go
1
55.84
-0.26% pkg/transport/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 45814641201.1 26 Nov 2026 12:02PM UTC 1079
74.5
GitHub Action Run
Source Files on build 45814641201
  • Tree
  • List 1079
  • Changed 9
  • Source Changed 1
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45814641201
  • c038d026 on github
  • Prev Build on main (#45813108991)
  • Next Build on main (#45818621907)
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