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

stacklok / toolhive / 24886077856
67%

Build:
DEFAULT BRANCH: main
Ran 24 Apr 2026 11:06AM UTC
Jobs 1
Files 664
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

24 Apr 2026 11:00AM UTC coverage: 66.229% (+0.03%) from 66.198%
24886077856

push

github

web-flow
llm: extract shared OIDC config, move business logic to pkg/llm, add E2E tests (#5049)

* llm: extract shared OIDC config, move business logic to pkg/llm, add E2E tests

Three follow-up cleanups from the #5029 review (#5048):

1. Extract shared OIDC config type into pkg/oidc.ClientConfig. Both
   config.RegistryOAuthConfig and llm.OIDCConfig are now type aliases for
   this type, so field additions and validation changes apply to both
   authentication flows without drift.

2. Move business logic from the CLI layer into pkg/llm per the cli-commands
   convention. The config-set mutation/validation branch, the config-show
   text formatter, and the cached-token deletion logic all live in pkg/llm
   now. The CLI commands are thin wrappers that parse flags and delegate.

3. Add E2E tests for thv llm config set/show/reset, covering happy-path
   round-trips, HTTPS enforcement, incremental configuration, the
   not-configured message, and post-reset state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* llm: fix errcheck lint failures in Show method

Show now returns an error and uses a writef closure to propagate the
first write failure rather than ignoring io.Writer errors. The CLI
caller is updated to return the error directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* llm: skip token deletion for providers that can't list or delete

Providers like the environment provider are read-only and cannot hold
cached tokens, so calling ListSecrets on them would always produce a
spurious warning during thv llm config reset. Check CanList/CanDelete
capabilities first and treat non-capable providers as a no-op.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* llm: add unit tests for SetFields, DeleteCachedTokens, and Show

Covers the business logic introduced in manage.go:
- SetFields: field mutation, partial vs full validation branching,
  invalid-value rejection
- DeleteCachedTokens: capability no-ops (no CanList/Ca... (continued)

70 of 83 new or added lines in 3 files covered. (84.34%)

35 existing lines in 4 files now uncovered.

59167 of 89337 relevant lines covered (66.23%)

60.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
0.0
0.0% cmd/thv/app/llm.go

Coverage Regressions

Lines Coverage ∆ File
14
74.44
-5.19% pkg/client/config.go
11
69.23
-14.1% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 24886077856.1 24 Apr 2026 11:06AM UTC 664
66.23
GitHub Action Run
Source Files on build 24886077856
  • Tree
  • List 664
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24886077856
  • 68f4c2f1 on github
  • Prev Build on main (#24884944127)
  • Next Build on main (#24903886531)
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