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

stacklok / toolhive / 30161660472
69%

Build:
DEFAULT BRANCH: main
Ran 25 Jul 2026 02:35PM UTC
Jobs 1
Files 837
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

25 Jul 2026 02:27PM UTC coverage: 69.369% (-0.02%) from 69.391%
30161660472

push

github

web-flow
Make swagger docgen deterministic (dedupe swag's doubled enums)

* Pin swag version for swagger docgen instead of @latest

go.mod already requires github.com/swaggo/swag/v2 v2.0.0-rc5, but
Taskfile.yml and verify-docgen.yml both installed the swag CLI via
@latest, so a future swag release could silently change doc output
underneath the "Verify Swagger Documentation" check with no code
change to review. Pin both install steps to the version already in
go.mod.

This does not fully close out the nondeterminism seen in that check:
swag v2.0.0-rc5 itself has a bug where loadExternalPackage (packages.go)
reparses an external module's package without memoizing by import
path, which can non-deterministically double x-enum-varnames/enum
entries for types defined outside this module (observed for
model.ArgumentType, model.Format, and model.Icon from
github.com/modelcontextprotocol/registry). Confirmed across repeated
runs with this exact pinned binary: some runs match the committed
docs, others don't. See handover notes for follow-up options.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Dedupe swag's nondeterministic doubled enum arrays

GOMAXPROCS=1 does not make swagger docgen deterministic (confirmed:
even single-threaded, a fresh run can still double enum arrays), so
the nondeterminism isn't a goroutine race — it's driven by Go's
randomized map iteration order inside swag's file-processing loop
(packages.go), which changes which files get walked in what order
each run.

Root cause: swag's loadExternalPackage (packages.go) reparses an
external module's package every time one of its consts needs
evaluating, without memoizing by import path. For types defined
outside this module — model.ArgumentType, model.Format, model.Icon
from github.com/modelcontextprotocol/registry — that can append the
same const declarations twice, doubling the emitted "enum" and
"x-enum-varnames" arrays. Whether that happens depends on map
iteration order, so it varies r... (continued)

11 of 52 new or added lines in 1 file covered. (21.15%)

6 existing lines in 2 files now uncovered.

79285 of 114295 relevant lines covered (69.37%)

80.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
41
21.15
cmd/help/dedupe-enums/main.go

Coverage Regressions

Lines Coverage ∆ File
3
49.27
-0.62% pkg/transport/stdio.go
3
61.86
-0.26% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 30161660472.1 25 Jul 2026 02:35PM UTC 837
69.37
GitHub Action Run
Source Files on build 30161660472
  • Tree
  • List 837
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30161660472
  • 9ef27fa3 on github
  • Prev Build on main (#30156477042)
  • Next Build on main (#30161936478)
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