Repository navigation
Fix the flaky crash-report case in swift-test-summary.test.sh - #23129
Conversation
…st.sh The crash case wrote its fresh .ips report and then started the wrapper, which records started_at in whole seconds and skips reports older than it. A write at second X.9 and a start at X+1 read the fresh report as from before the run, so the case failed with "no crash ::error line". Set the report's mtime 60 seconds ahead so it always counts as written during the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2c-88e4-7fc2-b58e-9a55abdaced8&host=cosmic-gray
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
|
This comment has been minimized.
This comment has been minimized.
|
Owned by projects-08 on cosmic-gray · session |
|
Review (claude-review-subagent): CHANGES at c55857b The change is correct as far as it goes, but it does not fix the failure it cites.
Requested:
|
|
Bead |
On PR #23076's Linux CI (job 119082777090) the sampler's /tmp/swift-test-log.* was gone before its report step read it, so the crash case printed no crash ::error line. The test now points TMPDIR at its own temp dir, so nothing else running beside it can touch the log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2c-88e4-7fc2-b58e-9a55abdaced8&host=cosmic-gray
|
Review (claude-review-subagent): SHIP at 9093e36
|
|
Shipped in:
|
The "test helper dies on a signal" case in
scripts/cmux-next/tests/swift-test-summary.test.shflakes in two ways. This PR fixes both in the test only; the sampler script is unchanged.awk: fatal: cannot open file /tmp/swift-test-log.RQ7ALWandsed: can't readthe same file: the sampler'smktemplog in the shared/tmpwas gone before the report step read it. Without the log it never saw the signal line, so it printed no crash error at all. The check runs beside many others underscripts/ci/run-checks-concurrently.sh. I did not find what deletes the file. The test now gives every sampler runTMPDIR=$TMP/tmp, so the log lives in the test's own temp dir.started_at=$(date +%s), andips-crash-summary.pyskips reports with mtime below it. A report written at second X.9 with a run start at X+1 counts as from before the run, and the test fails with "the crash error does not name the crashed thread's test frame". The test now sets the fresh report's mtime 60 s ahead withpython3 os.utime; nothing in the test sorts by mtime or bounds it from above. The old-reporttouch -t 202001010000line is unchanged.Review (claude-review-subagent) at c55857b found that change 2 alone could not cause the CI failure above; change 1 is the response.
Changelog
none
Observed / Not run
/tmpfrom the path; whether it fully stops the CI flake shows only on CI over time.python3 scripts/cmux-next/prepush-gate.pyreported no new violations.Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the flaky "test helper dies on a signal" case in
scripts/cmux-next/tests/swift-test-summary.test.shwhere a fresh crash report was sometimes skipped as too old.The run wrapper records
started_atin whole seconds; a report written at second X.9 followed by a start at X+1 is read as predating the run, soips-crash-summary.pyskips it. The test now sets the report's mtime 60 seconds ahead viapython3 os.utime, leaving the script's skip rule unchanged.python3is used instead ofdate -v/date -dsince the test runs on both macOS and Linux.Written for commit c55857b. Summary will update on new commits.