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

stacklok / toolhive / 30094849518
69%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 01:01PM UTC
Jobs 1
Files 833
Run time 3min
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

24 Jul 2026 12:55PM UTC coverage: 69.258% (+0.04%) from 69.223%
30094849518

push

github

web-flow
Add typed exit codes and confirmation gate to skill sync/upgrade (#5897)

* Add typed exit codes and confirmation gate to skill sync/upgrade

RFC THV-0080 gives CI a scriptable contract for sync/upgrade: exit
2 for check/freshness failures, 3 for partial failures, 4 for
policy rejections, distinct from the generic 1 cobra already uses.
It also requires a pre-install confirmation gate — skill content
is a set of AI-followed instructions, so a non-interactive run
must refuse outright without --yes rather than silently proceeding.

- cmd/thv/app/exitcode.go: exitCodeError carries a specific exit
  code through a RunE return; main.go maps it via
  ExitCodeFromError instead of a hardcoded os.Exit(1)
- cmd/thv/app/skill_confirm.go: requireConfirmation prompts on a
  TTY, refuses with ExitCodePolicyRejection off one
- sync/upgrade gain --yes, skipped automatically by --check/
  --preview (which never install anything); their exit-code
  mapping prioritizes partial failure over drift/ref-change-blocked
- docs/arch/12-skills-system.md: new Project Lock File section
  covering rollout gating, schema, install/uninstall hooks, sync,
  upgrade, and the exit-code contract
- CLI E2E coverage for all four exit codes (0/2/4, plus --yes)

This is the last PR of Stack 1 (lock file + sync + upgrade) for
RFC THV-0080. Stack 2 (Sigstore signing/verification) builds on
top once this stack is fully merged; TOOLHIVE_SKILLS_LOCK_ENABLED
stays off by default until that full v1 lands.

Part of the production stack for #5715 (RFC THV-0080). Stack: 6/6.

* Gate upgrade's ref-change exit code behind --preview

upgradeExitError mapped a ref-change-blocked outcome to exit 4
unconditionally, even during --preview — where nothing was actually
blocked, only reported. Thread preview through, mirroring how
syncExitError already gates Drifted behind --check. Also reconcile a
docs contradiction about --preview's side effects, drop a stale
signer-change reference in the exit-code doc comment... (continued)

80 of 142 new or added lines in 5 files covered. (56.34%)

10 existing lines in 3 files now uncovered.

78600 of 113489 relevant lines covered (69.26%)

79.21 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
34.09
cmd/thv/app/skill_confirm.go
16
66.67
46.4% cmd/thv/app/skill_sync.go
16
67.29
41.43% cmd/thv/app/skill_upgrade.go
1
0.0
0.0% cmd/thv/main.go

Coverage Regressions

Lines Coverage ∆ File
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
80.56
-0.7% pkg/transport/proxy/httpsse/http_proxy.go
1
66.67
46.4% cmd/thv/app/skill_sync.go
Jobs
ID Job ID Ran Files Coverage
1 30094849518.1 24 Jul 2026 01:01PM UTC 833
69.26
GitHub Action Run
Source Files on build 30094849518
  • Tree
  • List 833
  • Changed 6
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30094849518
  • e047b0d1 on github
  • Prev Build on main (#30087972278)
  • Next Build on main (#30095182701)
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