Skip to content

cmux-next tests: DisplayBackdropBindingTests closes its windows (base red from #27092) - #32217

Merged
cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
lane/swift-red-display-backdrop-windows
Nov 2, 2026
Merged

cmux-bot[bot] merged 1 commit into
feat-cmux-nextfrom
lane/swift-red-display-backdrop-windows

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Base red: WindowCleanupCoverageTests.everySuiteThatOpensAWindowClosesWhatItLeaves fails in the tip Swift suite (run 41435160513, job 125243545517):

Expectation failed: (offenders → ["CmuxNextSettingsTests/DisplayBackdropBindingTests.swift:7: DisplayBackdropBindingTests"]).isEmpty → false

Cause: #27092 (per-display wallpaper rotation) added DisplayBackdropBindingTests, which makes NSWindows without .closesItsWindows and never closes them.

Fix (test-only, same pattern as #32086):

  • Each test makes its window as a local and closes it with closeAfterTest() in its own teardown, declared before the binding's defer so the binding stops first.
  • The suite takes .closesItsWindows and imports CmuxNextTestSupport.
  • CmuxNextSettingsTests links CmuxNextTestSupport (Package.swift).

Base-red-job: cmux-next / cmux-next swift test

Changelog

none

Observed / Not run

  • Ran scripts/cmux-next/prepush-gate.py: no new violations.
  • Not run: the suite itself; this PR's own cmux-next swift test is the evidence.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the Swift suite base red where DisplayBackdropBindingTests leaked NSWindows, failing WindowCleanupCoverageTests.

  • Test-only change: each test closes its windows with closeAfterTest(), declared before the binding's defer so the binding stops first.
  • The suite now takes .closesItsWindows, and CmuxNextSettingsTests links CmuxNextTestSupport to provide it.

Written for commit 27d655c. Summary will update on new commits.

View guided diff Turn on auto-fix

… red from #27092)

WindowCleanupCoverageTests fails at the tip: #27092 added
DisplayBackdropBindingTests, which makes NSWindows without
.closesItsWindows. Each test now closes the windows it makes in its own
teardown (declared before the binding's, so the binding stops first),
the suite takes the trait, and CmuxNextSettingsTests links
CmuxNextTestSupport for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-9124da39adbff74677d9
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 27d655c: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32217 -f ref=lane/swift-red-display-backdrop-windows -f platform=macos -f backend_mode=local

Shipped in:

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (claude-opus-5-5): SHIP at 27d655c

Review (subagent claude-opus-5-5): SHIP at 27d655c

Checked: all 10 NSWindow() in DisplayBackdropBindingTests.swift get a closeAfterTest() defer, each declared before the binding's stop() defer so stop runs first; no shadowed window names; the suite carries .closesItsWindows on its top-level type, which is what the WindowCleanupCoverageTests scanner looks for; CmuxNextTestSupport is already linked by another daemonSwiftSettings test target and exports closeAfterTest and the trait as public. DisplayBackdropBinding keeps no reference to the window (it is only the notification object), so the release check in pendingFolderReadDoesNotRetainBinding and the temporary binding in the last test mean the same as before.

Follow-ups: none

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@cmux-bot
cmux-bot Bot merged commit bba230b into feat-cmux-next Nov 2, 2026
161 of 175 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/swift-red-display-backdrop-windows branch November 2, 2026 12:03

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 27d655c8 Deployed Nov 2, 2026 by teamleaderleo via wait for same-key tree publisher #101013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant