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

stacklok / toolhive / 24826193687
67%

Build:
DEFAULT BRANCH: main
Ran 23 Apr 2026 08:59AM UTC
Jobs 1
Files 658
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

23 Apr 2026 08:53AM UTC coverage: 66.306% (-0.02%) from 66.326%
24826193687

push

github

web-flow
Classify OCI pull errors and fall back to git for skills content API (#5014)

* Surface upstream error messages for 502/503/504 in API handler

Today every 5xx response body collapses to http.StatusText(code), which is appropriate for 500 (may wrap DB drivers, container runtimes, connection strings) but hides actionable detail for 502/503/504 — which are explicitly about upstream failures the caller can act on.

Branch the 5xx path: keep 500 generic, include err.Error() in the body for 502/503/504. Server-side slog/OTel/Sentry reporting is unchanged.

* Classify OCI pull errors into sharper HTTP status codes

Registry.Pull failures in getContentFromOCI and installFromOCI were all mapped to a flat 502 Bad Gateway, so a 401 from GHCR, a missing manifest, a 429, and a network outage all looked identical to the caller.

Add classifyPullError to inspect oras-go errors: context.DeadlineExceeded/Canceled → 504; *errcode.ErrorResponse 401/403 → 401, 404 → 404, 429 → 429, other 4xx/5xx → 502; errdef.ErrNotFound → 404; fallback → 502.

Wire into content.go and install_oci.go at the Pull call sites. 4xx classifications flow through the unchanged 4xx handler path so auth/not-found errors surface verbatim without relying on the 5xx body change.

* Fall back to registry-declared git package when OCI pull fails

A content-preview request for an OCI ref that also appears in the skill registry with a git package was returned as a flat error as soon as the OCI pull failed, even though the catalog declared a perfectly good git mirror alongside the OCI artifact.

Add resolveGitFallbackForOCIRef in registry.go. It searches the catalog by the refs tail path segment, keeps entries whose OCI package identifier parses to the same repository path (tag/digest agnostic, so :0.1.0 and :latest match), and returns the single matching entry's pinned git:// URL. Ambiguous matches are deliberately skipped — refusing to guess is better than silently serving the wrong skill.

Wire into ... (continued)

105 of 118 new or added lines in 5 files covered. (88.98%)

44 existing lines in 6 files now uncovered.

58837 of 88735 relevant lines covered (66.31%)

63.11 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
91.52
-3.53% pkg/skills/skillsvc/registry.go
4
78.66
-0.67% pkg/skills/skillsvc/content.go

Coverage Regressions

Lines Coverage ∆ File
14
74.44
-5.19% pkg/client/config.go
11
69.23
-14.1% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
79.38
-0.77% pkg/transport/proxy/httpsse/http_proxy.go
2
94.77
-1.31% pkg/vmcp/composer/dag_executor.go
Jobs
ID Job ID Ran Files Coverage
1 24826193687.1 23 Apr 2026 08:59AM UTC 658
66.31
GitHub Action Run
Source Files on build 24826193687
  • Tree
  • List 658
  • Changed 13
  • Source Changed 6
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24826193687
  • 72ef8359 on github
  • Prev Build on main (#24824729728)
  • Next Build on main (#24829472926)
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