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

stacklok / toolhive / 32154873936
70%

Build:
DEFAULT BRANCH: main
Ran 18 Aug 2026 03:38PM UTC
Jobs 1
Files 876
Run time 3min
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 03:30PM UTC coverage: 70.47% (+0.06%) from 70.408%
32154873936

push

github

web-flow
Use an absolute thv path in the Claude Desktop helper shim (#6354)

* Use an absolute thv path in POSIX token helpers

The bare "thv llm token" token helper never runs for GUI-launched
clients. macOS GUI apps inherit launchd's environment, not the user's
shell PATH, and thv installs to ~/.toolhive/bin, which launchd's
default PATH does not include. Claude Desktop is broken
unconditionally since it is only ever GUI-launched; its setup still
reports success and the failure surfaces later as an auth error.
Claude Code is broken whenever it is started from the Dock or
Spotlight. The same PATH dependency also lets any writable directory
earlier on PATH shadow thv and return an attacker-chosen token.

Single-quote the absolute path from os.Executable() on POSIX. Quoting
is what the previous attempt could not do portably, but the two
consumers here only ever run through /bin/sh, where single-quoting is
a total transform: no byte inside a single-quoted run is special, so
no path needs rejecting and the shim's metacharacter blocklist is
deleted rather than widened. Claude Desktop's shim switches to the
TokenHelperPath already plumbed to it and previously ignored.

Windows keeps the bare command. cmd.exe has no equivalent quoting for
backslash-bearing paths, and leaving that branch byte-identical to
what ships today means it cannot regress; Dock-equivalent launches
there still need thv on the GUI PATH.

* Keep the bare thv command for direct-mode clients

Scope the absolute-path fix to Claude Desktop, which is the only
client that cannot use a PATH-resolved command: it is exclusively
GUI-launched, so it inherits launchd's environment and never finds
thv on PATH.

Claude Code keeps the bare "thv llm token". It is terminal-oriented,
and the bare form re-resolves on every invocation, so upgrading or
relocating thv keeps working without re-running "thv llm setup".
This also drops the platform branch: with no direct-mode client
interpolating a path, there is nothing... (continued)

16 of 17 new or added lines in 1 file covered. (94.12%)

1564 existing lines in 10 files now uncovered.

85514 of 121348 relevant lines covered (70.47%)

97.37 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
78.08
0.43% pkg/client/llm_gateway_credential_helper.go

Coverage Regressions

Lines Coverage ∆ File
757
44.84
-0.4% cmd/thv-operator/api/v1beta1/zz_generated.deepcopy.go
376
66.17
0.09% cmd/thv-operator/controllers/virtualmcpserver_controller.go
295
69.74
0.28% cmd/thv-operator/controllers/mcpremoteproxy_controller.go
50
80.08
1.63% cmd/thv-operator/api/v1beta1/mcpexternalauthconfig_types.go
46
92.87
0.24% cmd/thv-operator/pkg/controllerutil/authserver.go
21
94.6
0.17% pkg/authserver/server/tokenexchange/multi_issuer_validator.go
8
98.13
-0.63% pkg/authserver/server/tokenexchange/handler.go
6
66.64
4.56% pkg/workloads/manager.go
3
67.14
-4.29% pkg/state/runconfig.go
2
75.5
-0.24% pkg/transport/proxy/streamable/streamable_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 32154873936.1 18 Aug 2026 03:38PM UTC 876
70.47
GitHub Action Run
Source Files on build 32154873936
  • Tree
  • List 876
  • Changed 18
  • Source Changed 11
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32154873936
  • af7c1761 on github
  • Prev Build on main (#32118623127)
  • Next Build on main (#32161289492)
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