Stage required macOS CI behind linux preflight

Merged
AZ
5mo ago
+1153-638

Summary

  • Add required linux-preflight so routed Linux checks and workflow guards finish before expensive macOS jobs enter the queue.
  • Collapse required display/runtime macOS work into tests-build-and-lag: one Debug build-for-testing now feeds Swift warning budget, CoreAnimation startup, lag, display-resolution UI, and browser-find UI regressions.
  • Remove the separate ui-regressions macOS job.
  • Remove the separate release-ghostty-cli-helper macOS job. The existing macOS 15 swift-package-tests lane now builds/uploads the universal Ghostty helper before switching to the Xcode 26 package-test SDK, and release-build downloads that artifact before validating app/CLI/helper slices on macOS 26.
  • Keep app-host unit tests sharded 4 ways because collapsing those shards would increase wall time.
  • Add lane-specific Xcode fast paths through CMUX_CI_XCODE_APP_MACOS_15 and CMUX_CI_XCODE_APP_MACOS_26, with an early CMUX_CI_REQUIRED_MACOS_SDK_MAJOR=26 guard so stale pinned Xcodes fail before expensive builds.

Resulting required PR split

  • Cheap Linux/routing layer: changes, workflow-guard-tests, routed Linux checks, linux-preflight.
  • Parallel macOS layer after preflight: four app-host unit tests shards, swift-package-tests, tests-build-and-lag, release-build.
  • Aggregates: tests, ci-status.

Repo settings

Already set on manaflow-ai/cmux:

  • CMUX_CI_XCODE_APP_MACOS_15=/Applications/Xcode_26.3.app
  • CMUX_CI_XCODE_APP_MACOS_26=/Applications/Xcode_26.5.app

Optional helper override, only needed if you want to force a specific SDK 15 helper Xcode instead of scanning installed Xcodes:

  • CMUX_CI_HELPER_XCODE_APP_MACOS_15=/Applications/<sdk-15-xcode>.app

Ruleset impact

Update required checks after this lands if the ruleset currently names individual checks:

  • Remove ui-regressions.
  • Remove release-ghostty-cli-helper.
  • Add linux-preflight if requiring direct job names instead of only ci-status.
  • Keep tests, tests-build-and-lag, release-build, swift-package-tests, and app-host shard checks.

Verification

  • bash -n scripts/ci/run-display-ui-regressions.sh scripts/select-ci-xcode.sh tests/test_ci_xcode_selection_fast_path.sh tests/test_ci_release_sdk_lane.sh tests/test_ci_self_hosted_guard.sh tests/test_ci_release_build_timeout.sh
  • python3 tests/test_ci_change_areas.py
  • ./tests/test_ci_xcode_selection_fast_path.sh
  • ./tests/test_ci_release_sdk_lane.sh
  • ./tests/test_ci_release_build_timeout.sh
  • ./tests/test_ci_self_hosted_guard.sh
  • git diff --check

[!NOTE]
Medium Risk
Large CI workflow restructuring changes when macOS runs and how release helper artifacts are produced; mistakes could skip regressions or break release-build handoff, but extensive guard scripts and Python tests lock the intended graph.

Overview
Adds a required linux-preflight gate so workflow guards and routed Linux jobs must pass before any macOS work is queued; tests and ci-status now depend on it.

Job consolidation: removes standalone ui-regressions and release-ghostty-cli-helper. Display-resolution and browser-find UI regressions move into tests-build-and-lag via new scripts/ci/run-display-ui-regressions.sh, sharing one Debug build-for-testing with CA/lag checks (timeout 75m, stronger virtual-display teardown). The universal Ghostty CLI helper is built and uploaded from swift-package-tests (helper Xcode pinned to SDK 15, then package tests on SDK 26); release-build waits on that job and downloads the artifact instead of building the helper on macOS 26.

Xcode selection: select-ci-xcode.sh gains pinned-app fast paths (CMUX_CI_XCODE_APP / lane vars) and CMUX_CI_REQUIRED_MACOS_SDK_MAJOR validation so wrong SDKs fail before long builds. macOS jobs set lane-specific Xcode env vars.

UITest configureSocketLaunch forwards CMUX_UI_TEST_TARGET_DISPLAY_ID for the browser-find regression on the persistent virtual display. Guard tests and test_ci_change_areas.py encode the new topology.

Reviewed by Cursor Bugbot for commit 652eb8465a31d9a67804e38bdca1cfc7cdbe8d9f. Bugbot is set up for automated code reviews on this repo. Configure here.