ci: reap orphan xctest/swift-test on self-hosted runner #183

Merged
KofTwentyTwo merged 1 commits from ci/runner-cleanup-zombies into develop 2026-05-13 21:37:28 +00:00
1 Commits
Author SHA1 Message Date
james.maes 7ac877b2cf ci(actions): reap orphan xctest/swift-test on self-hosted before each job
Grogu is a shared workstation, not an ephemeral VM. Interactive Xcode
test runs, aborted swift test sessions, or debugger crashes can leave
orphan xctest/swift-test/swift-driver processes around for hours,
holding Mach services + sockets + ports that subsequent CI jobs block
on when mounting their own test infrastructure.

Concrete incident: develop run 25824607025 hung in SPM AgentCore for
34 min (0% CPU, sleeping state) while 6 unrelated xctest zombies aged
22-24h were alive from prior interactive use. The runner only executes
one job at a time, so any such process at job start belongs to no live
job and is safe to kill.

Add a first step that runs SIGTERM then SIGKILL on any
xctest/swift-test/swift-driver process. Gated to runner.environment ==
'self-hosted' since github-hosted VMs start clean.

Closes #182
2026-05-13 16:09:15 -05:00