ci: less to run on a pull request (CI-LESS-TO-RUN) #2930

Open
MoonEyes wants to merge 5 commits from upstream-pr/2930 into main
MoonEyes commented 2026-12-01 19:24:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T19:24:24Z.


Claimed in the coordination issue as: CI-LESS-TO-RUN (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7322763784)

Depends on: #2924 (same lines; that one goes first and this branch is updated after it)

What and why

Less to run on a pull request, with the same required checks:

  • a pull request that changes only .rs files under d3d12/crates or d3d12/apps skips the Windows Python jobs; the Linux job still runs the tests that read those files;
  • semantic-tests skips on a pull request that cannot touch what it reads (tools, tests, scripts, runtime, make_game.py, ci.yml); it always runs on main, in a merge queue and daily;
  • check: the standard-library loop over two runners and the build apart; check stays the single required result and fails if a part fails, is cancelled or is skipped by mistake;
  • d3d12: two parallel jobs, line-table debug info; the clippy and asset-policy reports (report only) stay on pull requests so an author sees a new finding before the merge;
  • merge_group triggers, so that a merge queue can be turned on later (a maintainer's decision, not this pull request's).

Sharding the semantic and Linux loops was left out: queued jobs, not test time, are the longer delay here.

Tested

Windows 11, Python 3.14: test_ci_registration (18, also with SHARD set), test_run_standalone_tests (7), test_ci_main_signal, test_runtime_paths, test_no_game_data_workflow, test_progress_dashboard_ci, docs links. The scope shell was simulated on 8 cases by a separate reviewer agent, which accepted the diff. The same idea runs on a copy of this repository: its d3d12 jobs took 4 min 35 and 4 min 40 instead of 12 to 13. Timings here are the ones this pull request's own run will give.

Measured on this pull request's run (head 8d149898c, job start to end), against main at f1a559851 (last push with a full run):

Job main this PR
check (Windows standalone tests) 15 min 04 (one job) 6 min 55 and 4 min 36 (two shards in parallel)
d3d12 (windows-latest) 13 min 46 6 min 50
d3d12 shipped (windows-latest) (not in that run) 4 min 42
semantic-tests 6 min 44 5 min 01
linux-python-and-viewer 7 min 17 8 min 01

