ci: run the D3D12 workflow on merge-queue groups #3313

Merged
MoonEyes merged 2 commits from upstream-pr/3313 into main 2026-12-03 10:32:35 +00:00
MoonEyes commented 2026-12-03 10:01:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T10:01:44Z.


Claim: CI-D3D12-MERGE-QUEUE in #3312.

What

d3d12.yml had no merge_group trigger, so the merge queue never ran the D3D12 build and tests. A queue group could then merge a d3d12 break: main failed the D3D12 job on five pushes in a row on 2026-12-02 (21:30 to 22:57 UTC, bc20b75ba to ef35d683e), and every open d3d12 pull request inherited it.

  • Pull requests and merge-queue groups now always start the workflow, so the d3d12 (windows-latest) check reports on every change.
  • A new scope job (ubuntu, a few seconds) diffs the pull request's test merge against its base, or the queue group against merge_group.base_sha. It skips the Windows build when neither d3d12/, mods/ nor the workflow changed. A skipped job counts as passed for a required check. Any doubt, such as missing history or a failed diff, builds.
  • Push and manual runs skip scope and build as before, with the same path filter on push.

Needs an admin after merge

The queue only waits for required checks. Someone with admin rights has to add d3d12 (windows-latest) to the required status checks of the "Protect main with pull requests and CI" ruleset. Without that, the queue runs the build but does not wait for it. When making it required, also lower the job's timeout-minutes: 70 under the queue's check_response_timeout_minutes: 60, or raise the latter.

Tested

  • The scope shell step, run on a throwaway repository: docs-only change gives touched=false, a d3d12/ change gives touched=true, and a group base two commits back with a docs-only group gives touched=false.
  • bash -n on the step, and the step again under bash -eo pipefail after the review fix (the file list is now matched with a here-string, not a pipe). Not tested on GitHub's runners before this pull request; its own run is the first real test (it touches the workflow, so scope reports touched=true and the full build runs).
  • No GPU or game files involved.

AI-assisted (Claude Code, Claude Opus 5.5). Independent review: a separate Claude Opus 5.5 agent, ACCEPTE; its one low finding (SIGPIPE under pipefail) is fixed in the second commit.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5624214371 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3313). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T10:01:44Z. --- Claim: `CI-D3D12-MERGE-QUEUE` in #3312. ## What `d3d12.yml` had no `merge_group` trigger, so the merge queue never ran the D3D12 build and tests. A queue group could then merge a d3d12 break: main failed the D3D12 job on five pushes in a row on 2026-12-02 (21:30 to 22:57 UTC, bc20b75ba to ef35d683e), and every open d3d12 pull request inherited it. - Pull requests and merge-queue groups now always start the workflow, so the `d3d12 (windows-latest)` check reports on every change. - A new `scope` job (ubuntu, a few seconds) diffs the pull request's test merge against its base, or the queue group against `merge_group.base_sha`. It skips the Windows build when neither `d3d12/`, `mods/` nor the workflow changed. A skipped job counts as passed for a required check. Any doubt, such as missing history or a failed diff, builds. - Push and manual runs skip `scope` and build as before, with the same path filter on push. ## Needs an admin after merge The queue only waits for required checks. Someone with admin rights has to add `d3d12 (windows-latest)` to the required status checks of the "Protect main with pull requests and CI" ruleset. Without that, the queue runs the build but does not wait for it. When making it required, also lower the job's `timeout-minutes: 70` under the queue's `check_response_timeout_minutes: 60`, or raise the latter. ## Tested - The `scope` shell step, run on a throwaway repository: docs-only change gives `touched=false`, a `d3d12/` change gives `touched=true`, and a group base two commits back with a docs-only group gives `touched=false`. - `bash -n` on the step, and the step again under `bash -eo pipefail` after the review fix (the file list is now matched with a here-string, not a pipe). Not tested on GitHub's runners before this pull request; its own run is the first real test (it touches the workflow, so `scope` reports `touched=true` and the full build runs). - No GPU or game files involved. AI-assisted (Claude Code, Claude Opus 5.5). Independent review: a separate Claude Opus 5.5 agent, ACCEPTE; its one low finding (SIGPIPE under pipefail) is fixed in the second commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-03 10:04:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T10:04:34Z.


The scope step skips the Windows job for ordinary non-ASCII filenames. Git can quote the entire path in git diff --name-only, so the anchored prefix check misses it. On 68145772 I ran the exact step with synthetic d3d12/docs/Überblick.md and mods/Überblick.md changes. It reported touched=false in both the pull-request and merge-group versions of the fixture.

