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

stacklok / toolhive / 24274112989 / 1
66%
main: 66%

Build:
DEFAULT BRANCH: main
Ran 11 Apr 2026 04:01AM UTC
Files 616
Run time 13s
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

11 Apr 2026 03:56AM UTC coverage: 65.501% (+0.04%) from 65.458%
24274112989.1

push

github

web-flow
Fix stale config in registry routes and WorkloadService (#4751)

* Fix stale config in registry routes and WorkloadService

Two independent config snapshots caused inconsistency after enterprise
registry changes:

1. NewRegistryRoutes/NewRegistryRoutesForServe created separate
   config.Provider instances for configProvider and configService.
   This meant getRegistry responses mixed live metadata (from configService)
   with stale server lists (from the old independent provider). Fix: create
   a single provider p and pass it to both.

2. WorkloadService.appConfig was a one-time snapshot taken at construction.
   After an enterprise registry change, new workloads got stale registry
   URLs written into their persisted RunConfig. Fix: store config.Provider
   and call GetConfig() at the point of use in BuildFullRunConfig.

Add tests verifying:
- configService and getCurrentProvider share the same provider instance
  (listRegistries returns consistent type/source and server count)
- WorkloadService.configProvider is initialized at construction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Address bot review: fix factory bypass and TOCTOU in WorkloadService

- Replace config.NewDefaultProvider() with config.NewProvider() in
  NewWorkloadService so a registered ProviderFactory is respected,
  consistent with the analogous fix in NewRegistryRoutes
- Hoist cfg := s.configProvider.GetConfig() once at the top of the
  relevant block in BuildFullRunConfig so both uses (ResolveRegistrySourceURLs
  and DisableUsageMetrics) see the same config snapshot within a single call
- Add TestNewWorkloadService_RespectsRegisteredFactory to verify the
  factory-backed provider is actually used

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

56379 of 86074 relevant lines covered (65.5%)

61.67 hits per line

Source Files on job 24274112989.1
  • Tree
  • List 616
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24274112989
  • c9a5402c on github
  • Prev Job for on main (#24268402333.1)
  • Next Job for on main (#24294392793.1)
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