base red: the app server link's launcher and route move to CmuxNextCloudCredentials (tip arch red from ccb777fdde80)

Merged
LA
4d ago
+56-20

Fixes the tip arch red from ccb777fdde80 (#32494): [app_lines] CmuxNextApp Swift lines: +8. The last green arch tip is bbb2b89006be.

Fix forward, with no exception and no change of the ratchet. Behavior does not change. CloudService chose the app server link's launcher in four branches. #32494 added a link_route text to each branch. That code is now CloudAppServerLink in CmuxNextCloudCredentials, next to CloudNativeFirstLauncher. The four branches:

  • not the app server link source: no launcher, legacy
  • choice link: cmux link, link
  • choice native with a Native route holder: CloudNativeFirstLauncher with cmux link as its fallback, and the launcher's own route
  • choice native and no holder: cmux link, link (native asked; no Native route holder for this app)

The Native route holder is still made only for the Native choice of an app server link. A Native fallback is still logged on com.cmuxterm.app.next / app.cloud with the same text.

python3 scripts/cmux-next/arch-ratchet.py --base bbb2b89006be --head HEAD: app_lines -6, no architecture count rises.

Changelog

none

Tests

CloudNativeFirstLauncherTests.theAppServerLinkReportsTheRouteItLaunched is new. It checks the launcher and the route text of each branch, and that the Native holder is not made for the legacy or link choice. It also checks the route after a Native fallback. #32494 had no test of its own.

Observed / Not run

  • Observed: the arch ratchet (above) and prepush-gate.py (no new violations).
  • swift-logic-lines.py rises by 10 (421598 to 421608). A move from one Swift module to another adds the span of the new declaration (CloudAppServerLink). That row was already red on the tip before this PR.
  • Fleet: app compile job 9403465b9d92c270e2db3db4, and the test step d1859fe5c6f97c0b5892cb5e (package-test-lane.sh suite Packages/macOS/CmuxNext with CloudNativeFirstLauncherTests, CloudIdlePauseTests, CloudMachineChangeStateTests, CloudOpenMachineWaitsForLinkTests and CloudMoveTests). A PR comment will give their results.
  • Not run: no live app launch with CMUX_NEXT_CLOUD_NATIVE_LINK=1.

No capture: this change has no UI effect.


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


Summary by cubic

Moves the app server link's launcher choice and link_route text into CloudAppServerLink in CmuxNextCloudCredentials, fixing the arch ratchet red from #32494. Behavior is unchanged.

  • CloudService now uses CloudAppServerLink instead of picking the launcher inline.
  • The Native route holder is still created only for the native choice of an app server link, and the fallback log text is identical.
  • Adds CloudNativeFirstLauncherTests.theAppServerLinkReportsTheRouteItLaunched covering every branch's launcher and route text, including after a Native fallback.

Tests

  • Arch ratchet: app_lines -6, no architecture count rises.
  • prepush-gate.py reports no new violations; swift-logic-lines.py rises by 10 from the new declaration's span.