fix(apple-runner): guard XCTest build cleanup paths
Merged
TH
3h ago+125+125+012345678901234567890123456789-56-56-01234567890123456789
Summary
Use the canonical guarded XCTest cleaner for builds and manual cleanup. Refuse unsafe or symlinked overrides and preserve sibling caches. Print recovery guidance that distinguishes variable-requested cleanup from explicit cleanup, forced rebuilds and cache repair.
Ten files change. Review follow-ups expanded documentation/tests and route cleanup helpers through the existing bound runner facade, removing the private source import and project-root callback. Fixes #4371; part of #4368.
Validation
Head: 0f2338df89eb790c02aadd7bfac34950d7599a7e.
- All 42 runnable exact-head affected checks passed; exactCommit=true, checkoutChanged=false. The full 67-check selection retains 25 owned skips. Related: 1,058; provider: 257 passed; unit: 17,830 passed/one unidentified skip. Receipt and obligations.
- Focused: 18 build fixtures, 20 guard cases, one default-path guard and eight cleanup smoke cases passed; full formatting passed. Independent Luna follow-up review found no concrete regressions.
- Isolated base reproduced unsafe override/stale output. Intermediate symlink regressions failed two/passed 16, then passed 18 with containment. Safe dot-prefixed names reproduced one failure before their fix. Proof.
- Actual iOS Simulator build succeeded at 71957957be with an owned override and removed sentinel. This is historical evidence, not a native/device run at this head.
- Current CI: 16 successful checks and one skipped cache lane; Android, Apple and Linux smoke passed. Apex approves; known review threads are resolved. No merge is authorized.