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

stacklok / toolhive / 25570268403
65%

Build:
DEFAULT BRANCH: main
Ran 08 May 2026 05:46PM UTC
Jobs 1
Files 720
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

08 May 2026 05:40PM UTC coverage: 64.853% (+0.003%) from 64.85%
25570268403

push

github

web-flow
Wire persistent DCRCredentialStore into EmbeddedAuthServer (#5196)

* Wire persistent DCR store into EmbeddedAuthServer

Type EmbeddedAuthServer.dcrStore against storage.DCRCredentialStore and
derive it from the same storage.Storage value returned by createStorage
via a single type assertion, so a Redis-backed authserver reuses
already-registered RFC 7591 clients across replicas and restarts
instead of re-registering at every boot.

Phase 2 left two parallel DCR stores: a runner-side in-memory map in
dcr_store.go and the storage-level interface added in sub-issue 1. This
collapses the runner-side implementation into a thin storageBackedStore
adapter that delegates to storage.DCRCredentialStore, leaving exactly
one persistence implementation per backend (storage.MemoryStorage and
storage.RedisStorage).

NewInMemoryDCRCredentialStore is preserved as a test helper that wraps
storage.NewMemoryStorage so existing resolver tests compile unchanged;
the standalone inMemoryDCRCredentialStore type and its map / RWMutex
are deleted. buildPureOAuth2Config is unchanged — the wiring change
swaps the implementation passed to the resolver, not the call shape.

Add TestEmbeddedAuthServer_DCRSurvivesRestart in
embeddedauthserver_test.go (next to TestNewEmbeddedAuthServer_DCRBoot)
covering the durable-restart case: boot, close, rebuild against the
same storage.MemoryStorage instance, assert the second resolve makes
zero AS requests. The integration_test.go file under pkg/authserver
would otherwise be the natural home, but it is in package authserver
and importing runner from there would cycle (runner already imports
authserver); the test docstring records this constraint.

* Address code review feedback

Fixed issues from code review of #5185 wiring change:

- HIGH: Storage backend leaked on NewEmbeddedAuthServer error paths.
  Split the constructor into a public NewEmbeddedAuthServer that calls
  createStorage and an unexported newEmbeddedAuthServerWithStorage that
  o... (continued)

86 of 91 new or added lines in 3 files covered. (94.51%)

212 existing lines in 7 files now uncovered.

63497 of 97909 relevant lines covered (64.85%)

62.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
89.38
0.75% pkg/authserver/runner/embeddedauthserver.go
2
87.95
-0.66% pkg/authserver/server_impl.go
1
97.96
-2.04% pkg/authserver/runner/dcr_store.go

Coverage Regressions

Lines Coverage ∆ File
170
84.13
0.51% pkg/authserver/storage/redis.go
12
75.09
-4.33% pkg/client/config.go
12
67.9
-14.81% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
2
96.46
-0.08% pkg/authserver/storage/memory.go
2
93.94
-6.06% pkg/foreach/foreach.go
Jobs
ID Job ID Ran Files Coverage
1 25570268403.1 08 May 2026 05:46PM UTC 720
64.85
GitHub Action Run
Source Files on build 25570268403
  • Tree
  • List 720
  • Changed 14
  • Source Changed 9
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25570268403
  • 9211a363 on github
  • Prev Build on main (#25561801062)
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