base red: the window registry (pure membership model) moves to CmuxNextLayout (app_lines: #28049 +99, #27919 +16, #27825 +12)
Summary
Base red, priority zero (TIP RED 1881 follow-up). The tip's app_lines row is red over the watcher's range (arch-ratchet.py --base 30806df8b37d). The repo rule, run on each commit alone (--base <c>^ --head <c>), refuses three commits besides #28799 (#29478 handles that one). None of the three has an exception entry:
| Commit | PR | app_lines |
|---|---|---|
| 0703de4eaf5 | #28049 (Move Space to This Window, Merge All Windows) | +99 |
| 088b1bc5bee | #27919 (a link from another app never reshapes Chief's Home) | +16 |
| 7a12ed39c34 | #27825 (terminals stay quiet while a handoff adopts their shell) | +12 |
088b1bc5bee and 7a12ed39c34 came in through 8dd8bdcc9aa. That was a direct push to feat-cmux-next that merged 20 commits as one, so it did not go through the merge service or its arch check.
Takes back #28049: its +99 CmuxNextApp lines (the gather code in WindowManager+Profiles), which the app_lines ratchet refuses, are paid for by this move; its code is unchanged.
Takes back #27919: its +16 CmuxNextApp lines, paid for the same way; its code is unchanged.
Takes back #27825: its +12 CmuxNextApp lines, paid for the same way; its code is unchanged.
The three commits' code is wired into WindowManager, ExternalOpenController and AppControl, so it cannot leave the App by itself. This PR moves an equal-or-larger block of pure App code out instead.
Fix forward with a move (no exception row):
WindowRegistryand itsrepairedSelectionextension move, unchanged except forpublicaccess, from CmuxNextApp/Windows to CmuxNextLayout/Windows. WindowRegistry is the App's pure window membership value type: the struct,Window,Changes, and every transition. It used only CoreGraphics and Foundation, plus CmuxNextDesign'sFocusAfterClose, which CmuxNextLayout already depends on.- Its persistence extension (
WindowRegistry+Records) and the observableWindowRegistryStorestay in the App. - The App and test files that name the type now import CmuxNextLayout.
No behavior change.
Testing
The watcher's rule (arch-ratchet.py, row app_lines), red first:
- before, each culprit alone: 0703de4eaf5
+99, 088b1bc5bee+16, 7a12ed39c34+12, eachpush refused. At tip 19807ed6820, over 30806df8b37d:+202, refused. - this commit against origin/feat-cmux-next (59157092cd3):
app_lines -426,no architecture count rises. - the watcher's range at this head (
--base 30806df8b37d --head HEAD, without #29478):app_lines -226,no architecture count rises.
check-app-size.sh --base origin/feat-cmux-next: ok ... no source-line growth (117850 now, <= 118105).
prepush-gate.py (pre-push): no new violations.
Observed / Not run
Observed:
- The rule runs, check-app-size and the prepush gate above.
- Fleet compile with tests (
compile-check --app --package CmuxNext --recipe-version 2), job fb1d24ba231a5fb671fd6128: CmuxNext passed (228 s), app passed, cmux-tui passed. - Fleet suites, step dbb4d284b3357bd2439313f4 on aws-m4pro-4, all passed and none skipped: WindowCloseNeighborTests 9/9, RestorePreviousLaunchTests 4/4, CloudWorkspaceRestoreTests 10/10, GatherWindowsTests 14/14 (#28049's own tests), PlacementWriteOrderTests 3/3. In PlacementWriteOrderTests,
.skippedis a test argument's value, not a skipped test.
Not run: no local Swift build (fleet only). No tagged build: no behavior change.
Changelog
none
Proof
No capture: no visible change; a pure value type moves between targets.