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

stacklok / toolhive / 19824339516
59%

Build:
DEFAULT BRANCH: main
Ran 01 Dec 2025 01:31PM UTC
Jobs 1
Files 388
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

01 Dec 2025 01:29PM UTC coverage: 50.009% (-0.01%) from 50.019%
19824339516

push

github

web-flow
Refactor/typed backend auth strategy (#2797)

* add auth/types package with typed strategy config structs

Create a new leaf package pkg/vmcp/auth/types containing:
- Strategy type constants (StrategyTypeUnauthenticated, etc.)
- BackendAuthStrategy struct with typed fields (HeaderInjection, TokenExchange)
- HeaderInjectionConfig and TokenExchangeConfig structs

The Metadata field is retained in BackendAuthStrategy for backward
compatibility - all existing code continues to work unchanged.

Update all files to import BackendAuthStrategy from auth/types instead
of config package. This is a structural refactoring with zero behavior
change, preparing for a follow-up PR that will remove the Metadata field.

* remove Metadata field and use typed auth config

Remove the deprecated Metadata map[string]any field from BackendAuthStrategy
and migrate all code to use typed fields (HeaderInjection, TokenExchange).

Key changes:
- Remove Metadata field from authtypes.BackendAuthStrategy
- Update Strategy interface to accept *BackendAuthStrategy instead of map
- Update all strategies (header_injection, tokenexchange, unauthenticated)
- Update converters to return typed BackendAuthStrategy
- Change Backend/BackendTarget structs to use AuthConfig instead of
  AuthStrategy + AuthMetadata
- Update ResolveForBackend to return *BackendAuthStrategy
- Update all consumers and tests

This provides type safety, better IDE support, and eliminates runtime
type assertions throughout the auth subsystem.

169 of 209 new or added lines in 17 files covered. (80.86%)

6 existing lines in 3 files now uncovered.

25668 of 51327 relevant lines covered (50.01%)

60.06 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.82
0.34% pkg/vmcp/auth/strategies/tokenexchange.go
2
0.0
0.0% test/integration/vmcp/helpers/vmcp_server.go
8
0.0
0.0% pkg/vmcp/auth/mocks/mock_strategy.go
9
36.7
-0.28% cmd/thv-operator/pkg/vmcpconfig/converter.go
9
63.53
0.0% pkg/vmcp/auth/converters/interface.go
11
63.64
-0.87% pkg/vmcp/config/validator.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
36.7
-0.28% cmd/thv-operator/pkg/vmcpconfig/converter.go
2
95.56
-4.44% pkg/vmcp/auth/converters/header_injection.go
3
63.64
-0.87% pkg/vmcp/config/validator.go
Jobs
ID Job ID Ran Files Coverage
1 19824339516.1 01 Dec 2025 01:31PM UTC 388
50.01
GitHub Action Run
Source Files on build 19824339516
  • Tree
  • List 388
  • Changed 18
  • Source Changed 18
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19824339516
  • 20ecb038 on github
  • Prev Build on main (#19822270758)
  • Next Build on main (#19825907235)
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