Repository navigation
Harden CI against Swift crash backtrace hangs - #4440
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6d5188c to
a6c82b9
Compare
Greptile SummaryThis PR fixes a CI timeout issue by replacing the undocumented
Confidence Score: 5/5Safe to merge — all four files receive the same well-scoped environment variable tweak with no logic changes. The change replaces an undocumented SWIFT_BACKTRACE value with the supported No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[XCTest run starts] --> B{App-host process crashes?}
B -- No --> C[Tests complete normally]
B -- Yes --> D{SWIFT_BACKTRACE setting}
D -- "interactive=no,color=no (old, undocumented)" --> E[Crash backtracer may still prompt or hang indefinitely]
E --> F[CI job times out after 45 min]
D -- "enable=no (new, documented)" --> G[Crash catcher disabled entirely]
G --> H[xcodebuild exits promptly]
H --> I[CI job continues / fails fast]
Reviews (3): Last reviewed commit: "Harden CI against Swift crash backtrace ..." | Re-trigger Greptile |
📝 WalkthroughWalkthroughChange SWIFT_BACKTRACE from ChangesSwift Crash Backtrace Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 17✅ Passed checks (17 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 156-158: The SWIFT_BACKTRACE environment variable is set with
undocumented parameters; change the value of SWIFT_BACKTRACE (used in the CI
workflow) to only include the supported option "enable=no" instead of
"enable=no,interactive=no,timeout=0s,color=no"; remove the unsupported keys
(interactive, timeout, color) and, if you need other formatting, use documented
parameters such as preset, sanitize, limit, or cache per Swift docs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 098ec221-2f98-4a5c-80f3-d8758bfa8ac1
📒 Files selected for processing (2)
.github/workflows/ci.ymlcmux.xcodeproj/xcshareddata/xcschemes/cmux-unit.xcscheme
a6c82b9 to
326c5df
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmux.xcodeproj/xcshareddata/xcschemes/cmux-unit.xcscheme`:
- Line 23: Add the SWIFT_BACKTRACE environment variable to the cmux scheme's
TestAction so UI tests cannot hang on backtracer; specifically, in the
cmux-unit.xcscheme TestAction add an EnvironmentVariable entry with
key="SWIFT_BACKTRACE", value="enable=no" and isEnabled="YES" (matching the
existing TestAction in the cmux-unit scheme and the tests job setting) to ensure
consistent protection across test schemes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6620b098-b390-45dd-a94d-655ab1018c25
📒 Files selected for processing (2)
.github/workflows/ci.ymlcmux.xcodeproj/xcshareddata/xcschemes/cmux-unit.xcscheme
326c5df to
76799fe
Compare
Summary
SWIFT_BACKTRACE=enable=nosettingcmux,cmux-ci,cmux-unit) aligned so app-hosted XCTest/UI test runs inherit the same crash-backtrace guardContext
PR #4437's visible
testsjob timed out after XCTest restarted fromMarkdownPanelTestscrashes and the Swift crash backtracer prompt remained in the log. The previousinteractive=nosetting was not a documented Swift backtrace option, so this uses the supportedenable=noswitch to disable crash catching entirely.Validation
git diff --checkxmllint --noout cmux.xcodeproj/xcshareddata/xcschemes/cmux.xcscheme cmux.xcodeproj/xcshareddata/xcschemes/cmux-ci.xcscheme cmux.xcodeproj/xcshareddata/xcschemes/cmux-unit.xcschemeI did not run local tests per repository policy; CI must validate this PR.
Note
Low Risk
Low risk: CI/scheme-only configuration change that just alters Swift crash backtrace behavior during tests, with no production code impact.
Overview
Hardens macOS CI test runs against Swift crash-backtrace hangs by switching
SWIFT_BACKTRACEto the documentedenable=nosetting in thetestsGitHub Actions job.Aligns Xcode test schemes (
cmux-unit,cmux-ci, andcmux) to set the same environment variable duringTestAction, ensuring app-hosted XCTest runs inherit the guard consistently.Reviewed by Cursor Bugbot for commit 76799fe. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit