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

stacklok / toolhive / 32170314991
70%

Build:
DEFAULT BRANCH: main
Ran 18 Aug 2026 06:27PM UTC
Jobs 1
Files 876
Run time 2min
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

18 Aug 2026 06:18PM UTC coverage: 70.419% (+0.02%) from 70.403%
32170314991

push

github

web-flow
fix(authz): commit recorded status before flushing in ResponseFilteri… (#6335)

fix(authz): commit recorded status before flushing in ResponseFilteringWriter

ResponseFilteringWriter is write-behind: Write buffers the body and
WriteHeader only records the status, with the real write and filter
happening in FlushAndFilter. Its non-2xx passthrough branch is safe only
because a fetch-based MCP client gates list delivery on response.ok
(200-299), so a non-2xx list body is never consumed.

In the production transparent-proxy path (httputil.ReverseProxy with
FlushInterval: -1), the proxy calls Flush() while copying the backend
response. The first Flush() on a fresh net/http writer commits the
headers with an implicit WriteHeader(200) before FlushAndFilter() runs.
FlushAndFilter then takes the non-2xx passthrough branch from the
recorded status (e.g. 500), its WriteHeader(500) is a no-op, and the
unfiltered buffered list body is delivered under a fabricated 200 --
the #5257-class bypass on the non-2xx branch. Legitimate 4xx/5xx
statuses are silently rewritten to 200 as well.

Commit the recorded status (rfw.statusCode) in Flush() before flushing
downstream, so the wire status reflects the real backend status. SSE
(statusCode 200) is unaffected and later WriteHeader calls in
FlushAndFilter become no-ops instead of corrupting the status.

Adds a regression test over the production wiring (real HTTP server +
ReverseProxy FlushInterval:-1) asserting a 500/404 list response reaches
the client with the non-2xx status while 2xx responses are still
filtered. The test fails without the fix (status rewritten to 200).

1 of 1 new or added line in 1 file covered. (100.0%)

6 existing lines in 2 files now uncovered.

85453 of 121349 relevant lines covered (70.42%)

98.81 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
71.85
-1.11% pkg/ignore/processor.go
3
49.27
-0.62% pkg/transport/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 32170314991.1 18 Aug 2026 06:27PM UTC 876
70.42
GitHub Action Run
Source Files on build 32170314991
  • Tree
  • List 876
  • Changed 9
  • Source Changed 1
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32170314991
  • 7eb3f34f on github
  • Prev Build on main (#32161289492)
  • Next Build on main (#32170469510)
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