ci: the workflows behind main's required checks also run on merge_group (CI-MERGE-QUEUE) #2935

Merged
OreoFR merged 1 commit from upstream-pr/2935 into main 2026-12-01 20:13:33 +00:00
OreoFR commented 2026-12-01 19:57:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T19:57:18Z.


Claimed in the coordination issue as CI-MERGE-QUEUE: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7323715511

What and why

A merge queue for main: instead of merging a green pull request directly, it is added to the queue; GitHub tests it on top of the latest main plus whatever is ahead of it in the queue, and merges only if that passes, one at a time, in order. If one fails it drops out and the rest move up.

Two things happened today that a queue prevents:

  • pull requests merged while main's CI was still running on the previous merge (one run was cancelled, so a red main could not have been traced to either);
  • two pull requests green on their own that broke main together (the four colliding test files fixed by #2895).

This pull request only makes the workflows ready: the queue tests a temporary merge_group commit, so the workflows behind the required checks must run on that event.

  • ci.yml (change-scope, check, linux-python-and-viewer, semantic-tests) and no-game-data.yml (no-game-data) gain merge_group:.
  • In the queue change-scope is skipped (it reads a pull request's diff), which GitHub counts as passed for a required check; the jobs after it then run in full, without the docs-only shortcut.
  • Their concurrency groups fall back to run_id for merge_group, so queued runs never cancel each other.

After merging (admin, repository settings)

Settings, Rules, the ruleset on main: turn on Require merge queue (merge method "merge", the required checks stay as they are). Optionally a group size above 1 so several queued pull requests share one CI run.

Tested

tests/test_ci_registration.py, test_ci_main_signal.py, test_run_standalone_tests.py, test_runtime_paths.py: OK on Windows 11. The real test of the merge_group path is the first queued pull request.

Agreed to by a second human maintainer (Aslan). AI-assisted: yes, Claude Code agent oreofr-agent for OreoFR.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5593418517 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2935). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T19:57:18Z. --- Claimed in the coordination issue as **CI-MERGE-QUEUE**: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7323715511 ### What and why A merge queue for `main`: instead of merging a green pull request directly, it is added to the queue; GitHub tests it on top of the latest `main` plus whatever is ahead of it in the queue, and merges only if that passes, one at a time, in order. If one fails it drops out and the rest move up. Two things happened today that a queue prevents: - pull requests merged while `main`'s CI was still running on the previous merge (one run was cancelled, so a red `main` could not have been traced to either); - two pull requests green on their own that broke `main` together (the four colliding test files fixed by #2895). This pull request only makes the workflows ready: the queue tests a temporary `merge_group` commit, so the workflows behind the required checks must run on that event. - `ci.yml` (`change-scope`, `check`, `linux-python-and-viewer`, `semantic-tests`) and `no-game-data.yml` (`no-game-data`) gain `merge_group:`. - In the queue `change-scope` is skipped (it reads a pull request's diff), which GitHub counts as passed for a required check; the jobs after it then run in full, without the docs-only shortcut. - Their concurrency groups fall back to `run_id` for `merge_group`, so queued runs never cancel each other. ### After merging (admin, repository settings) Settings, Rules, the ruleset on `main`: turn on **Require merge queue** (merge method "merge", the required checks stay as they are). Optionally a group size above 1 so several queued pull requests share one CI run. ### Tested `tests/test_ci_registration.py`, `test_ci_main_signal.py`, `test_run_standalone_tests.py`, `test_runtime_paths.py`: OK on Windows 11. The real test of the `merge_group` path is the first queued pull request. Agreed to by a second human maintainer (Aslan). AI-assisted: yes, Claude Code agent `oreofr-agent` for OreoFR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-01 20:13:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T20:13:34Z.


Merge-group workflow wiring checked against the effective main rules at c4058242 against 99a29d10. The active branch-rules endpoint listed five required contexts: change-scope, check, linux-python-and-viewer, semantic-tests, and no-game-data. All five are in the two workflows this change subscribes to merge_group. Parsing both trees found those triggers were the only semantic workflow changes.

The expressions leave change-scope PR-only, let the three CI work jobs proceed when the docs-only output is absent and the run is active, and distinguish queue runs by run_id. Both whole-tree No Game Data commands passed on the scratch snapshots. CI registration, main signal, standalone runner and runtime path suites passed all 35 focused cases on both trees.

This covers local workflow wiring and the effective required-context list. The branch-rules response had no merge queue rule, so no hosted merge_group run was exercised. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7324288196 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2935#issuecomment-7324288196). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T20:13:34Z. --- Merge-group workflow wiring checked against the effective main rules at `c4058242` against `99a29d10`. The active branch-rules endpoint listed five required contexts: `change-scope`, `check`, `linux-python-and-viewer`, `semantic-tests`, and `no-game-data`. All five are in the two workflows this change subscribes to `merge_group`. Parsing both trees found those triggers were the only semantic workflow changes. The expressions leave `change-scope` PR-only, let the three CI work jobs proceed when the docs-only output is absent and the run is active, and distinguish queue runs by `run_id`. Both whole-tree No Game Data commands passed on the scratch snapshots. CI registration, main signal, standalone runner and runtime path suites passed all 35 focused cases on both trees. This covers local workflow wiring and the effective required-context list. The branch-rules response had no merge queue rule, so no hosted `merge_group` run was exercised. AI-assisted (Codex).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2935
No description provided.