Fix window frame repair and restore strict app-host CI

Merged
AU
2mo ago
+7902-3755

Display changes could strand cmux windows off-screen or leave zoomed windows smaller than the available display. Activation, restoration, and display changes now share presentation-aware frame repair. Untrusted intermediate display snapshots preserve the current monitor; native fullscreen and Split View remain owned by AppKit except for guarded full-width topology repair.

Zoom intent survives a titlebar click and automatic display repositioning. A real move, resize, native tile, or remembered-frame restore clears it.

This PR also makes app-host CI reject assertion failures, unfinished Swift Testing runs, and zero-test results. That exposed stale fixtures and runtime failures that the previous exit-65 fallback had masked. The repairs cover:

  • SSH control-option precedence, authentication stderr and retry handling, persistent versus ordinary-shell hangup behavior, and concurrent tmux lock creation.
  • Windowless session persistence, browser focus ownership, native divider routing, tmux layout recovery, and removed-pane notification cleanup.
  • Cloud workspace receipts across stale updates, tunnel revocation/start ordering, and shared agent-validation/watch ownership.
  • Test setup for native view readiness, current agent identity and RPC contracts, isolated settings and sockets, and asynchronous event delivery.

Cloud regressions were committed before their fixes. CI reproduced loss of a pending workspace after stale metadata. An exact-source fleet probe reproduced the queued-up/revocation race before the fix; all 27 coordinator tests passed afterward.

The CI follow-up updates Cloud failure assertions to the reserved pane, supplies revision-bound automatic naming contexts, preserves daemon title provenance through restore, separates SSH authentication from PTY attachment, controls the fallback clock in address-reuse coverage, and counts group anchors in sidebar scale coverage. Dock browser focus now uses the existing owning-window reveal path and fails before changing selection when that window is unavailable. Key-window tests install the real observer on their own delegate.

Validation: Xcode project normalization, wiring for all 950 test files, discovery of 2,810 shard selectors, Swift syntax checks, and whitespace checks passed. The first focused hosted build caught a leftover fixture-helper call; that compile error is corrected. Full and focused hosted validation is pending on df400ddc49f136801b2f96ae2f3702d43ac750e0. CI is not green: terminal focus recovery, tmux output geometry, sidebar invalidation, and four WebKit lifecycle/bridge/inspector failures still need runtime diagnosis. No new dogfood build is verified; fleet build acquisition was unavailable.

Localization audit: these repairs introduce no new user-facing UI strings; existing localized messages are retained.

Physical external-monitor disconnect/reconnect and native Split View were not exercised during this CI repair run. The isolated tagged build supports follow-up dogfood.

Closes #2824. References #11822 and #11923.


[!NOTE]
Medium Risk
Touches window persistence, SSH/tunnel lifecycle, session autosave, and agent hooks alongside CI behavior changes; regressions could affect display reconnect, remote workspaces, or fleet test signal.

Overview
Main window geometry now uses a shared MainWindowFrameReconciler with presentation modes (ordinary, zoomed, full-width fullscreen on topology change only). Zoom intent is remembered across inactive/reconnect glitches and cleared on real user placement; CI adds focused MainWindowZoomPlacementTests.

App-host CI no longer treats exit 65 plus classifier success as green: non-zero xcodebuild status fails the shard, batches run to completion with combined failure status, and parallel testing is disabled for unit batches. Ubuntu jobs configure APT over HTTPS with a validation test.

CLI / remote shells: vm/cloud dev|layout|env defer socket connect until send; SSH Control* merging respects per-key explicit -o vs host config; persistent PTY paths opt into hangup protection while normal SSH/Mosh shells use plain exec. Agent-hook fixes cover Grok ambient dispatch, Codex monitor stack depth, legacy stop/journal idle repair, Hermes IDs in extra, and credential redaction ordering.

App behavior: Browser portal owns sidebar divider drags via handoff; remote git metadata clears on first trusted remote promotion; windowless route freeze/close uses route identity; session autosave fingerprint skips lifecycle revision for live-only orphans; cloud tunnel revocation/start ordering and link-wait races; tmux sizing parity and fork watch install deduping; dock portal reconcile and restored-agent title boundaries; keyboard shortcut conflict ordering for global hotkey.

CmuxWindowing adds MainWindowFrameFitMode and repairedFrame; CmuxFoundation tightens SSH auth FIFO fd cleanup and connection-sharing tests.

Reviewed by Cursor Bugbot for commit e65a24e9df34e0f958cd889311f2f7968233a331. Bugbot is set up for automated code reviews on this repo. Configure here.