base red: a Cloud machine's link answers and the team-machine code move out of CmuxNextApp (app_lines +24, #29271)
Merged
LA
6d ago+49+49+01234567890123456789-37-37-01234567890123456789
Summary
Base red, priority zero (TIP RED 1442 follow-up). Companion of #29364. By the repo rule per first-parent commit, 79152526dd3 (#29271, "Start refusals: a teammate's machine offers New Cloud Machine ...") adds app_lines +24 with no exception entry (arch-ratchet.py --base 79152526dd3^ --head 79152526dd3: refused).
This PR fixes it by a move, with no exception row:
- A Cloud machine's link answers (owner and teammate), read from its app link (
CloudLinkSession) or legacy link (CloudMachineLink), are CmuxNextCloud's newCloudMachineLinks(ownerLink,teammate), next to the two links they read. They wereAgentTabRemoteHost.ownerLink(appLink:link:)/.teammate(appLink:link:)in the App. - The teammate refusal code and its reading of
host_unverifiedareAgentSessionAttachError.teamMachineand.classified(_:teammate:)in CmuxNextDaemon, next to its other agent-session codes. TheTeammateclosure type sits next toOwnerLinkinAgentSessionAttachClient. - The remote host wiring reads one
CloudMachineLinksfor both answers (one session lookup instead of two).AgentTabRemoteHost.swiftno longer imports CmuxNextCloud, because nothing there uses it now.
CmuxNextApp -23. No behavior change. AgentTabRemoteStartTests and CloudAppLinkOwnerAnswerTests read the same cases through the moved code.
Testing
arch-ratchet at the head (8152e5a8093):
- before, the culprit alone:
app_lines +24 ... push refused. --base origin/feat-cmux-next --head HEAD:app_lines -23,no architecture count rises.- With #29364 over the watcher's range (2a5cdb20f8b7): app_lines 0.
python3 scripts/cmux-next/prepush-gate.py (pre-push): no new violations.
Observed / Not run
Observed:
- The arch-ratchet runs and the prepush gate above.
- Fleet compile:
cmux-ci compile-check --ref 8152e5a8093723fd9e7f40bc476e9ddc71995005 --app:compile check app: passed (57 s). - Fleet tests:
package-test-lane.sh suite Packages/macOS/CmuxNext AgentTabRemoteStartTests,CloudAppLinkOwnerAnswerTests, step a043a5fb4a4b3640b9570168 on aws-m4pro-1: 8 of 8 and 5 of 5 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 cases.