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

stacklok / toolhive / 41910049034
73%

Build:
DEFAULT BRANCH: main
Ran 04 Nov 2026 08:58PM UTC
Jobs 1
Files 1001
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

04 Nov 2026 08:48PM UTC coverage: 72.674% (+0.07%) from 72.607%
41910049034

push

github

web-flow
Merge commit from fork

* Move JSON object member helpers to pkg/mcp

The object member decoder and the canonical member check that the authz list filters use to reject duplicate and case-folded members move from pkg/authz to pkg/mcp and are exported, so that the tools/list filter in pkg/mcp can resolve members the same way.
The object and array encoders that write members back as they were read, with replacement values by exact member name, move with them, so that both filters share one codec.
pkg/authz already imports pkg/mcp, so this is the direction that avoids an import cycle.
The authz filters behave as before.
New tests check the member decoder and encoders, and that the canonical member check agrees with how encoding/json binds member names to struct fields.

Signed-off-by: Aleksandr Filippov <71711753+alex-feel@users.noreply.github.com>

* Fail closed on ambiguous tools/list responses

The tools/list filter treated a response as a tools list only when encoding/json decoded it into the filter's struct without error, and wrote any other response through unchanged.
A list it could not decode, or whose members encoding/json resolved differently from a client, therefore reached the client unfiltered.
The filter now checks whether a client could read the body as a tools list, as a JSON value or as an event stream, and filters such a body only when it resolves to one unambiguous list, withholding it otherwise.
A tools list has to be an array of objects, and the members the filter reads or rewrites (jsonrpc, id, result, tools, and each tool's name and description) must occur once under their canonical spelling, using the same case folding encoding/json applies when it binds members to struct fields.
A batch, or a body with data after a complete list, is withheld.
Event streams are filtered per event, with an event's data lines joined the way clients join them, and an event is written once its closing blank line arrives or the response ends.
A stream ... (continued)

861 of 928 new or added lines in 7 files covered. (92.78%)

71 existing lines in 6 files now uncovered.

93556 of 128734 relevant lines covered (72.67%)

851.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
92.17
1.49% pkg/mcp/tool_filter.go
26
91.75
pkg/mcp/tools_list_response.go
11
85.33
pkg/mcp/json_members.go
1
97.5
pkg/mcp/json_body_scan.go

Coverage Regressions

Lines Coverage ∆ File
51
59.0
-5.31% pkg/workloads/manager.go
6
19.87
-3.97% pkg/client/manager.go
6
92.17
1.49% pkg/mcp/tool_filter.go
3
83.94
-0.16% pkg/authserver/storage/redis.go
3
0.0
-100.0% pkg/workloads/sysproc_unix.go
2
94.59
-1.8% pkg/cache/validating_cache.go
Jobs
ID Job ID Ran Files Coverage
1 41910049034.1 04 Nov 2026 08:58PM UTC 1001
72.67
GitHub Action Run
Source Files on build 41910049034
  • Tree
  • List 1001
  • Changed 12
  • Source Changed 4
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41910049034
  • 9fd68eeb on github
  • Prev Build on main (#41839971734)
  • Next Build on main (#41912518784)
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