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

stacklok / toolhive / 23541869769
65%

Build:
DEFAULT BRANCH: main
Ran 25 Mar 2026 12:55PM UTC
Jobs 1
Files 577
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 Mar 2026 12:50PM UTC coverage: 65.261% (+0.006%) from 65.255%
23541869769

push

github

web-flow
Inject run config store into WorkloadFromContainerInfo (#4342)

* Inject run config store into WorkloadFromContainerInfo

WorkloadFromContainerInfo called loadRunConfigFields which internally
created a real state.LocalStore hitting the XDG filesystem on every
call. This caused flaky tests when parallel tests created or truncated
runconfig files, leading to intermittent EOF errors from json.Decode.

Add a state.Store parameter to WorkloadFromContainerInfo and
loadRunConfigFields so callers inject the store, matching the existing
dependency injection pattern in fileStatusManager. Add a runConfigStore
field to runtimeStatusManager for parity.

Fix file_status_test.go mock readers to use DoAndReturn for fresh
readers on each call, preventing EOF when the store is read more than
once per test.

Fixes #4341

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

* Fix lint errors in loadRunConfigFields and mergeHealthyWorkloadData

Check reader.Close error return and break long function signature line
to satisfy errcheck and lll linters.

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

* Eliminate TOCTOU race and fix close error handling in loadRunConfigFields

The Exists+GetReader sequence had a race where a concurrent workload
deletion between the two calls would return an error instead of the
intended empty config. Remove the Exists call entirely and handle
not-found from GetReader directly via httperr status code.

Also log reader.Close() errors with slog.Warn to match the established
project pattern, and wrap errors with workload name for debuggability.

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

* Fix gci import grouping in types.go

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

* Inject run config store into NewStatusManagerFromRuntime

Move store creation out of NewStatusManagerFromRuntime into
NewStatusManagerWithEnv so the constructor is pure DI. Tests
inject a... (continued)

28 of 38 new or added lines in 3 files covered. (73.68%)

40 existing lines in 3 files now uncovered.

51240 of 78515 relevant lines covered (65.26%)

72.14 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
81.25
-1.64% pkg/workloads/statuses/status.go
8
87.95
-5.47% pkg/workloads/types/types.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
57.52
-1.77% pkg/networking/port.go
4
86.21
9.74% pkg/fileutils/lock.go
34
76.0
-4.65% pkg/secrets/encrypted.go
Jobs
ID Job ID Ran Files Coverage
1 23541869769.1 25 Mar 2026 12:55PM UTC 577
65.26
GitHub Action Run
Source Files on build 23541869769
  • Tree
  • List 577
  • Changed 9
  • Source Changed 5
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23541869769
  • d208cfc4 on github
  • Prev Build on main (#23536679593)
  • Next Build on main (#23542795780)
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