Repository navigation
cmux-next: close batch B1 test windows - #27257
teamleaderleo wants to merge 19 commits into
Conversation
Leo (2026-10-28), on Swift suites that leave windows open for the suites after them: "But why do you guys not just clean up after yourselves, or at least do your best to?" Each suite in this batch now closes every window its tests open, in the test's own teardown, and carries `.closesItsWindows` so a new leak fails by name: - teardowns that only ordered a window out close it; - tests that make browser pages release them (or close the chrome's popup panels), and tests that open the palette close its panel; - background mode's menu bar item goes when the launch test shuts down. Product code never closed three kinds of panel, only ordered them out, so they stayed in the app's window list while anything held their owner: - a window's overlay host panel, when the window closed (WindowOverlayHost); - a browser page's Page Info and Extensions panels, when its tab closed (BrowserEntry.close now calls BrowserChromeView.closePopupPanels); - the Mac screen approval prompt's panel, whose content holds the prompt (now closed and dropped when the prompt hides; the next request makes one). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
…heir panels Leo (2026-10-28): "But why do you guys not just clean up after yourselves, or at least do your best to?" - WindowOverlayHost keeps a closed window's torn-down host registered, so a late `host(for:)` for that window returns it instead of making a fresh panel nothing closes; a window shown again gets a new host, and `existingHost` still answers nil once torn down. - NativePopupHost.closePanel closes a popup's panel for good; Page Info, the Extensions bubble and the host pressure popover (when its indicator leaves its window) use it. - DebugPaletteCaptureTests and HomeOpenFocusesComposerTests drop the trait for now: the first leaves only AppKit's own TUINSWindow, the second the Chief Settings popover's panel, which its owner never closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
…pKit-only suites keep the trait Leo: "But why do you guys not just clean up after yourselves, or at least do your best to?" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
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)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: green on the base 1674720; do not merge until green; see lane-rules |
|
Bead |
|
Found 7 test failures on Blacksmith runners: Failures
|
|
Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 29fcf05 BLOCK
Reviewed exact head Source-only verdict. macOS runtime and full census remain pending; no readiness or merge approval. |
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. |
|
Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 29f279a BLOCK —
Read the full cumulative diff and lifecycle dependencies; all 31 changed-file hashes match. This is a source-only verdict: no native execution or runtime census establishes readiness or merge approval. |
|
Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at 71c6f3a SHIP
Source verdict only for Coordinator must request |
|
Review (codex gpt-6-astra high, next-review): SHIP at a36713a No blocking findings. Review covered the supplied diff and files. Additional repository reads were blocked by environment policy; macOS tests were not run. |
Base now has #27239 squashed. Conflicts keep this branch's cleanup: PageInfoController.closePanel retires and closes its windows, BackgroundAccessoryPolicyTests stops through AppTestDaemonOwner, DaemonClosedBrowserPageTests releases both tabs, and BrowserProfileNewTabMenuTests / DebugPaletteCaptureTests keep their own panel close (base's second close is dropped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0cf32b32a03b27dcdf4d
Record verified process identities and use the existing audit-token fallback when a shutdown handshake fails. Preserve state directories until every owned daemon exit is confirmed, and bound moved-tab synchronization and cancellation. Validation: cmux-next prepush gate and diff check pass; native Swift compilation/runtime unavailable in this Linux lane. Fleet reruns and exact-head review required. Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11
…' into lane/window-leak-suites-B1-codex
|
take it |
|
Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at c26c33d BLOCK
|
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. |
|
Fresh-home launch of
|
|
Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at b14c3d1 BLOCK
|
|
Superseded by #28093, a backlog-drain carry that keeps this PR's commits and their authorship and repairs its BLOCK findings. Closing this one in its favour. |
|
Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at 2a72ab7 BLOCK
|
* cmux-next tests: batch B1 suites close the windows they open Leo (2026-10-28), on Swift suites that leave windows open for the suites after them: "But why do you guys not just clean up after yourselves, or at least do your best to?" Each suite in this batch now closes every window its tests open, in the test's own teardown, and carries `.closesItsWindows` so a new leak fails by name: - teardowns that only ordered a window out close it; - tests that make browser pages release them (or close the chrome's popup panels), and tests that open the palette close its panel; - background mode's menu bar item goes when the launch test shuts down. Product code never closed three kinds of panel, only ordered them out, so they stayed in the app's window list while anything held their owner: - a window's overlay host panel, when the window closed (WindowOverlayHost); - a browser page's Page Info and Extensions panels, when its tab closed (BrowserEntry.close now calls BrowserChromeView.closePopupPanels); - the Mac screen approval prompt's panel, whose content holds the prompt (now closed and dropped when the prompt hides; the next request makes one). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3 * cmux-next: a closed window makes no new overlay panel; popups close their panels Leo (2026-10-28): "But why do you guys not just clean up after yourselves, or at least do your best to?" - WindowOverlayHost keeps a closed window's torn-down host registered, so a late `host(for:)` for that window returns it instead of making a fresh panel nothing closes; a window shown again gets a new host, and `existingHost` still answers nil once torn down. - NativePopupHost.closePanel closes a popup's panel for good; Page Info, the Extensions bubble and the host pressure popover (when its indicator leaves its window) use it. - DebugPaletteCaptureTests and HomeOpenFocusesComposerTests drop the trait for now: the first leaves only AppKit's own TUINSWindow, the second the Chief Settings popover's panel, which its owner never closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3 * cmux-next tests: Home's Chief Settings panel closes with its test; AppKit-only suites keep the trait Leo: "But why do you guys not just clean up after yourselves, or at least do your best to?" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3 * Close browser profile test pages and palette on early failure Agent-Session: https://cmux.com/deeplink/agent?id=aid-c5f7357864b9736bff29 * Make window test cleanup cover failed setup and all cached pages Agent-Session: https://cmux.com/deeplink/agent?id=aid-c5f7357864b9736bff29 * fix(tests): drain owned daemon startup and settle approval panels Agent-Session: https://cmux.com/deeplink/agent?id=aid-c5f7357864b9736bff29 * fix(lifecycle): drain discarded startups and retire page info windows Agent-Session: https://cmux.com/deeplink/agent?id=aid-c5f7357864b9736bff29 * fix(tests): avoid throwing key path in browser retirement assertion Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): preserve launcher endpoint reuse during teardown Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): synchronize moved tab metadata before assertions Wait for the destination daemon store through its existing sync barrier before inspecting moved tabs. Keep metadata assertions unchanged so a failed rename still fails the test. Validation: prepush gate and diff check pass. Native Swift syntax is unavailable in this Linux lane; CrossMachine/Stash fleet rerun required. Prior fleet runs 0e700eba and da960326 failed the name assertion before this barrier. Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): finish fresh launch teardown on cancellation Propagate cancellation from the presentation wait, capture its error, and join owned daemon shutdown before rethrowing. Register window and directory cleanup before startup so their lifetime ends in order. Validation: static prepush and diff checks pass. Swift syntax/native execution unavailable in the Linux lane; fleet regression and cumulative review requested. Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): retain owned daemon cleanup on handshake failure Record verified process identities and use the existing audit-token fallback when a shutdown handshake fails. Preserve state directories until every owned daemon exit is confirmed, and bound moved-tab synchronization and cancellation. Validation: cmux-next prepush gate and diff check pass; native Swift compilation/runtime unavailable in this Linux lane. Fleet reruns and exact-head review required. Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): avoid region checker error in barrier wait Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): observe daemon exit by kernel identity Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * test: preserve unverified daemon ownership after shutdown Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): retain cancelled daemon ensures through teardown Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(tests): guard graceful shutdown by daemon ownership Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * test: keep unverified daemon shutdown-free Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * fix(tests): reuse verified daemon identity Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * fix(tests): keep waiting when daemon identity is unreadable Agent-Session: https://cmux.com/deeplink/agent?id=aid-66d4d9063f5f1bfabf11 * fix(daemon): await initial connect during close Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * fix(daemon): cancel startup connection on teardown Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Fix cancellation of prestarted daemon connection Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Document cancellation cleanup ownership Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Document prestart cancellation ownership Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Add deterministic initial daemon task close regression Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Guard initial connect after concurrent close Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Allow reconnect attempts from waiting phase Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Cover reconnect attempts from waiting state Agent-Session: https://cmux.com/deeplink/agent?id=aid-e042f94599ebd6e0409f * Fix compile errors in the startup-close carry connectOnce used a closure literal as a guard condition, which Swift does not parse; move the phase check into an acceptsNewAttempt property. The reconnect test's raw string opened with #""" and closed with """, so it never terminated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-159afad10a5ab45ea16c * Port the test daemon owner to AcpmuxDaemonStop #28083 removed AcpmuxUnresponsiveWatch from base and kept its process identity check in AcpmuxDaemonStop (Daemon, kernelProcess, signal) with no SIGKILL path. The test owner and its tests now read identities from AcpmuxDaemonStop and keep their own bounded TERM-then-KILL teardown, built on AcpmuxDaemonStop.signal so a reused pid is still never signalled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-159afad10a5ab45ea16c --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)

Batch B1 closes the remaining Swift test windows and panels that were still kept alive after each test. This follows Leo's instruction: "But why do you guys not just clean up after yourselves, or at least do your best to?"
The suites close their own windows and popup panels in teardown, while the product-side cleanup keeps Page Info, Extensions Menu, Host Pressure, Native Popup, and browser retirement panels from surviving a window close. This branch is stacked after the merged overlay-host fix.
No capture: no visible change; these changes only close hidden panels and test windows after their owner closes.
Agent session: agent session