Repository navigation
test: ignore NSTextView's own delegate reads during init on macOS 27 - #19189
Conversation
On macOS 27, NSTextView's initializer reads its own `delegate` four times. The probes that check cmux never touches the unsafe-unretained NSTextView.delegate counted those AppKit reads, so four tests failed with "4 is not equal to 0" on the macOS 27 minis while passing on the macOS 15/26 runners. Reset each probe's counter after construction so only reads made by the code under test are counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The tests exclude AppKit’s initialization reads while continuing to check reads made by the code under test. No merge-blocking risk was identified. Pre-merge checks |
|
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. |
|
Merge receipt for |
Summary
Four app-host tests fail on every macOS 27.0.1 mini and pass on the macOS 15/26 Blacksmith runners:
CmuxWebViewKeyEquivalentTests/testWindowFirstResponderGuardAvoidsTextViewDelegateLookupForWebViewResolutionCmuxWebViewKeyEquivalentTests/testWindowFirstResponderGuardResolvesTrackedWebViewForFieldEditorResponderCommandPaletteFocusStealerClassificationTests/testDoesNotReadTextViewDelegateForFocusStealerClassificationGhosttyResponderResolutionTests/testDoesNotReadTextViewDelegateForGhosttyResponderResolutionAll four fail with
XCTAssertEqual failed: ("4") is not equal to ("0"). The Ghostty and command-palette tests only construct the probe text view and call one cmux helper, so the four reads come from NSTextView's own initializer on macOS 27, not from cmux. That is AppKit reading its own property, which the unsafe-unretained rule does not cover.Each probe now resets its counter right after construction, so it counts only reads made by the code under test. No product code changes.
Evidence
Recent
ci.ymlruns (since 2026-10-10 20:14Z): each test failed 0/4 on the 27 minis and passed 10/10 (CmuxWebView) and 5-6/6 (others) on blacksmith macos-26, plus 2/2 on blacksmith macos-15.Changelog
none
Test plan
ci.ymlruns, and passed on these same minis on 2026-10-07 before the upgrade (run 37700242931).RemoteTmuxMirrorSplitRoutingTests.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes four app-host tests that failed on macOS 27 because NSTextView's initializer reads its own
delegatefour times, which the test probes counted as cmux reads.resetDelegateReadCount()to eachNSTextViewprobe, called right after construction so only reads made by the code under test are counted.Written for commit e73693d. Summary will update on new commits.
Note
Low Risk
Test-only changes to counter reset timing; no app behavior or security-sensitive paths modified.
Overview
Fixes four app-host tests that fail on macOS 27 because
NSTextView’s initializer readsdelegateduring construction, so probe subclasses were reporting 4 reads before any cmux code ran.Adds
resetDelegateReadCount()on the delegate-tracking probeNSTextViewtypes inBrowserConfigTests,ShortcutAndCommandPaletteTests, andTerminalAndGhosttyTests, and calls it immediately after creating each probe so assertions still enforce zero delegate reads from first-responder / focus-stealer / Ghostty resolution paths. No production code changes.Reviewed by Cursor Bugbot for commit 5426df7. Bugbot is set up for automated code reviews on this repo. Configure here.