ci(cmux-next): a crashed test helper names itself instead of going undiagnosed
A swift test run that died on signal 6 could not be attributed. Two independent reasons, both fixed here.
The backtracer was off
Swift's backtracer prints a symbolicated stack to stderr in-process on a fatal error, but enable=tty is its default — so under Actions it was off, and a crash left only its one-line message with no frames. Run 40330489336 died with Attempted to read an unowned reference and nothing to attribute it to; the cause (#25530) stayed unattributed from Oct 22 until a stack finally appeared.
SWIFT_BACKTRACE now enables it, respecting an existing value:
enable=yes,interactive=no,timeout=0s,symbolicate=full,color=no,threads=crashed
symbolicate=full, not the symbolicate=off the xcodebuild jobs use: an unsymbolicated stack answers none of the question, and this costs only on a run that has already crashed. interactive=no and timeout=0s so it never waits for a keypress that cannot come in CI; color=no so the log stays readable.
The crash reports were looked for in the wrong place
A test helper on a CI Mac leaves its report in the system /Library/Logs/DiagnosticReports, not the $HOME one a login session gets. Searching $HOME alone found nothing for a run that had plainly died, so the wrapper reported no crash report for a crash. ips-crash-summary.py now takes a colon-separated list and searches both, system first.
Silence was the real defect
The script printed nothing when it found nothing, so these two facts were indistinguishable:
- there is no crash report from this run
- I looked in the wrong directory
That ambiguity is what made the signal 6 undiagnosable, so finding nothing now reports what it looked at: every directory, whether it exists, how many reports it holds, and how many were skipped as older than the run or as another process's. On the failing run that is 316 reports, all older than the run — which is itself the finding, and says ReportCrash never wrote one rather than that the search missed it.
Red, then green
The behavioural test is committed with the fix and fails without it. Measured on base's scripts with this PR's test file:
a report in the second directory was not found
got:
RED EXIT: 1
| tree | scripts/cmux-next/tests/ips-crash-summary.test.sh |
|---|---|
base 3fa409e885c + this test file | exit 1 — a report in the second directory was not found |
| this PR | exit 0 — ips-crash-summary.test.sh: ok |
The test also asserts the SWIFT_BACKTRACE line is present and that it evals to the settings above, so a later edit that drops symbolicate=full or re-enables interactivity fails rather than quietly going back to unattributable crashes.
Changelog
none
No capture: CI diagnostics and their tests; no app surface and nothing to show.
Scope
Split out of #25391 under the ~800-line rule. The other two pieces are separate PRs: the reported-vs-ran gate (#25856) and the exit(0) cause.
This diagnosis belongs with the report-directory fix rather than in either of those, because the two halves are the same bug — a crash that names itself in the log, and a crash report found where it actually lands. It touches the same wrapper as #25856, so whichever lands second takes a rebase.
Observed / Not run
Observed: both rows of the table above, run locally in isolated trees extracted from each commit; prepush-gate.py --base --head reporting no new violations for this exact commit; and the wrapper split verified loss-free by recombining both halves of its diff and comparing against #25391's file (identical).
Not run: a real crash on a CI Mac with this change in place — the system report directory and ReportCrash's timing cannot be reproduced on Linux, which is why the test drives the script with fixture .ips files in two directories rather than claiming an end-to-end capture.
🤖 Generated with Claude Code
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.