diff --git a/scripts/ci/simple_pool_picker.py b/scripts/ci/simple_pool_picker.py index dcd41ef9f71e..be818bd5523b 100644 --- a/scripts/ci/simple_pool_picker.py +++ b/scripts/ci/simple_pool_picker.py @@ -232,10 +232,20 @@ def write_outputs(choice: Choice, jobs: int, path: str | None = None, owned_jobs.append("lag") if env.get("RUN_CLI") == "true": owned_jobs.append("cli-product") + # swift-package-tests first builds the Release Ghostty CLI helper + # against an SDK 15 Xcode when this run is a full suite that also + # checks the Release build. Only the Blacksmith macOS 15 image carries + # that SDK; the minis have Xcode 26.6 alone, where ci-macos.yml's + # "Select helper Xcode" exits non-zero rather than falling back. So the + # lane takes an owned Mac only when it builds no helper + # (pr_runner_pool.package_lane_owned()). + helper_build = env.get("RUN_FULL_SUITE") == "true" and env.get("RUN_RELEASE_BUILD") == "true" for key, lane in (("RUN_CLAUDE_WRAPPER", "claude-wrapper"), ("RUN_REMOTE_DAEMON", "remote-daemon"), ("RUN_SWIFT_PACKAGES", "swift-package"), ("RUN_RELEASE_BUILD", "release-build")): + if lane == "swift-package" and helper_build: + continue if env.get(key) == "true": owned_jobs.append(lane) values.update(runner=choice.label, xcode_app=choice.xcode_app, retry_runner=choice.label, diff --git a/tests/test_ci_simple_pool_picker.py b/tests/test_ci_simple_pool_picker.py index 6b712a5060f1..fbea3238b80e 100644 --- a/tests/test_ci_simple_pool_picker.py +++ b/tests/test_ci_simple_pool_picker.py @@ -109,6 +109,19 @@ def test_outputs_keep_workflow_contract_for_owned_choice(self): self.assertEqual(values["root_runner"], "glaeda-root-std-xcode-26.6") self.assertEqual(values["admission_runner"], '["glaeda-root-std-xcode-26.6"]') + def test_full_suite_release_build_keeps_swift_package_off_the_minis(self): + """swift-package-tests builds the SDK 15 helper there, which the minis cannot.""" + owned = picker.Choice("glaeda-std-xcode-26.6", "owned", owned=True) + helper = picker.write_outputs(owned, 3, env={ + "RUN_MACOS": "true", "RUN_FULL_SUITE": "true", + "RUN_SWIFT_PACKAGES": "true", "RUN_RELEASE_BUILD": "true"}) + self.assertNotIn(" swift-package ", helper["owned_jobs"]) + self.assertIn(" release-build ", helper["owned_jobs"]) + + routed = picker.write_outputs(owned, 1, env={ + "RUN_MACOS": "true", "RUN_SWIFT_PACKAGES": "true"}) + self.assertIn(" swift-package ", routed["owned_jobs"]) + def test_only_explicitly_allowed_fork_can_use_owned_pool(self): base = { "GITHUB_REPOSITORY": "manaflow-ai/cmux",