Repository navigation
test: keep CmuxTerminal pasteboard tests off the cooperative pool - #15006
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughPasteboard service tests now use uniquely named standard and selection pasteboards instead of the host pasteboards. The test suites also add main-actor isolation where specified. ChangesPasteboard Test Isolation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The tests now use isolated pasteboards, and no supported change-related failure remains. Mergeability risk is minimal. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The tests now use separate pasteboards instead of the host clipboard, with cleanup tied to each test. No production behavior change or new security concern was identified, though security coverage is not complete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches 💡 1📝 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 |
CmuxTerminal's package tests could deadlock for good (53.6 minutes until the job timeout in run 36314061362) or freeze for about 6 s, which failed remoteOutputDoesNotBlockTheMainActorOnNativeParser. Every NSPasteboard call is a synchronous request to the pasteboard server. The pasteboard suites ran in parallel on Swift Testing's cooperative pool, one thread per CPU. When every pool thread is waiting on the pasteboard server at once, the replies never arrive and the process stops. A standalone program with 14 concurrent tasks that each create a named pasteboard deadlocks on a 14-core mini; 13 tasks finish. The pasteboard suites now run on the main actor, like the app's pasteboard callers, so they no longer hold pool threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7d17d13 to
12ff43d
Compare
|
@coderabbitai review |
|
|
Merge receipt for |
648d5c1 Add a Paste Last Screenshot action with an unbound shortcut (manaflow-ai#14955) ff61677 ci: avoid partial blobs in catch-up merges (manaflow-ai#15023) 4d0d112 ci: retry transient catch-up GraphQL failures (manaflow-ai#15021) 212e808 ci: attribution scores a lone suspect and reports app-host crashes apart (manaflow-ai#14952) 4cabdf4 test: settle the window before measuring the unread sidebar-row invalidation (manaflow-ai#14568) 12ec99b Add a release-media capture tool for changelog screenshots and clips (manaflow-ai#15010) ee2cda0 Backfill Unreleased changelog and draft next release cards (manaflow-ai#14999) be4adf8 Show a brief notice when Cmd+V fails on an oversized image or a timeout (manaflow-ai#14953) 23d22d7 ci: an owned pool the run starts on now beats an earlier one it queues on (manaflow-ai#14993) 05d0190 ci: catch-up posts once per head, says less, and merges inserted declarations (manaflow-ai#15018) 4ee4b21 ci: fail stalled Swift package tests instead of waiting out the job timeout (manaflow-ai#14997) 9ce512a merge-main: run local guards only when asked (manaflow-ai#15016) d60108a ci: clear test-e2e's fixed DerivedData with clear-dirs.sh (manaflow-ai#14994) 1d7895e ci: run the shell and CLI no-socket lanes in parallel (manaflow-ai#14990) 6e7d25f Honor macOS Differentiate Without Color, Increase Contrast and Reduce Transparency (manaflow-ai#14991) 966b355 Stop interrupting focused work: sidebar jumps, Computer Use focus steal, quit dialog on logout (manaflow-ai#14961) e1f1cb2 Strip control characters from feedback attachment filenames (manaflow-ai#14783) 0758c9f test: find the onboarding window the test presented, not a leftover (manaflow-ai#15015) b35c540 fix(spm): resolve GhosttyKit/GhosttyRuntimeTestStubs target name collisions (manaflow-ai#10569) ef33bed Map .purs artifacts to the Haskell highlight.js grammar (manaflow-ai#14202) e2a167a Highlight Elixir and Erlang files in the file editor (manaflow-ai#13732) 972c449 fix: wrap Linux browser download card label (manaflow-ai#11157) f563884 Add Aside to browser data import detection (manaflow-ai#13379) 091d0ea Add cmux send --paste and hint at it for large multi-line sends (manaflow-ai#14937) 3ffcdbb test(ios): keep folder-tap stat tests off the real 2 s deadline (manaflow-ai#15017) 68d3936 test: keep CmuxTerminal pasteboard tests off the cooperative pool (manaflow-ai#15006)
Summary
swift test --package-path Packages/macOS/CmuxTerminalcould deadlock for good. In run 36314061362 it sat silent for 53.6 minutes until the job timeout. More often it froze for about 6 s, which is what failsremoteOutputDoesNotBlockTheMainActorOnNativeParser(its 5 s deadline expires while everything is frozen, as on #14876).Every
NSPasteboardcall is a synchronous XPC request to the pasteboard server. The pasteboard suites ran in parallel on Swift Testing's cooperative pool, which has one thread per CPU. When every pool thread is waiting on the pasteboard server at once, the replies never arrive and the whole test process stops. A stack sample of the hung helper showed exactly that: 15 threads in_CFPBXPCSendMessageWithReplySyncunderCFPasteboardCreate/CFPasteboardBeginGeneration, and nothing else running. A standalone program that starts N concurrent tasks, each creating a named pasteboard, reproduces it on a 14-core mini: 13 tasks finish in 13 ms, 14 or more deadlock every time. The 6 s freezes are the same thing with one pool thread held by a test's 5 s C-stub wait, which frees the pool when the stub times out.The six pasteboard suites now run on the main actor, where the app's pasteboard callers also run, so they no longer hold pool threads. Test code only.
Testing
On cmux7s (14 cores),
swift test --package-path Packages/macOS/CmuxTerminal:--skip-build, about 1 run in 4 froze for 5.9 s and failedremoteOutputDoesNotBlockTheMainActorOnNativeParser. A variant that doubled the pasteboard calls per test without moving the suites hung 3 of 4 runs.macos / swift-package-testsran CmuxTerminal on a fleet mini and passed.#14997 makes a hang like this fail after 120 s with the stuck tests named, instead of after 60 minutes.
Changelog
none
🤖 Generated with Claude Code