Filtering in Git with git diff --quiet --no-renames "$base" "$GITHUB_SHA" -- d3d12/ mods/ .github/workflows/d3d12.yml handled both. Setting touched=false only on exit 0 also kept the outside-docs skip, detected a rename out of d3d12/, and kept touched=true when the diff failed. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7374697758 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3313#issuecomment-7374697758). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T10:04:34Z. --- The scope step skips the Windows job for ordinary non-ASCII filenames. Git can quote the entire path in `git diff --name-only`, so the anchored prefix check misses it. On `68145772` I ran the exact step with synthetic `d3d12/docs/Überblick.md` and `mods/Überblick.md` changes. It reported `touched=false` in both the pull-request and merge-group versions of the fixture. Filtering in Git with `git diff --quiet --no-renames "$base" "$GITHUB_SHA" -- d3d12/ mods/ .github/workflows/d3d12.yml` handled both. Setting `touched=false` only on exit 0 also kept the outside-docs skip, detected a rename out of `d3d12/`, and kept `touched=true` when the diff failed. AI-assisted with OpenAI Codex.
fiestorra commented 2026-12-03 10:05:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T10:05:37Z.


VERIFY-3313 — añade el merge_group que faltaba, y el YAML parsea con los dos trabajos encadenados

Un fichero, +38/−5, y el cambio es de los que se pueden comprobar sin correr nada:

triggers       push · pull_request · merge_group · workflow_dispatch    ← merge_group es lo nuevo
jobs           scope, d3d12                                             ← scope es lo nuevo
scope.if       github.event_name == 'pull_request' || github.event_name == 'merge_group'
d3d12.needs    scope
d3d12.if       ${{ !cancelled() && needs.scope.outputs.touched != 'false' }}
YAML           parsea con pyyaml, ambos trabajos presentes

Y lo que arregla es de los que se ven en la cola: sin merge_group, la cola de fusión nunca corría este workflow — y eso significa que un PR podía entrar por la cola con el workflow verde por no haber corrido. El comentario de la PR lo dice con un número: main lo falló en cinco pushes. Yo no puedo comprobarlo desde aquí (no tengo los registros de Actions de esa ventana), pero el merge_group que falta es un hecho comprobable en el YAML y estaba faltando.

Y el scope que añade es la parte que evita el efecto contrario: con merge_group en el disparador, cada grupo de la cola correría el build de Windows aunque no tocara d3d12/ — así que hay un trabajo barato en Ubuntu que decide, y el caro depende de él (needs: scope, y touched != 'false').

Y el detalle que hay que mirar en una PR de CI y que aquí está bien: el if del d3d12 es !cancelled() y no always() — o sea que si el scope falla, el build no corre, que es lo que se quiere (always() habría corrido el caro aunque el barato no supiera la respuesta). Y fetch-depth: 2 en el scope con GROUP_BASE: merge_group.base_sha: necesita dos commits para comparar, y los tiene.

Lo que no puedo verificar: que GitHub acepte el merge_group en este repositorio (depende de que la cola de fusión esté habilitada en la configuración, que no se ve desde el código) y que el workflow corra en verde (eso es la primera ejecución). Lo que sí: el YAML es válido, los dos trabajos están encadenados como dice el comentario, y el disparador que faltaba está.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7374723894 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3313#issuecomment-7374723894). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T10:05:37Z. --- ## VERIFY-3313 — **añade el `merge_group` que faltaba**, y el YAML parsea con los dos trabajos encadenados **Un fichero, +38/−5, y el cambio es de los que se pueden comprobar sin correr nada**: ``` triggers push · pull_request · merge_group · workflow_dispatch ← merge_group es lo nuevo jobs scope, d3d12 ← scope es lo nuevo scope.if github.event_name == 'pull_request' || github.event_name == 'merge_group' d3d12.needs scope d3d12.if ${{ !cancelled() && needs.scope.outputs.touched != 'false' }} YAML parsea con pyyaml, ambos trabajos presentes ``` **Y lo que arregla es de los que se ven en la cola**: **sin `merge_group`, la cola de fusión nunca corría este workflow** — **y eso significa que un PR podía entrar por la cola con el workflow verde por no haber corrido.** **El comentario de la PR lo dice con un número**: **`main` lo falló en cinco *pushes*.** **Yo no puedo comprobarlo desde aquí** (**no tengo los registros de Actions de esa ventana**), **pero el `merge_group` que falta es un hecho comprobable en el YAML y estaba faltando.** **Y el `scope` que añade es la parte que evita el efecto contrario**: **con `merge_group` en el disparador, cada grupo de la cola correría el build de Windows aunque no tocara `d3d12/`** — **así que hay un trabajo barato en Ubuntu que decide, y el caro depende de él** (`needs: scope`, y `touched != 'false'`). **Y el detalle que hay que mirar en una PR de CI y que aquí está bien**: **el `if` del `d3d12` es `!cancelled()` y no `always()`** — **o sea que si el `scope` falla, el build no corre**, **que es lo que se quiere** (**`always()` habría corrido el caro aunque el barato no supiera la respuesta**). **Y `fetch-depth: 2` en el `scope` con `GROUP_BASE: merge_group.base_sha`**: **necesita dos commits para comparar, y los tiene.** **Lo que no puedo verificar**: **que GitHub acepte el `merge_group` en este repositorio** (**depende de que la cola de fusión esté habilitada en la configuración, que no se ve desde el código**) **y que el workflow corra en verde** (**eso es la primera ejecución**). **Lo que sí: el YAML es válido, los dos trabajos están encadenados como dice el comentario, y el disparador que faltaba está.**
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!3313
No description provided.