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

stacklok / toolhive / 34098415784
70%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 08:10AM UTC
Jobs 1
Files 912
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

07 Sep 2026 08:01AM UTC coverage: 70.146% (+0.09%) from 70.055%
34098415784

push

github

web-flow
Expose canonical inbound grants in CRDs (#6499)

* Make outbound DCR cache population race-safe across replicas

A reviewer found that two replicas racing on the same outbound DCR
(RFC 7591) cache-miss could each independently register a different
OAuth client with the upstream IdP — dynamic registration always
mints a fresh client_id/secret — then whichever replica's write
landed last in the shared Redis cache silently won. The losing
replica keeps the client it registered baked into its own config for
the rest of its process lifetime (DCR resolution runs once per
upstream at startup, never re-resolved), so it no longer agrees with
the durable cache about which client it holds credentials for.
dcrFlight (a singleflight.Group) only coalesces concurrent callers
within one process; it has no cross-replica reach.

Change the cache-population contract from upsert to create-if-absent,
returning the authoritative durable value either way: the caller's
own resolution on a successful claim, or the concurrent winner's
otherwise. CredentialStore.Put becomes PutIfAbsent, and
DCRCredentialStore.StoreDCRCredentials becomes
StoreDCRCredentialsIfAbsent; registerAndCache now returns whichever
resolution the store says is authoritative instead of trusting its
own local registration, and logs (at Debug, without ever including a
secret) when this replica lost the race. Callers MUST use the
returned value — RFC 7591 guarantees nothing about the two
registrations converging.

Redis claims the key with SET...NX (the same reservation-lock shape
already used twice in this file for ClientAssertionJWTValid and
ConsumeAssertionJWT), not WATCH/MULTI: unlike ReconcileConfiguredClient,
this write has no read-then-decide step to protect, so a plain atomic
NX claim is sufficient. On a lost claim it reads back the winner
through the existing GetDCRCredentials path rather than a second,
hand-rolled unmarshal, and retries the whole claim-or-read cycle
(bounded) if the winner's row evic... (continued)

553 of 640 new or added lines in 14 files covered. (86.41%)

15 existing lines in 4 files now uncovered.

78875 of 112444 relevant lines covered (70.15%)

92.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
54
45.83
0.27% cmd/thv-operator/api/v1beta1/zz_generated.deepcopy.go
11
82.51
2.51% cmd/thv-operator/controllers/mcpexternalauthconfig_controller.go
8
87.78
-0.65% pkg/authserver/server/tokenexchange/multi_issuer_validator.go
6
91.28
-0.1% cmd/thv-operator/pkg/controllerutil/authserver.go
4
83.33
6.5% cmd/thv-operator/api/v1beta1/mcpexternalauthconfig_types.go
3
66.55
1.95% cmd/thv-operator/controllers/virtualmcpserver_controller.go
1
94.28
-0.53% pkg/authserver/config.go

Coverage Regressions

Lines Coverage ∆ File
6
19.87
-3.97% pkg/client/manager.go
6
59.21
-0.62% pkg/workloads/manager.go
2
87.78
-0.65% pkg/authserver/server/tokenexchange/multi_issuer_validator.go
1
66.55
1.95% cmd/thv-operator/controllers/virtualmcpserver_controller.go
Jobs
ID Job ID Ran Files Coverage
1 34098415784.1 07 Sep 2026 08:09AM UTC 912
70.15
GitHub Action Run
Source Files on build 34098415784
  • Tree
  • List 912
  • Changed 18
  • Source Changed 15
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34098415784
  • 500f4784 on github
  • Prev Build on main (#34055498166)
  • Next Build on main (#34117058800)
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