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

stacklok / toolhive / 25552139856
65%

Build:
DEFAULT BRANCH: main
Ran 08 May 2026 11:10AM UTC
Jobs 1
Files 720
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

08 May 2026 11:04AM UTC coverage: 64.815% (-0.03%) from 64.842%
25552139856

push

github

web-flow
Move pipe and socket URL handling to net/url (#5215)

* Move pipe and socket URL handling to net/url

Replace prefix-and-trim string handling with net/url.Parse on both
the producer (socketURL) and the consumer (HTTPClientForURL,
ParseNamedPipeURL, ParseUnixSocketPath) sides so pipe and socket
addresses round-trip through one library and one set of rules.

socketURL now emits unix:///<path> via (&url.URL{}).String(),
which fixes a real bug on Windows AF_UNIX paths: the previous
concatenation form produced unix://C:\path\thv.sock, which
url.Parse rejects with "invalid port :\\path\\thv.sock". The
round-trip is exercised by new tests on both platforms.

HTTPClientForURL now dispatches on url.Parse + switch u.Scheme,
which gives case-insensitive scheme matching (NPIPE://x routes the
same as npipe://x) for free and matches what the http arm already
does via ValidateLoopbackURL.

ParseNamedPipeURL gains explicit checks that net/url alone cannot
do: a 247-character cap (CreateNamedPipeW's lpName limit minus the
\\.\pipe\ prefix), the legacy reserved Windows device names
(CON, NUL, COM1-9, LPT1-9, ...), and a positive charset of
[A-Za-z0-9._-]+. Names are lowercased via strings.ToLower because
the pipe namespace is case-insensitive at the kernel layer; the
old strings.Contains(name, "..") guard is removed because it
rejected legitimate names like my..api.

ParseUnixSocketPath rejects URLs with non-empty authority, query,
fragment, or userinfo; it also strips the synthetic leading slash
that url.URL inserts in front of Windows drive letters so
unix:///C:%5Cpath%5Cthv.sock round-trips back to C:\path\thv.sock.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix Windows AF_UNIX socket URL round-trip

socketURL on Windows for AF_UNIX paths emitted unix://C:%5Cpath%5Cthv.sock
(two slashes) because url.URL.String() only inserts the host/path slash
when Host != "". url.Parse then mis-reads the drive letter as host:port
and returns "invalid port :%5Cpath%5Cthv.s... (continued)

36 of 44 new or added lines in 2 files covered. (81.82%)

42 existing lines in 7 files now uncovered.

63362 of 97758 relevant lines covered (64.82%)

60.49 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
85.92
-5.08% pkg/server/discovery/health.go

Coverage Regressions

Lines Coverage ∆ File
12
75.09
-4.33% pkg/client/config.go
12
67.9
-14.81% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
4
95.47
0.02% pkg/telemetry/middleware.go
2
96.53
0.0% pkg/authserver/storage/memory.go
2
73.63
-0.64% pkg/runner/config.go
2
85.92
-5.08% pkg/server/discovery/health.go
Jobs
ID Job ID Ran Files Coverage
1 25552139856.1 08 May 2026 11:10AM UTC 720
64.82
GitHub Action Run
Source Files on build 25552139856
  • Tree
  • List 720
  • Changed 9
  • Source Changed 3
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25552139856
  • a4d66b1e on github
  • Prev Build on main (#25518577229)
  • Next Build on main (#25560882915)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc