Skip to content

carry of #27257: close batch B1 test windows - #28091

Merged
teamleaderleo merged 39 commits into
feat-cmux-nextfrom
lane/carry-27257-pinned-page-repair-d
Oct 31, 2026
Merged

teamleaderleo merged 39 commits into
feat-cmux-nextfrom
lane/carry-27257-pinned-page-repair-d

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Carry of #27257: cmux-next: close batch B1 test windows

Original purpose from #27257: close the remaining Swift test windows and panels after each test, including cleanup for Page Info, Extensions Menu, Host Pressure, Native Popup, and browser retirement panels.

This carry preserves the original commits and repairs the blocked teardown ownership issue. AppTestDaemonOwner.reap now requires a verified kernel process identity before invoking graceful shutdown, so an unverified endpoint cannot send shutdown to a replacement daemon. The regression test asserts the shutdown closure is not called for an unverified live process. Earlier carried commits retain in-flight ensure tasks through teardown and preserve state when exit ownership is unconfirmed.

Original PR: #27257

Validation: git diff --check; macOS test suite requires fleet execution.

Agent session: agent session

No capture: no visible change; this carry changes test teardown and hidden panel cleanup only.

teamleaderleo and others added 21 commits October 28, 2026 22:13
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
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
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
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
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 30, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)/
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)
View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)/
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): BLOCK at f6eaa38

BLOCK

  1. Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/PinnedPageTests.swift:158 — process was already unwrapped by the guard at line 143, so the second guard let process attempts conditional binding on a non-optional value and fails Swift compilation. Use the existing value directly.

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
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base 8b227f7 to this head): SHIP at ee5d543.

No P1/P2 findings.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
#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
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base 8b227f7 to this head): SHIP at ce0765c.

No P1/P2 findings.

…27257-pinned-page-repair-d

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextDaemon/Connection/DaemonConnection.swift
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base 98b8887 to this head): SHIP at 01667f3.

No P1/P2 findings.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 08:36 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 08:36 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 08:44 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base ea29e41 to this head): SHIP at 8e92af9.

No P1/P2 findings.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base 2cfe430 to this head): SHIP at d309198.

No P1/P2 findings.

@teamleaderleo
teamleaderleo merged commit 39c7746 into feat-cmux-next Oct 31, 2026
153 of 158 checks passed
@teamleaderleo
teamleaderleo deleted the lane/carry-27257-pinned-page-repair-d branch October 31, 2026 12:07

This branch was previously deployed

1 inactive deployment
ci-routing-agent — d3091988 Deployed Oct 31, 2026 by teamleaderleo via wait for same-key tree publisher #89595
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