fix(ci): a fork pull request never reads CI_SESSION_LANE_RUNNER

Merged
LA
7d ago
+2-1

Summary

#27201 (dd027bc8dd3) gave the macOS placement step SESSION_LANE: ${{ vars.CI_SESSION_LANE_RUNNER }}. That runner variable names an owned glaeda-session-* label, and the line has no fork branch. tests/test_ci_fork_runner_routing.py (ci-guards.yml "Validate fork runner routing") fails on it: cmux-next.yml:1249 checks vars.CI_SESSION_LANE_RUNNER before the fork pull-request branch.

The expression now starts with the owner branch and the fork pull-request branch, in the same form as every other runner line. A fork pull request never reads the variable. There is no exemption entry in the test, so there is no second list to keep correct.

Thanks @teamleaderleo for #27201. This only gates the new input; the session-lane routing is unchanged for same-repository runs.

Values before and after

Evaluated with GitHub's && / || rules, using the test's own expression parser. "placement lane" is what scripts/ci/side_lane_placement.py takes from it: it uses SESSION_LANE only when the value starts with glaeda-.

vars.CI_SESSION_LANE_RUNNER = 'glaeda-session-light-xcode-26.6'
  push to feat-cmux-next          old='glaeda-session-light-xcode-26.6'    new='glaeda-session-light-xcode-26.6' same    placement lane: old='glaeda-session-light-xcode-26.6' new='glaeda-session-light-xcode-26.6'
  same-repo pull request          old='glaeda-session-light-xcode-26.6'    new='glaeda-session-light-xcode-26.6' same    placement lane: old='glaeda-session-light-xcode-26.6' new='glaeda-session-light-xcode-26.6'
  workflow_dispatch               old='glaeda-session-light-xcode-26.6'    new='glaeda-session-light-xcode-26.6' same    placement lane: old='glaeda-session-light-xcode-26.6' new='glaeda-session-light-xcode-26.6'
  fork pull request (into ours)   old='glaeda-session-light-xcode-26.6'    new='blacksmith-6vcpu-macos-26'    CHANGED placement lane: old='glaeda-session-light-xcode-26.6' new=''
  a fork's own CI (no vars)       old=''                                   new='macos-26'                     CHANGED placement lane: old='' new=''
vars.CI_SESSION_LANE_RUNNER = ''
  push to feat-cmux-next          old=''                                   new=''                             same    placement lane: old='' new=''
  same-repo pull request          old=''                                   new=''                             same    placement lane: old='' new=''
  workflow_dispatch               old=''                                   new=''                             same    placement lane: old='' new=''
  fork pull request (into ours)   old=''                                   new='blacksmith-6vcpu-macos-26'    CHANGED placement lane: old='' new=''
  a fork's own CI (no vars)       old=''                                   new='macos-26'                     CHANGED placement lane: old='' new=''
  • Same-repository pushes, pull requests and dispatches get the same value as before.
  • In both fork cases, the placement's session lane is ''. That is its safe default: the job keeps the route it had without the lane.
  • The step also runs only on a glaeda- side route, which a fork never gets. This change makes the input safe without depending on that.

Changelog

none

Testing

Command: python3 tests/test_ci_fork_runner_routing.py

  • Base 7b53cd4e3b6: FAILED (failures=1) (the line above).
  • Head: Ran 20 tests ... OK.

Also OK at the head: test_ci_side_lane_placement.py, test_ci_next_macos_cascade.py, test_ci_owned_pool_rescue.py, test_ci_pr_runner_pool.py, test_runner_label_policy.py, test_cmux_next_checks_workflow.py.

Observed / Not run

  • Observed: the commands above on Linux (cmux-orchestrator-1, Python 3.12), at the base and the head. The value table comes from a script that evaluates both expressions. scripts/cmux-next/prepush-gate.py: no new violations.
  • Not run: a real fork pull request through Actions, and actionlint (it is not installed on this VM).

The same class of fix for perf/chrome-parity is on cp/fix-tip-checks-base-red-4.


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


Summary by cubic

Fixes the macOS placement step in cmux-next.yml so a fork pull request never reads the CI_SESSION_LANE_RUNNER variable, which resolves the failing "Validate fork runner routing" test.

  • The SESSION_LANE expression now checks the owner and fork pull-request branches before falling back to the variable, matching the pattern used by other runner lines.
  • Same-repository pushes, pull requests, and dispatches get the same values as before; fork paths use their safe defaults (macos-26 or blacksmith-6vcpu-macos-26), which place no session lane.
  • Session-lane routing is unchanged for same-repository runs.