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

stacklok / toolhive / 24207554936
66%

Build:
DEFAULT BRANCH: main
Ran 09 Apr 2026 07:21PM UTC
Jobs 1
Files 617
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

09 Apr 2026 06:49PM UTC coverage: 65.055% (-0.02%) from 65.072%
24207554936

push

github

web-flow
Registry policy gates with type-safe configs (#4711)

Separate runner and registry policy gates with type-safe configs

The previous commit extracted PolicyGate to a shared pkg/policy package,
but this mixed runner and registry concerns in a single interface and
forced CheckCreateServer to use `any` to avoid a circular dependency.

Instead, keep each policy gate in the package it guards:
- pkg/runner keeps its original PolicyGate with type-safe *RunConfig
- pkg/registry gets a new PolicyGate with CheckUpdateRegistry and
  CheckDeleteRegistry, each receiving a dedicated config struct
  (UpdateRegistryConfig, DeleteRegistryConfig) that both CLI and API
  callers populate with the information available at their call site

The registry gate uses sync.RWMutex (read-heavy, write-once pattern),
NoopPolicyGate as the default (no separate allowAllGate), and exports
SnapshotPolicyGate for test cleanup across packages.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

43 of 63 new or added lines in 4 files covered. (68.25%)

33 existing lines in 3 files now uncovered.

56569 of 86955 relevant lines covered (65.06%)

61.75 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
15.38
-1.28% cmd/thv/app/config.go
2
35.01
3.85% pkg/api/v1/registry.go

Coverage Regressions

Lines Coverage ∆ File
14
74.44
-5.19% pkg/client/config.go
11
68.83
-14.29% pkg/client/discovery.go
8
23.56
-4.6% pkg/client/manager.go
Jobs
ID Job ID Ran Files Coverage
1 24207554936.1 09 Apr 2026 07:21PM UTC 617
65.06
GitHub Action Run
Source Files on build 24207554936
  • Tree
  • List 617
  • Changed 10
  • Source Changed 4
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24207554936
  • a3880939 on github
  • Prev Build on main (#24207493571)
  • Next Build on main (#24210015446)
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