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

stacklok / toolhive / 21476873353
60%

Build:
DEFAULT BRANCH: main
Ran 29 Jan 2026 11:53AM UTC
Jobs 1
Files 483
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

29 Jan 2026 11:45AM UTC coverage: 60.469% (+0.04%) from 60.432%
21476873353

push

github

web-flow
Introduce service layer and improve API/CLI error handling (#3480)

This change consolidates registry configuration logic into a service layer
and improves error handling in both the API and CLI.

Changes:

Service Layer:
- Add RegistryConfigService interface (pkg/config/registry_service.go)
- Consolidates registry configuration operations (SetRegistryFromInput, UnsetRegistry)
- Auto-detects registry type (URL/API/File) and provides user-friendly messages
- Add comprehensive service tests (pkg/config/registry_service_test.go)
- Generate mocks for testing (pkg/config/mocks/mock_registry_service.go)

API Layer (pkg/api/v1/registry.go):
- Map structured errors to proper HTTP status codes:
  - 502 Bad Gateway: Validation errors (invalid JSON, missing servers)
  - 504 Gateway Timeout: Connectivity/timeout errors (unreachable hosts)
- Add isConnectivityError() and isValidationError() helpers
- Refactor updateRegistry() to use RegistryConfigService
- Add timeout integration tests (registry_timeout_test.go)

CLI Layer (cmd/thv/app/config.go):
- Use RegistryConfigService for cleaner code
- Add enhanceRegistryError() for user-friendly error messages
- Provide actionable hints for common failure scenarios
- Map error types to match API status codes (504, 502)

Benefits:
- Single source of truth for registry configuration logic
- Consistent error handling across API and CLI
- Better user experience with actionable error messages
- Easier testing with service abstraction

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

* rename type

* Update E2E tests to reflect new registry error behaviour (#3481)

* Infrastructure improvements and bugfixes for vMCP (#3439)

* Infrastructure improvements and bugfixes for vMCP

- Add OpenTelemetry tracing to capability aggregation
- Add singleflight deduplication for discovery requests
- Add health checker self-check prevention
- Add HTTP client timeout fixes
- Improve E2E test reliability
- Various build and infrastru... (continued)

114 of 260 new or added lines in 4 files covered. (43.85%)

8 existing lines in 4 files now uncovered.

39194 of 64817 relevant lines covered (60.47%)

76.52 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
18
29.52
3.28% pkg/api/v1/registry.go
20
74.36
pkg/registry/service.go
42
0.0
pkg/registry/mocks/mock_service.go
66
13.29
-0.31% cmd/thv/app/config.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
13.29
-0.31% cmd/thv/app/config.go
2
29.52
3.28% pkg/api/v1/registry.go
2
82.83
-0.26% pkg/vmcp/composer/workflow_engine.go
3
71.85
-1.11% pkg/ignore/processor.go
Jobs
ID Job ID Ran Files Coverage
1 21476873353.1 29 Jan 2026 11:53AM UTC 483
60.47
GitHub Action Run
Source Files on build 21476873353
  • Tree
  • List 483
  • Changed 9
  • Source Changed 2
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21476873353
  • 856b7290 on github
  • Prev Build on main (#21476627620)
  • Next Build on main (#21477351884)
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