fix(ci): three preflight guard reds on feat-cmux-next (tour display pid, reload shim test, fleet-test-compile runners)

Merged
TE
16d ago
+12-7

Summary

Three base reds on feat-cmux-next in ci-guards.yml's preflight group. They were red on both head and base in #23534's CI (job), which routes that group for feat pull requests. Each fix is its own commit.

  1. Test the cmux NEXT media tour's app window capture (tests/test_cmux_next_tour.py, two test_a_display_step_shoots_the_screen_so_menus_show failures).
    • Cause: Screen.use_display(self, pid) has required the app's pid since #22046, and run_tour passes it, but display_capture() still called display.use_display() with no argument. Every display tour step died with TypeError: Screen.use_display() missing 1 required positional argument: 'pid'.
    • Fix: display.use_display(app.pid()), in scripts/cmux-next/media/tour.py.
  2. Validate reload shared DerivedData default (tests/test_reload_shared_derived_data.sh): FAIL: write_dev_cli_shim not found in reload.sh.
    • Cause: reload.sh now sources write_dev_cli_shim and reload_socket_is_live from scripts/lib/cmux-dev-shim-install, the one source of the managed shim. The test's awk extraction from reload.sh found nothing, and the library's heredoc line no longer ends with <<EOF.
    • Fix: the test sources the library the way reload.sh does (sourcing runs no command), checks both functions exist, and checks that reload.sh still sources it.
  3. Validate macOS runner guards (tests/test_ci_self_hosted_guard.sh): GitHub-hosted ubuntu-24.04 at .github/workflows/fleet-test-compile.yml lines 46 and 89 (#23423).
    • Fix: both jobs use the standard selector: the fork branch first, then vars.LINUX_RUNNER, then blacksmith-4vcpu-ubuntu-2404. When a plan is needed, the compile job still takes vars.CI_COMPILE_CHECK_GATEWAY. Neither job routes to macOS, so .github/runners.json needs no entry (runner_routing_table.py).

Changelog

none

Testing

Focused commands, all red on the base per the job linked above:

  • python3 tests/test_cmux_next_tour.py
  • ./tests/test_reload_shared_derived_data.sh
  • ./tests/test_ci_self_hosted_guard.sh

Feat pull requests do not run the preflight group until #23534 lands. After that, this PR's paths route it, and the group runs on every later feat PR that touches these paths.

Observed / Not run

Observed locally (static only):

  • bash -n on the shell test.
  • YAML parse of fleet-test-compile.yml.
  • The guard's own hosted-label regex, applied to the workflow's runner lines: it finds no hosted label.
  • The prepush gate passes.

Not run: none of the three tests was run locally (tests run only on CI from this host). This PR's CI shows them green only once #23534's routing is on the base.

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

Fixes three preflight guards that were red on feat-cmux-next: the media tour display capture, the reload shared DerivedData test, and the fleet-test-compile runner labels.

  • display_capture now passes app.pid() to Screen.use_display, which has required it since #22046, so display tour steps no longer die with a TypeError.
  • The reload DerivedData test now sources write_dev_cli_shim and reload_socket_is_live from scripts/lib/cmux-dev-shim-install the way reload.sh does, and checks that reload.sh still sources it.
  • Both fleet-test-compile jobs now use the standard runner selector instead of GitHub-hosted ubuntu-24.04: fork pull requests route to Blacksmith first, a needed plan still takes vars.CI_COMPILE_CHECK_GATEWAY, then vars.LINUX_RUNNER with the Blacksmith fallback, so the self-hosted and fork-routing guards pass.