ci: keep interrupted app-host test runs from reporting success
Summary
An app-host run can time out, restart Xcode's test host, and finish with only a passing subset. The existing exit-65 fallback accepts that log if its XCTest summaries report zero unexpected failures. On #13117, shard 1 was green despite four five-minute tmux input timeouts; its completed log is accepted by the old parser.
Reject explicit Swift Testing time-limit issues and Xcode's unexpected-exit/crash/timeout restart records before considering the legacy expected-XCTest-failure fallback. Later passing summaries cannot erase the interrupted run. The diagnostic reports incomplete execution; it does not attribute the failure to the candidate PR. Matching is limited to runner records, including ANSI-colored or GitHub-timestamped logs, so ordinary application timeout messages and passing test names do not trigger it.
This is a narrow addition to the current gate. It preserves existing expected-XCTest-failure handling and complements #12173's broader result-classification changes; it does not replace that PR or solve the underlying test fixture failure. #13173 separately bounds the tmux test's command waits.
Validation
- Regression commit first: five assertions fail, including a replay through the real
xcodebuild_noninteractive.pywrapper and classifier CLI (wrapper exit 65, old classifier exit 0). - After the fix, all 21 classifier tests pass. Coverage includes timeout-only, restart-only, timeout/restart/final-pass, colored/timestamped output, and benign application timeout messages.
- Replayed the actual completed #13117 shard-1 log: old parser accepts 97 XCTest summaries; fixed parser rejects the first interrupted-run record.
- The pending #12173 result wrapper paired with this parser rejects the faithful replay with exit 1.
- CI change-area tests, focused determinism check, and
git diff --checkpass. No Mac builds, reruns, or job cancellations were used for this verification.
Related: #13095.
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
App-host test runs that time out, restart the test host, and finish with only a passing subset now fail CI instead of being accepted as green.
- Rejects Swift Testing time-limit issues and Xcode unexpected-exit/crash/timeout restart records before the legacy expected-XCTest-failure fallback.
- Matches only runner records, so ordinary app timeout logs and passing test names that mention timeout don't trigger rejection.
- Preserves expected-XCTest-failure handling and doesn't address the underlying fixture failure.
- Replays the regression through the real wrapper and classifier CLI with bounded subprocesses, so verification no longer relies on a hard timeout.
Summary by CodeRabbit
- Bug Fixes
- Incomplete app-host test runs caused by timeouts, crashes, or restarts are now rejected, even when a later subset of tests passes.
- Timeout-related wording in successful test names or application logs is no longer incorrectly treated as a failed run.
- Improved detection remains effective with colored output and through the command-line validation flow.
- Test results now more accurately reflect whether the complete run finished successfully.