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

stacklok / toolhive / 38740679061
71%

Build:
DEFAULT BRANCH: main
Ran 15 Oct 2026 01:20PM UTC
Jobs 1
Files 954
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

15 Oct 2026 01:11PM UTC coverage: 71.302% (-0.02%) from 71.321%
38740679061

push

github

web-flow
Re-register DCR clients the upstream evicted (#6822)

* Re-register DCR clients the upstream evicted

A cached DCR registration was reused forever, but a ToolHive auth
server evicts idle DCR clients after DefaultDCRClientTTL while
advertising client_secret_expires_at=0. Once evicted, every
authorization was rejected upstream with invalid_client and nothing
recovered.

On a cache hit the resolver now redeems a random authorization code
at the token endpoint with the cached credentials. invalid_client
means the registration is gone, so it registers a new client and
replaces the stale row through UpdateDCRCredentialsIfUnchanged.
invalid_grant or any inconclusive answer keeps the cached client.

Fixes #6821

Signed-off-by: Giuseppe Scuglia <peppescg@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Clarify when the DCR registration probe decides

Only servers that authenticate the client before validating the grant
answer invalid_client for a deleted registration. For public clients
some servers validate the code first, and the probe then keeps the
cached registration as before.

Signed-off-by: Giuseppe Scuglia <peppescg@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Make DCR registration replacement an optional store capability

Adding ReplaceIfUnchanged to dcr.CredentialStore broke every store
implemented outside this package, and a wrapper that embeds the
interface would have inherited the method silently, so a replacement
would bypass whatever the wrapper does around writes. Move it to a
separate Replacer interface that both in-package stores implement. The
resolver checks for it before probing: a store that cannot act on a
rejection keeps today's cache-hit behaviour and the upstream is not
contacted at all.

Read the cache inside the singleflight, so a caller can no longer
revalidate a row it read before an earlier flight for the same key
replaced it and register a second client. The recheck in
registerAndCa... (continued)

143 of 163 new or added lines in 3 files covered. (87.73%)

56 existing lines in 4 files now uncovered.

86875 of 121841 relevant lines covered (71.3%)

126.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
85.92
pkg/auth/dcr/validate.go
7
85.71
-4.43% pkg/auth/dcr/store.go
3
86.61
1.37% pkg/auth/dcr/resolver.go

Coverage Regressions

Lines Coverage ∆ File
45
59.21
-4.47% pkg/workloads/manager.go
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
3
0.0
-100.0% pkg/workloads/sysproc_unix.go
2
55.58
-0.52% pkg/transport/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 38740679061.1 15 Oct 2026 01:20PM UTC 954
71.3
GitHub Action Run
Source Files on build 38740679061
  • Tree
  • List 954
  • Changed 12
  • Source Changed 6
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38740679061
  • 7d2acc67 on github
  • Prev Build on main (#38738572782)
  • Next Build on main (#38753219600)
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