Repository navigation
base red: a Forget's acpmux peer removal moves to CmuxNextServer (#28799 app_lines +75) - #29478
Conversation
…_lines) #28799 (4a46cfa) added 75 CmuxNextApp Swift lines (SSHService.swift, AddDeviceServices+App.swift) with no exception entry; arch-ratchet's app_lines row refuses it alone (--base 4a46cfa^ --head 4a46cfa: +75), and the tip watcher's range 30806df..644491f is +75. - SSHPeerForgets (new, CmuxNextServer/AddDevice, next to DeviceDirectory) owns the removal of a written Forget's acpmux peer: the default `acp host ls`/`acp host rm` through the app's cmux-tui, the marks of Forgets whose Undo still shows, the pending Forget record (Pending, was SSHService.PendingForget) and the exact-route match (reaches, sameRoute). CmuxNextServer now depends on CmuxNextRemote (ui -> service). - SSHService keeps the calls: hide, unhide, commitForget (with its "Forget still holds and no other session reaches the route" check), forgetMachines(reachingPeer:) and the connect's mark clear. - Reconnect's decision table moves to CmuxNextRemote as SSHConnectionMachine.Status.reconnectStep(daemonConnected:daemonFailed:) (it read only `daemon == .connected`), so the move takes out more App lines than #28799 added. CmuxNextApp -79; the watcher's range is -4. No behavior change. ForgetRemovesBothListsTests read the same cases through the moved code, now also check that a written Forget takes the SSH machine out of the list as well as its peer, and test SSHPeerForgets on its own. RemoteConnectRecoveryTests read the moved reconnect step.
|
Review (claude-review-subagent): SHIP at 39e589b Independent read-only review of the diff against 644491f and of the moved code from 4a46cfa (#28799). I did not compile Swift locally (fleet only). Correctness: Forget and peer removal (no behavior change found)
Reconnect
Compile (read against the Package.swift settings)
Arch ratchet
Repo rules
Non-blocking notes
|
|
Review (claude-review-subagent): SHIP at 61c459c Re-review of the merge only (parents 39e589b and origin/feat-cmux-next 19807ed). Earlier SHIP at 39e589b stays valid for the PR's own change.
|
|
Fleet evidence at 61c459c: compile with tests, job d551212ef05470352fc592f6: CmuxNext passed (308 s), app passed, cmux-tui passed. Tests, step 046dbdf157d63b98a617b6d5 (aws-m4pro-7): ForgetRemovesBothListsTests 8/8, RemoteConnectRecoveryTests 10/10 passed. Receipt at this head: #29478 (comment) |
…xtLayout (app_lines) (#29514) The tip's arch-ratchet app_lines row is red over 30806df: three commits add CmuxNextApp lines with no exception entry, each refused alone by `arch-ratchet.py --base <c>^ --head <c>`: - 0703de4 (#28049, Move Space to This Window / Merge All Windows): +99 - 088b1bc (#27919, a link from another app never reshapes Chief's Home): +16 - 7a12ed3 (#27825, terminals stay quiet while a handoff adopts their shell): +12 (the last two came in through the direct-push merge 8dd8bdc; #28799's +75 is #29478's). Their own code is wired into WindowManager, ExternalOpenController and AppControl, so it cannot leave the App by itself. Instead, the App's pure window membership model moves out whole: WindowRegistry (struct, Window, Changes, every transition) and its repairedSelection extension go unchanged to CmuxNextLayout/Windows with `public` access; its persistence extension (WindowRegistry+Records) and the observable store stay in the App. WindowRegistry used only CoreGraphics and Foundation (and Design's FocusAfterClose, which CmuxNextLayout already depends on). App and test files that name the type import CmuxNextLayout. CmuxNextApp -426 against the tip; the watcher's range from 30806df is app_lines -226 with this alone. No behavior change.
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Shipped in:
|
Summary
Base red, priority zero (TIP RED 1881). The tip watcher's
arch-ratchet.py --base 30806df8b37d --head 644491fdf9efrefuses[app_lines] CmuxNextApp Swift lines: +75. By the same rule on each first-parent commit, the only culprit is 4a46cfa (#28799, "Forget and Devices Remove each take out both the SSH machine and its acpmux peer"):app_lines +75, with no exception entry. Every other commit in the range shows no rise.Takes back #28799: it put the Forget's acpmux peer removal (about 75 lines) in CmuxNextApp's SSHService, and the app_lines ratchet refuses that. This PR moves that logic, with the same behavior, to CmuxNextServer, next to DeviceDirectory, and the App keeps only the calls.
Fix forward with a move (no exception row):
SSHPeerForgets(new,CmuxNextServer/AddDevice) owns the removal of a written Forget's acpmux peer:acp host ls/acp host rmthrough the app's cmux-tuiPending, wasSSHService.PendingForget)reaches,sameRoute)CmuxNextServer now depends on CmuxNextRemote (ui -> service, allowed).
SSHServicekeeps the calls:hide,unhide,commitForget(with its check that the Forget still holds and no other session reaches the route),forgetMachines(reachingPeer:), and the connect that clears a machine's marks.Reconnect's decision table moves to CmuxNextRemote as
SSHConnectionMachine.Status.reconnectStep(daemonConnected:daemonFailed:). It read onlydaemon == .connected. This second move is what takes out more App lines than Forget and Devices Remove each take out both the SSH machine and its acpmux peer #28799 added.No behavior change.
Testing
The watcher's rule (
arch-ratchet.py, rowapp_lines):--base 4a46cfa244c^ --head 4a46cfa244c):[app_lines] ... +75 ... push refused.--base 644491fdf9e --head HEAD):app_lines -79,no architecture count rises.--base 30806df8b37d --head HEAD):app_lines -4,no architecture count rises.The app-size rule (
scripts/cmux-next/check-app-size.sh --base):CmuxNextApp source grew (118015 source lines now, 117971 at 4a46cfa244c^), exit 1.ok ... no source-line growth (117973 now, <= 118015 at 644491fdf9e).After the merge of feat (head 61c459c, base 19807ed), measured the watcher's way (
arch-ratchet.py --base 30806df8b37d --head <rev>, row app_lines):+202, refused.+123, refused. This PR takes out Forget and Devices Remove each take out both the SSH machine and its acpmux peer #28799's share (-79). The +123 that stays comes from three other commits: 088b1bc +16 and 7a12ed3 +12, both brought in by the direct-push merge 8dd8bdc, and 0703de4 (cmux NEXT spaces: Move Space to This Window and Merge All Windows (carries #27327) #28049) +99. Those are not in this PR's scope (STATUS 1915).app_lines -79,no architecture count rises.check-app-size.sh --base origin/feat-cmux-next:ok, no source-line growth (118068 now, <= 118110).check-app-size.sh --base 30806df8b37d: 118110 source lines at the tip, 118068 at this head (117971 at the base).prepush-gate.py(pre-push):no new violations, at both pushes. The namespace lint on the changed sources:OK.Tests:
ForgetRemovesBothListsTestsread the same cases through the moved code. It also has two new checks:SSHPeerForgetson its own: a shown Undo keeps the peer, only the route's peer is picked, and a connect clears the marks.RemoteConnectRecoveryTestsread the moved reconnect step.Observed / Not run
Observed:
compile-check --app --package CmuxNext --recipe-version 2, job d551212ef05470352fc592f6: CmuxNext passed (308 s), app passed, cmux-tui passed.Not run: no local Swift build or test (fleet only). No tagged build: no behavior change.
Changelog
none
Proof
No capture: no visible change; code moves between targets with the same behavior.