ci: run CmuxCloud package tests and move 22 Cloud logic suites out of the app host

Merged
TE
2mo ago
+41-238

Summary

Two related gaps in how Cloud logic is tested:

  1. Packages/macOS/CmuxCloud has had a test target since #14818 (11 tests), but CmuxCloud was never in the swift-package-tests lane, so those tests have never run in CI.
  2. 22 suites in cmuxTests exercise only CmuxCloud's own types: VMTunnelManager, the SOCKS5 client, env and file delivery, notification sync, RemotesClient, tunnel backend selection, IP prefix routing and so on. They compiled into the app's test bundle and ran inside the launched app host, though none of them touches the app.

This PR:

  • adds CmuxCloud to the lane's package list, and to the needs_ghosttykit set, since CmuxCloud depends on CmuxTerminal;
  • moves those 22 suites (209 tests) into CmuxCloudTests unchanged, except for imports (@testable import CmuxCloud in place of the cmux_DEV/cmux block);
  • gives CmuxCloudTests the libghostty test stubs (like CmuxCloudTuiTests) and Swift 5 language mode, matching how cmuxTests compiled them;
  • removes them from cmuxTests wiring (scripts/sync-test-wiring).

Suites that share helpers with tests staying in the app host (CloudTunnelTestFakes, CloudTerminalMutationTestTransport, CloudTerminalMutationSocketRunner and their users) stay where they are.

What this buys

These suites are cheap to run (about 0.4 s of app-host test time in total), so this does not shorten an app-host shard by itself. It does three things:

  • It closes the CI gap above.
  • The app-host compile in compile admission, which every PR shard waits on, has 22 fewer test files to compile.
  • A Cloud change that touches only Packages/macOS/CmuxCloud now gets these 209 tests from the package lane, instead of only from the app-host lane.

The measurement behind choosing this group, and the app-host test inventory, is in the comment below.

Testing

  • scripts/sync-test-wiring --check, scripts/check-pbxproj.sh and scripts/check-workspace-package-groups.py pass locally.
  • No local swift test: CmuxCloud builds CmuxTerminal and most of the Cloud stack. swift-package-tests in this PR's CI is the compile and run check. The lane script changed, so it selects every package on this PR.

Changelog

none

🤖 Generated with Claude Code


Summary by cubic

Runs CmuxCloud's package tests in the swift-package-tests lane, closing a gap where those tests never ran in CI. Moves 22 app-host test suites (209 tests) that exercise only CmuxCloud's own types into CmuxCloudTests, so they no longer compile into the app target or launch the app host.

Moved suites

  • Covers the tunnel manager, SOCKS5 client, env and file delivery, notification sync, RemotesClient, tunnel backend selection, and IP prefix routing.
  • Imports switch from the conditional cmux_DEV/cmux block to @testable import CmuxCloud.
  • CmuxCloudTests gains the libghostty test stubs and Swift 5 language mode to match how cmuxTests compiled them.
  • Suites that share helpers with app-host tests (CloudTunnelTestFakes, the terminal mutation transports) stay put.

CI lane

  • CmuxCloud joins the lane's package list and the needs_ghosttykit set, since it depends on CmuxTerminal.
  • The lane tolerates the GhosttyKit binaryTarget diagnostic for CmuxCloud, matching CmuxCloudTui.
  • The app-host compile in compile admission now has 22 fewer test files to compile.

Summary by CodeRabbit

  • Tests
    • Cloud package tests now run consistently across supported build configurations, with broader coverage for cloud, terminal, workspace, and virtual machine functionality.
    • Package test runs now account for the terminal runtime requirements needed by cloud tests.
  • Chores
    • Updated project and package configuration to support the revised test setup.