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

stacklok / toolhive / 25441337713
65%

Build:
DEFAULT BRANCH: main
Ran 06 May 2026 02:30PM UTC
Jobs 1
Files 717
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

06 May 2026 02:24PM UTC coverage: 64.749% (+0.06%) from 64.685%
25441337713

push

github

web-flow
Expose DCR config in operator CRD for OAuth2 upstreams (#5069)

* Expose DCR config in operator CRD for OAuth2 upstreams

Implements changes for issue #5040 (Phase 2 DCR CRD surface):

- Add DCRUpstreamConfig CRD type (discoveryUrl, registrationEndpoint,
  initialAccessTokenRef, softwareId, softwareStatement) and a new
  dcrConfig field on OAuth2UpstreamConfig so Kubernetes users can
  configure RFC 7591 Dynamic Client Registration on upstream providers.
- Make OAuth2UpstreamConfig.clientId optional and add CEL validation
  requiring exactly one of clientId or dcrConfig, and exactly one of
  discoveryUrl or registrationEndpoint inside dcrConfig. Mirror the
  checks at runtime via validateOAuth2DCRConfig for defense-in-depth.
- Wire the conversion in controllerutil/authserver.go so DCRConfig is
  mapped onto authserver.DCRUpstreamConfig. InitialAccessTokenRef is
  resolved to an env var (TOOLHIVE_UPSTREAM_DCR_INITIAL_ACCESS_TOKEN_*)
  populated from the referenced Secret, mirroring the ClientSecretRef
  pattern. Extract small helpers for env-var generation to keep
  cyclomatic complexity within lint limits.
- Regenerate zz_generated.deepcopy.go, CRD YAML manifests, and CRD API
  reference docs.
- Add table-driven validation tests covering DCR+ClientID conflict,
  both endpoints set, neither endpoint set, valid single-endpoint
  cases, and neither-auth configuration. Add conversion tests covering
  DCR discoveryUrl/registrationEndpoint paths and initial-access-token
  env var wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Address code review feedback

Fixed issues from code review of the DCR CRD surface commit:

- CRITICAL: CEL markers contained a Unicode smart quote (U+201D) that
  gofmt's doc-comment formatter reintroduced on every lint-fix. Rewrote
  both markers to use CEL's size(...) > 0 idiom instead of `!= ''`, which
  sidesteps the typographic normalization entirely and keeps regeneration
  idempotent. Verified no... (continued)

152 of 182 new or added lines in 3 files covered. (83.52%)

7 existing lines in 3 files now uncovered.

63004 of 97305 relevant lines covered (64.75%)

59.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
44.92
-0.31% cmd/thv-operator/api/v1beta1/zz_generated.deepcopy.go
10
93.29
0.61% cmd/thv-operator/pkg/controllerutil/authserver.go
2
68.85
7.11% cmd/thv-operator/api/v1beta1/mcpexternalauthconfig_types.go

Coverage Regressions

Lines Coverage ∆ File
3
79.38
-0.77% pkg/transport/proxy/httpsse/http_proxy.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
2
51.22
-0.19% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 25441337713.1 06 May 2026 02:30PM UTC 717
64.75
GitHub Action Run
Source Files on build 25441337713
  • Tree
  • List 717
  • Changed 13
  • Source Changed 3
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25441337713
  • c146093c on github
  • Prev Build on main (#25439938257)
  • Next Build on main (#25449151925)
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