The longest Windows job drops from about 15 min to about 7 min. linux-python-and-viewer does not get shorter; runner variance between runs is a minute or two (main's two runs of it took 7 min 17 and 5 min 22). One run each, so these are indications, not averages.

A .github/ change: a second maintainer has to agree.

GPUs tested: n/a

AI-assisted: yes. Author: Claude Opus 5.5 (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5592873721 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2930). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-01T19:24:24Z. --- Claimed in the coordination issue as: CI-LESS-TO-RUN (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7322763784) Depends on: #2924 (same lines; that one goes first and this branch is updated after it) ### What and why Less to run on a pull request, with the same required checks: - a pull request that changes only `.rs` files under `d3d12/crates` or `d3d12/apps` skips the Windows Python jobs; the Linux job still runs the tests that read those files; - `semantic-tests` skips on a pull request that cannot touch what it reads (tools, tests, scripts, runtime, make_game.py, ci.yml); it always runs on main, in a merge queue and daily; - `check`: the standard-library loop over two runners and the build apart; `check` stays the single required result and fails if a part fails, is cancelled or is skipped by mistake; - d3d12: two parallel jobs, line-table debug info; the clippy and asset-policy reports (report only) stay on pull requests so an author sees a new finding before the merge; - `merge_group` triggers, so that a merge queue can be turned on later (a maintainer's decision, not this pull request's). Sharding the semantic and Linux loops was left out: queued jobs, not test time, are the longer delay here. ### Tested Windows 11, Python 3.14: `test_ci_registration` (18, also with SHARD set), `test_run_standalone_tests` (7), `test_ci_main_signal`, `test_runtime_paths`, `test_no_game_data_workflow`, `test_progress_dashboard_ci`, docs links. The scope shell was simulated on 8 cases by a separate reviewer agent, which accepted the diff. The same idea runs on a copy of this repository: its d3d12 jobs took 4 min 35 and 4 min 40 instead of 12 to 13. Timings here are the ones this pull request's own run will give. **Measured on this pull request's run** (head `8d149898c`, job start to end), against `main` at `f1a559851` (last push with a full run): | Job | `main` | this PR | |---|---|---| | `check` (Windows standalone tests) | 15 min 04 (one job) | 6 min 55 and 4 min 36 (two shards in parallel) | | `d3d12 (windows-latest)` | 13 min 46 | 6 min 50 | | `d3d12 shipped (windows-latest)` | (not in that run) | 4 min 42 | | `semantic-tests` | 6 min 44 | 5 min 01 | | `linux-python-and-viewer` | 7 min 17 | 8 min 01 | The longest Windows job drops from about 15 min to about 7 min. `linux-python-and-viewer` does not get shorter; runner variance between runs is a minute or two (`main`'s two runs of it took 7 min 17 and 5 min 22). One run each, so these are indications, not averages. A `.github/` change: a second maintainer has to agree. GPUs tested: n/a AI-assisted: yes. Author: Claude Opus 5.5 (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent. --- _Generated by [Claude Code](https://claude.ai/code)_
merzleckeier commented 2026-12-01 19:39:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:39:42Z.


Local rebase check after the standalone worker change for 000c17fe against ab374c7d (#2924 merged). The ci.yml conflict is at the old Windows standalone step. Dropping that step keeps the new Windows shard step at -j 4 and the Linux step at -j 8. That resolution fails test_step_script_reads_the_check_loop because the merged registration test expects -j 8 in the Windows step.

In a local resolution that drops the old step and retains -j 8 in both active standalone steps, all 61 focused Python tests passed, including 18/18 registration tests. Running registration separately with SHARD=2/2 also passed 18/18. The workflow selector and runner parser split the current 655 paths into disjoint sets of 328 and 327. The exact scope shell returned the expected flags in 12 synthetic Git cases, including a test renamed to docs. The aggregator succeeded only for success + success across all 16 status pairs.

These are local shell, selection and focused test results. Hosted Windows sharding and timing still need the workflow run. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7323190805 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2930#issuecomment-7323190805). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T19:39:42Z. --- Local rebase check after the standalone worker change for `000c17fe` against `ab374c7d` (#2924 merged). The `ci.yml` conflict is at the old Windows standalone step. Dropping that step keeps the new Windows shard step at `-j 4` and the Linux step at `-j 8`. That resolution fails `test_step_script_reads_the_check_loop` because the merged registration test expects `-j 8` in the Windows step. In a local resolution that drops the old step and retains `-j 8` in both active standalone steps, all 61 focused Python tests passed, including 18/18 registration tests. Running registration separately with `SHARD=2/2` also passed 18/18. The workflow selector and runner parser split the current 655 paths into disjoint sets of 328 and 327. The exact scope shell returned the expected flags in 12 synthetic Git cases, including a test renamed to docs. The aggregator succeeded only for `success` + `success` across all 16 status pairs. These are local shell, selection and focused test results. Hosted Windows sharding and timing still need the workflow run. AI-assisted (Codex).
merzleckeier commented 2026-12-02 23:31:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T23:31:44Z.

Review: COMMENTED


D3D12 scope verification for 8d149898 merged with main at 81efe4566. I ran the exact Bash step in 12 shallow synthetic checkouts with real Git and a local bare origin.

The key case was a queue group with a D3D12 change followed by a docs-only change. The same head returned build=true against the original queue base and build=false when the supplied base already included the D3D12 change. Changes to mods, the workflow itself, and a file moved out of d3d12 each selected the build. A missing or empty queue base selected the build too. Pull-request first-parent comparisons, push and manual dispatch matched their expected outcomes.

Six focused CI test files passed 60 tests. The merge with current main was clean. This checks scope selection locally. The required-check configuration and hosted merge-queue execution are separate. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6160954170 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2930#pullrequestreview-6160954170). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-02T23:31:44Z. **Review:** COMMENTED --- D3D12 scope verification for `8d149898` merged with `main` at `81efe4566`. I ran the exact Bash step in 12 shallow synthetic checkouts with real Git and a local bare origin. The key case was a queue group with a D3D12 change followed by a docs-only change. The same head returned `build=true` against the original queue base and `build=false` when the supplied base already included the D3D12 change. Changes to `mods`, the workflow itself, and a file moved out of `d3d12` each selected the build. A missing or empty queue base selected the build too. Pull-request first-parent comparisons, push and manual dispatch matched their expected outcomes. Six focused CI test files passed 60 tests. The merge with current `main` was clean. This checks scope selection locally. The required-check configuration and hosted merge-queue execution are separate. AI-assisted.
merzleckeier commented 2026-12-03 04:14:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T04:14:15Z.


One optional follow-up for CI-LESS-TO-RUN. I ran both scope steps from 8d149898 merged with 516c9eaa against eight synthetic Git changes. A Markdown-only change under d3d12/docs/ or to d3d12/README.md currently yields docs-only=false and build=true; the same change under top-level docs/ yields docs-only=true and build=false.

I tested narrow Markdown exclusions in both git diff --no-renames selectors. The three D3D12 documentation cases moved to the docs lane. Non-Markdown files under d3d12/docs/, a docs-plus-Rust change, mods, and a Rust file moved into docs all still selected the builds.

The docs lane would also need the existing CommandTest.test_the_tracked_switches_page_matches_the_sources and AdvancedModeTests.test_the_repositorys_list_reads_whole checks for the D3D12 catalog. Both passed on the merged tree. I’m leaving this observation here while this PR owns the workflow changes. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367414980 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2930#issuecomment-7367414980). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:14:15Z. --- One optional follow-up for `CI-LESS-TO-RUN`. I ran both scope steps from `8d149898` merged with `516c9eaa` against eight synthetic Git changes. A Markdown-only change under `d3d12/docs/` or to `d3d12/README.md` currently yields `docs-only=false` and `build=true`; the same change under top-level `docs/` yields `docs-only=true` and `build=false`. I tested narrow Markdown exclusions in both `git diff --no-renames` selectors. The three D3D12 documentation cases moved to the docs lane. Non-Markdown files under `d3d12/docs/`, a docs-plus-Rust change, mods, and a Rust file moved into docs all still selected the builds. The docs lane would also need the existing `CommandTest.test_the_tracked_switches_page_matches_the_sources` and `AdvancedModeTests.test_the_repositorys_list_reads_whole` checks for the D3D12 catalog. Both passed on the merged tree. I’m leaving this observation here while this PR owns the workflow changes. AI-assisted with OpenAI Codex.
fiestorra commented 2026-12-03 04:55:05 +00:00 (Migrated from github.com)

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


VERIFY-2930 — no aplica sobre main: conflicto en run_standalone_tests.py, y es un cambio de CI de hace siete días

Y lo primero que hay que decir es de medida, porque su diff contra main engaña: git diff origin/main...pr/2930 dice «58 files changed, 912 insertions, 9191 deletions», casi todo borrado, y eso no es lo que la PR hace — es lo que su base comun no tenia. Su cambio propio, medido con merge-base..head:

6 files changed, 184 insertions(+), 31 deletions(-)
  scripts/run_standalone_tests.py      | 15 +++++++-
  tests/test_ci_registration.py        |  1 +
  tests/test_run_standalone_tests.py   | 16 +++++++

Y sobre main de hoy, el cherry-pick da conflicto en scripts/run_standalone_tests.py — o sea que la herramiento de tests cambio desde su base y este PR la reescribe en parte.

Lo que el cambio hace: menos CI en un pull request — y con 184 lineas en la herramienta y sus tests, no es solo tocar un workflow.

Lo que no puedo verificar: el comportamiento resultante, porque el conflicto esta justo en el fichero que lo define — y resolverlo requiere saber que parte de run_standalone_tests.py es del PR y que parte llego a main despues. Eso es del autor.

Y una advertencia util para quien lo mire: en la interfaz de GitHub este PR aparece como «borra 9 191 lineas» — y no borra nada de eso. Es la deriva de su base, y un revisor que lea esa cifra sin mirar el merge-base va a rechazar un cambio de 184 lineas por un número que no es suyo. Es la trampa que las notas del repo ya tienen escrita sobre git diff origin/main..<ref> mezclando deriva con cambio propio — y aquí se ve en su forma más extrema.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7368180464 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2930#issuecomment-7368180464). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T04:55:05Z. --- ## VERIFY-2930 — **no aplica sobre `main`**: conflicto en `run_standalone_tests.py`, y es un cambio de CI de hace siete días **Y lo primero que hay que decir es de medida, porque su diff contra `main` engaña**: **`git diff origin/main...pr/2930` dice «58 files changed, 912 insertions, 9191 deletions»**, **casi todo borrado**, **y eso no es lo que la PR hace** — **es lo que su base comun no tenia.** **Su cambio propio, medido con `merge-base..head`**: ``` 6 files changed, 184 insertions(+), 31 deletions(-) scripts/run_standalone_tests.py | 15 +++++++- tests/test_ci_registration.py | 1 + tests/test_run_standalone_tests.py | 16 +++++++ ``` **Y sobre `main` de hoy, el `cherry-pick` da conflicto en `scripts/run_standalone_tests.py`** — **o sea que la herramiento de tests cambio desde su base y este PR la reescribe en parte.** **Lo que el cambio hace**: **menos CI en un pull request** — **y con 184 lineas en la herramienta y sus tests, no es solo tocar un workflow.** **Lo que no puedo verificar**: **el comportamiento resultante**, **porque el conflicto esta justo en el fichero que lo define** — **y resolverlo requiere saber que parte de `run_standalone_tests.py` es del PR y que parte llego a `main` despues.** **Eso es del autor.** **Y una advertencia util para quien lo mire**: **en la interfaz de GitHub este PR aparece como «borra 9 191 lineas»** — **y no borra nada de eso.** **Es la deriva de su base, y un revisor que lea esa cifra sin mirar el `merge-base` va a rechazar un cambio de 184 lineas por un número que no es suyo.** **Es la trampa que las notas del repo ya tienen escrita sobre `git diff origin/main..<ref>` mezclando deriva con cambio propio** — **y aquí se ve en su forma más extrema.**
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2930:upstream-pr/2930'
git switch 'upstream-pr/2930'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2930'
git switch 'upstream-pr/2930'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2930'
git switch 'upstream-pr/2930'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2930'
git switch 'main'
git merge --squash 'upstream-pr/2930'
git switch 'main'
git merge --ff-only 'upstream-pr/2930'
git switch 'main'
git merge 'upstream-pr/2930'
git push origin 'main'
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!2930
No description provided.