ci: report the pull-request-only required checks for merge groups

Merged
TE
2mo ago
+75-30

Summary

  • Adds .github/workflows/merge-group-policy-checks.yml, a merge_group-only workflow with three fixed no-op jobs named CLA Assistant, CLA policy guard and Web complexity. Those checks are required on main, run only on pull_request_target, and live in workflows a pull request may not edit, so a merge queue entry would otherwise wait on them until it timed out.
  • A merge group holds only pull requests that already passed all three on their heads. Web complexity still runs on every push to main, which covers two pull requests that pass alone and exceed the baseline together.
  • tests/test_ci_merge_queue_required_checks.py now lists all five required checks and compares the bridge workflow to the single document it is allowed to be. BLOCKING_MERGE_QUEUE is gone because nothing blocks the queue any more.
  • The bare-runner guard exempts the new control-plane file, next to cla-policy-guard.yml and web-complexity-trusted.yml.

This is the mergeable half of https://github.com/manaflow-ai/cmux/pull/13102. It edits no trusted policy file, so Web complexity passes and no admin merge is needed. The Bun hardening of web-complexity-trusted.yml from that PR goes in a separate PR that does need one.

Testing

  • tests/test_ci_merge_queue_required_checks.py on Python 3.9 and 3.12: PASS.
  • Ten tampered copies of the bridge (third job, swapped runner, uses: step, command suffix, matrix, extra trigger, workflow and job permissions, a secret in env, a renamed check) are all rejected.
  • tests/test_ci_self_hosted_guard.sh: 35 PASS. actionlint clean.
  • The CI router classifies this diff as macos=false web=false, so no Mac job runs.

After merge (maintainers)

Settings, Rules, Rulesets, "main: block force-push or delete", add "Require merge queue": squash; status check timeout 360 minutes (the default 60 expires while a group waits for a Mac runner); minimum group size 3, maximum 10, wait up to 15 minutes; build concurrency 1 or 2; require all entries to pass.

Issues

šŸ¤– Generated with Claude Code


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


Summary by cubic

Adds a merge_group-only workflow that reports CLA Assistant, CLA policy guard, and Web complexity as no-op jobs, so merge queue entries no longer time out waiting on checks that run only on pull_request_target. A merge group holds only PRs that already passed those checks on their heads, and Web complexity still runs on every push to main.

  • Pins the bridge workflow to exactly this fixed document; any other job, step, trigger, or permission fails the merge queue test.
  • Removes BLOCKING_MERGE_QUEUE now that all five required checks report on merge_group.
  • Exempts the new workflow in the bare-runner guard alongside cla-policy-guard.yml and web-complexity-trusted.yml.
  • Related to #13095.

Migration

  • Maintainers need to enable the merge queue on the main ruleset and set the status check timeout to 360 minutes so a group doesn't expire while waiting for a Mac runner.

Summary by CodeRabbit

  • Chores

    • Improved merge-queue processing so required policy and complexity checks are reported consistently for queued changes.
    • Added safeguards to ensure merge-queue validation remains aligned with the required main-branch checks.
  • Tests

    • Expanded automated coverage for merge-queue check reporting and workflow configuration.
    • Updated runner validation to recognize the merge-queue policy checks while preserving protections against unsupported runner usage.