ci: gate merges through the merge queue with one required check per workflow

Merged
OK
2mo ago
+303-164

The Main ruleset enables a merge queue but requires no status checks, and no workflow listens to merge_group. So the queue merges right away and auto-merge waits on nothing: #929 merged while spec and mobile were still running.

  • Each of spec, benchmark, mobile, docs ends in a <workflow> gate job. It fails when any job it needs failed or was cancelled and passes over a skipped one. These four are the only checks the ruleset will require.
  • All four trigger on merge_group, so the queue runs every suite on the queued tree before it merges.
  • mobile: changes plans the suites as a matrix. A fork or Dependabot PR leaves out agentic at the job level. Before, those jobs built the Expo app and booted 2 simulators, then skipped only the run step and reported green.
  • mobile on push to main runs no suite (the queue already tested the same tree). It only rebuilds the Expo app on a cache miss (lookup-only), because main's cache scope is the one PRs and queue entries restore from. The per-platform build commands moved into .github/actions/expo-app so both paths share them.
  • docs drops its workflow-level paths: (a required gate would sit pending forever) for a docs entry in .github/filters.yml. It no longer runs on push to main.
  • benchmark web agent skips Dependabot PRs, as mobile already did.
  • spec and benchmark still run on push to main (cheap, they warm main's caches, and they keep a health signal).
flowchart LR
  PR[pull_request] --> G1[4 gates]
  AM[auto-merge] --> Q[merge_group]
  Q --> G2[4 gates on queued tree]
  G2 -- all green --> M[merge to main]
  M --> S[spec + benchmark, mobile app cache warm]

Trust change: the queue runs a queued PR's code with repo secrets, fork or not. Enqueueing is now the trust decision (written into AGENTS.md security invariants).

Rejected review finding: the agent-device runner cache will no longer be saved on main. Measured on #917, a cache miss costs nothing visible (suite 9:46 on a miss vs 10:53 on a hit), so it isn't worth warming.

After merge

Update the Main ruleset (doing it before this lands would block every open PR):

  • add required_status_checks: spec gate, benchmark gate, mobile gate, docs gate (GitHub Actions integration)
  • raise check_response_timeout_minutes from 60 to 120 (mobile jobs time out at 60, plus the macOS queue)

Verified

Ran it locally: no - CI-only. actionlint is clean (Blacksmith labels and one existing SC2016 ignored) and pnpm check passes. The pull_request path is verified by this PR's own runs. The merge_group path can only be exercised after the ruleset update.