game-abba: pass the gate's memory stops to every gate run (D3D12-GAME-ABBA-MEMORY-STOP) #3305
Open
github-bot
wants to merge 3 commits from
github-bot/gh-3305 into main
AGit
pull from: github-bot/gh-3305
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3305
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3305"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@OtavMacedo on GitHub · 2026-12-03 07:16 UTC · original
OtavMacedo:d3d12-game-abba-memory-stop→main· +110 −16 · 3 files · 3 commits · openClaimed in the coordination issue as: D3D12-GAME-ABBA-MEMORY-STOP (#2570)
What and why
scripts/game-gate.ps1has three memory stops (-StopPrivateMB,-StopCommitLeftMB,-StopOverBudgetSeconds, docs/game_gate.md), butscripts/game-abba.ps1could not pass them on, so every ABBA gate run took the gate's defaults.On a PC with 16 GB of memory the default private-bytes cap is
min(0.9 x commit limit, 1.25 x RAM), which is 20,382 MB here. That is under what the title holds in the world, so the measured runs fail their gate bymemory_stopand the runner never reaches a comparison. The numbers are in the finding in #2570 (#2570). For example, a Series X run went over the cap 16.7 s into the world (20,769 MB private), with 4,956 MB still free to commit. MEASURED, n=1 for Series X at the default cap. The cap is there for a reason (two Windows crashes at about 100 GB private), so the fix is to let the caller set it, not to change the default.The change:
game-abba.ps1takes-StopPrivateMB,-StopCommitLeftMBand-StopOverBudgetSeconds. Only the ones given go to every gate run of both arms (warm-up, discarded, measured, retries). A stop left out keeps the gate's own default: an unbound[int]would be 0, which means "off" to the gate.abba.jsonrecords them as given inmemory_stops({}when none is given). Each run'srun.jsonalready has the values the gate used.-DryRunprints them on each gate command.aa75f1319) is refused before any run. Without this, that arm's first run would fail after the other arm's warm-up, with an error that does not say why.docs/measuring_fps.mdsection 3 and the script's header describe all of the above.Tested
tests/test_game_abba.py: 27 tests pass on Windows 11 with PowerShell 7. The stand-in gate now accepts the three stops and logs which ones were bound. Four new tests:-StopCommitLeftMB, and are recorded;memory_stopsis{};-DryRuntest of the printed plan.python -I scripts/red_green.py d3d12-game-abba-memory-stop --no-cargo. Base origin/maind9b618f10. The 4 new tests are red, then green; 23 tests pass on both sides.tests/test_docs_*.py: all pass.python -I scripts/check_no_game_data.py: passes.LEONIDA_WINDOWS_BAR_MB=3072against0, Series X-Resolution 1080 -NoFrameGen, 300 s in the world, 4 pairs) is running with the runner from the first commit and-StopPrivateMB 27000 -StopOverBudgetSeconds 0. Both warm-ups PASS, with the stops on the gate's command line. The data for #3035 will follow there once the comparison is done. On this PC the measured runs fail their gate without-StopPrivateMB.The change was reviewed by a separate read-only Claude Opus 5.5 agent before this pull request. It found nothing blocking. Fixed from its review: the older-gate refusal, test-comment wording (a negative
-StopOverBudgetSecondsmeans off, not the default), a-DryRuntest, thememory_stops-as-given note, and line wrapping.GPUs tested: NVIDIA GeForce RTX 3070 8 GB desktop, driver 621.24, Windows 11, 16 GB RAM (profile M). Runner change; no GPU code.
AI-assisted: yes, Claude Code (Claude Opus 5.5); reviewer: separate read-only Claude Opus 5.5 agent
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
@merzleckeier on GitHub · 2026-12-03 07:18 UTC · original · requested changes
[P2] Check the gate's declared parameters before clearing earlier results. At
f1829698,scripts/game-abba.ps1:164–166searches the entire script for$StopOverBudgetSeconds. A comment or local variable can match even when the gate has no such parameter.I reproduced this with the PR's synthetic gate fixture on
d9b618f1plusf1829698. Arm B's gate lacked-StopOverBudgetSecondsand mentioned$StopOverBudgetSecondsonce in a comment. I seeded a successful previous comparison, then reran in two-build mode with-StopOverBudgetSeconds 0. The preflight let the run through, the runner removed the previous comparison, arm A completed one warm-up, and arm B's binder then rejected the option.Reading
Parser.ParseFile(...).ParamBlock.Parametersin the same preflight rejected the same fixture before either arm started and preserved the previous comparison byte-for-byte. The three existing forwarding, omission and missing-parameter tests also passed when I ran the synthetic fixture under Linux PowerShell 7.7.0. AI-assisted with OpenAI Codex.@fiestorra on GitHub · 2026-12-03 07:26 UTC · original
VERIFY-3305 — 27 tests en verde (97 s), y el cambio es de la herramienta que mide A/B
Y el título es preciso: «pass the gate's memory stops to every gate run» — el gate es el A/B que compara
maincon una rama, y sus topes de memoria (losLEONIDA_*que limitan cuánta memoria puede usar el título) no se estaban pasando a todas las corridas.Por qué eso invalida una medida, y no es un detalle: si la corrida A va con un tope y la B sin él, la diferencia de fps entre las dos puede ser el tope y no el cambio. Es el mismo error que un control mal puesto, en una herramienta cuyo único propósito es comparar.
Y
docs/measuring_fps.mdcambia con él, que es la señal de que el procedimiento documentado también cambia — bien: una herramienta de medida que cambia sin que cambie su documentación deja dos procedimientos en el repositorio.Lo que verifiqué: los 27 tests del fichero, en su árbol.
Lo que no: una corrida A/B de verdad — necesita el juego, dos compilaciones y una hora; lo que el test cubre es que los parámetros llegan a las dos corridas, que es exactamente la mitad que se puede probar sin jugar.
Y una nota sobre el tiempo: 97 segundos para 27 tests — arranca procesos, como
test_docs_cli_flags(34 s para 4) ytest_red_green(86 s para 42). Los tres son de las herramientas, no del juego, y son los más lentos por test del repositorio: merece la pena saberlo antes de meterlos en un bucle de CI.@lixonik on GitHub · 2026-12-03 07:40 UTC · original · edited 2026-12-03 07:46 UTC
Windows native check (partial -- PowerShell 7 /
pwshtests skipped) on headf1829698c(merged cleanly viagit merge --no-ffontomaind9b618f10).Checks (Windows 10 x64, Python 3.12, Windows PowerShell 5.1)
python -I scripts/check_no_game_data.py-> PASSpython -I tests/test_game_abba.py -v->Ran 4 tests in 0.003s/OK (skipped=23)(the 23 PowerShell subtests skipped on this host, so theredcontrol did not exercise the changed PowerShell paths; reporting transparently rather than claiming ared -> greenpass).AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@OtavMacedo on GitHub · 2026-12-03 08:20 UTC · original
@merzleckeier thanks, you're right. Fixed in
7a36c1a87: the preflight now reads the gate's declared parameters with[System.Management.Automation.Language.Parser]::ParseFile(...).ParamBlock.Parameters, as you did, instead of searching the text.The test's gate now lacks
-StopOverBudgetSeconds, but names$StopOverBudgetSecondsin a comment and assigns it as a variable. It must be refused before any run, withrunsand the earliercomparison.jsonunchanged byte for byte.Red and green on this machine:
f1829698c: that test fails. The runner let it through, and the warm-up's gate refused the parameter (the gate did not start 01-warm-up-A).check_no_game_data.pypasses.On what the gate is (re the VERIFY note):
scripts/game-gate.ps1is one supervised game run with a PASS/FAIL verdict, not an A/B ofmainagainst a branch. Its memory stops are its own parameters (-StopPrivateMB,-StopCommitLeftMB,-StopOverBudgetSeconds), notLEONIDA_*settings. Before this PR both arms took the same defaults, so the arms did not differ. The problem was that on a 16 GB PC every measured run failed its gate on those defaults.In-game use: the ABBA on #3035 (
LEONIDA_WINDOWS_BAR_MB3072 against 0) ran end to end with this runner (first-commit version) and-StopPrivateMB 27000 -StopOverBudgetSeconds 0: 12 gate runs, 1 left out and retried, verdict reached. Numbers on #3035.AI-assisted (Claude Code, Claude Opus 5.5).
@merzleckeier on GitHub · 2026-12-03 08:31 UTC · original · approved these changes
The preflight issue from my earlier review is resolved in
7a36c1a8, tested onmaind9b618f1. I ran five focused cases with synthetic gates and PowerShell 7.7.0 on Linux, enabling those cases in a local test copy. All five passed, including explicit zero and negative stop values, omitted stops, and the dry-run plan.In the two-checkout control, only B lacked the parameter and its name appeared in a comment. With the new head, the script identified B before either gate ran and preserved the existing comparison byte for byte. Restoring only the previous
f1829698runner let A warm up, removed the previous comparison, and then failed when B rejected the argument. The one-checkout regression also went red on that older runner.AI-assisted with OpenAI Codex.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.