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
KofTwentyTwo commented 2026-05-13 21:09:28 +00:00 (Migrated from github.com)

Summary

Add a first step in swift-packages (gated to runner.environment == 'self-hosted') that kills any orphan xctest, swift-test, or swift-driver processes before checkout/build/test. SIGTERM, then SIGKILL holdouts.

Why

Grogu is a shared workstation — interactive Xcode use can leak processes that hold Mach services + ports, which then deadlock subsequent CI jobs. Develop run 25824607025 hung in SPM AgentCore for 34 min on exactly this pattern (6 xctest zombies aged 22–24h from prior interactive use). Single-runner serialization means any matching process at job-start is safely killable.

Test plan

  • Merge to develop, watch the next CI run.
  • Step logs zero processes when clean.
  • Step exits 0 even when no zombies exist.
  • No regression on github-hosted (runner.environment gate verified).

Closes #182

🤖 Generated with Claude Code

## Summary Add a first step in `swift-packages` (gated to `runner.environment == 'self-hosted'`) that kills any orphan `xctest`, `swift-test`, or `swift-driver` processes before checkout/build/test. SIGTERM, then SIGKILL holdouts. ## Why Grogu is a shared workstation — interactive Xcode use can leak processes that hold Mach services + ports, which then deadlock subsequent CI jobs. Develop run `25824607025` hung in `SPM AgentCore` for 34 min on exactly this pattern (6 xctest zombies aged 22–24h from prior interactive use). Single-runner serialization means any matching process at job-start is safely killable. ## Test plan - [ ] Merge to develop, watch the next CI run. - [ ] Step logs zero processes when clean. - [ ] Step exits 0 even when no zombies exist. - [ ] No regression on github-hosted (`runner.environment` gate verified). Closes #182 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.