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

stacklok / toolhive / 26177286507
66%

Build:
DEFAULT BRANCH: main
Ran 20 May 2026 05:02PM UTC
Jobs 1
Files 735
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

20 May 2026 04:56PM UTC coverage: 65.498% (+0.001%) from 65.497%
26177286507

push

github

web-flow
Inject spawn seam in RunWorkloadDetached to stop orphan test processes (#5346)

* Inject spawn seam in RunWorkloadDetached

DefaultManager.RunWorkloadDetached re-execs os.Executable() with
`start <basename> --foreground`. Under `go test`, os.Executable()
resolves to the test binary, so the unit test for updateSingleWorkload
spawned `workloads.test start test-workload --foreground` as a
detached child via Setsid. Go's testing.Main ignores the positional
args and re-ran the entire test suite, which called
RunWorkloadDetached again — recursive spawn. Each child was orphaned
to launchd/init and survived after the test binary exited, eventually
consuming high CPU on developer machines.

Extract the spawn step into a function-typed field on DefaultManager
(detachedProcessSpawner) with a withDetachedSpawner option, following
the same pattern as withRetryConfig and withRunnerFactory. Production
uses spawnDetached (unchanged behavior); tests inject a no-op spawner
that returns a fake PID.

Closes #5344

* Address review feedback on spawn seam

- MEDIUM: Preserve original WorkloadStatus ordering. Move SetWorkloadStatus(Starting) and the Error rollback into spawnDetached, so failures during pre-exec setup (os.Executable, xdg.DataFile, GetSecretsPassword) return without any status change — matching the pre-refactor behavior.
- MEDIUM: Add TestDefaultManager_RunWorkloadDetached_SpawnerError to cover the new spawner-error path.
- MEDIUM: Add TestDefaultManager_RunWorkloadDetached_SpawnerSuccess to verify the spawner is invoked and its PID is forwarded.
- LOW: Document that ctx is intentionally not propagated to exec.Command, so the child can outlive the parent.
- LOW: Expand detachedProcessSpawner doc to call out the platform-specific detachment that makes orphan children possible.

21 of 30 new or added lines in 1 file covered. (70.0%)

14 existing lines in 5 files now uncovered.

64799 of 98933 relevant lines covered (65.5%)

61.1 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
56.68
0.56% pkg/workloads/manager.go

Coverage Regressions

Lines Coverage ∆ File
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
71.85
-1.11% pkg/ignore/processor.go
2
61.97
-1.41% pkg/networking/port.go
2
73.63
-0.64% pkg/runner/config.go
1
56.68
0.56% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 26177286507.1 20 May 2026 05:02PM UTC 735
65.5
GitHub Action Run
Source Files on build 26177286507
  • Tree
  • List 735
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26177286507
  • 28949821 on github
  • Prev Build on main (#26173440719)
  • Next Build on main (#26190140034)
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