Repository navigation
Conversation
… (D3D12-GAME-ABBA) The runner takes the order from d3d12_ab_compare.py plan (warm-up runs, discarded runs, then ABBA pairs) and runs each slot through scripts/game-gate.ps1, for one exe with two settings or for two builds (a checkout and a data folder per arm). Each measured run is checked by the new `d3d12_ab_compare.py check`: its gate passed, the pipeline cache was warm before the measured window, its exe is its arm's first one, and its arm's own settings show in the runtime's settings line when there is one. A run that fails gets an ab-excluded.txt, which `abba` now leaves out, and its slot runs again (-Retry, 1). The runner ends with the comparison in <Out>/comparison.txt and comparison.json, and abba.json says what ran and what was left out. -DryRun prints the plan and the gate commands. It needs PowerShell 7 (#Requires).
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12, head MEASURED
READ IN CODE
ASSUMED
AI-assisted: Claude Code |
|
Verified on Windows, with the control that matters: the tests fail when the change is reverted. Cherry-picked onto
So the new tests are tied to the change and not to each other's fixtures. No part of this needed a GPU, a display or game data, which is what the gate tests are built for. What I could not test: the script against a real run folder - AI-assisted: yes - DeepSeek v4.1 (flash), applied and ran both arms on the machine above. Written with an AI assistant. |
KelboLive
left a comment
There was a problem hiding this comment.
Verified with pwsh here: 6/6 test_game_abba.py, 18/18 test_d3d12_ab_compare.py, 21/21 test_game_gate.py. The dry runs and a stub-gate end-to-end run confirm the shape — warm-up A, warm-up B, the discarded run(s), then A,B,B,A — a failed measured run is left out and retried, and comparison.txt/json + abba.json are written. plan (tools/d3d12_ab_compare.py:268-275) alternates A,B / B,A and abba requires an even A-first count (:170-172), so a synthetic 1 ms/run drift yields effect 0.00 under ABBA, and an ABAB order is rejected as unbalanced (the linear-trend fallback also gives 0).
One real failure-path bug: a re-run into the same -Out keeps a stale ab-excluded.txt. Labels are deterministic, the gate reuses the folder (New-Item -ItemType Directory -Force), and scripts/game-abba.ps1:112 only writes the exclusion. In the stub run, the first invocation's 06-measured-B failed and was excluded; the second invocation's 06-measured-B passed, but comparison.txt still said left out (excluded: gate FAIL) while abba.json said left_out: null — the record and the comparison disagree and a good run is silently dropped. Remove $dir (or at least its exclusion file) before each attempt, or require a fresh -Out. The previous run's data copy is left behind the same way.
Two smaller ones:
- In two-build mode
-Outinside the runner's checkout is accepted: the guard (:65-67) loops only-CheckoutA/-CheckoutB; add$repo. I passed-Outinside the runner's tree and the dry run was happy. - A failed warm-up or discarded run is neither checked nor retried, so a broken environment runs every measured slot (about an hour) before failing with "not enough runs". Fail fast on a warm-up gate failure.
Coverage: all six tests are dry runs or refusals — deleting the ab-excluded.txt write keeps them green, so the gate/check/retry/output path is untested. A stub game-gate.ps1 writing run.json/summary.json (the shape tests/test_game_gate.py's Fake already uses) would cover it and the stale-file case. Also abba.json records schema/builds/pairs/runs but not -MoreA/-MoreB/-PlayArgs, so the arms' inputs live only in the run folders.
|
I checked This is a portability note for Linux dry runs. The native Windows verification in the other comments covers the supported launch path. AI-assisted with OpenAI Codex. |
Claimed in the coordination issue as: D3D12-GAME-ABBA (#2570 (comment))
What and why
An A/B between separate runs needs a balanced order, warm caches, the same exe throughout, and every run checked before it counts. Testers still do this by hand, one gate run at a time. This adds the runner that #2783's
planandabbawere written for:scripts/game-abba.ps1takes the order fromd3d12_ab_compare.py plan: warm-up runs of each arm, then discarded runs, then-Pairspairs in ABBA order. It runs each slot throughscripts/game-gate.ps1(d3d12: an in-game gate: one command, one run folder, one summary.json (D3D12-GAME-GATE) #2782).-Data,-MoreA,-MoreB.-CheckoutA,-DataA,-CheckoutB,-DataB. Each arm runs its own checkout's gate and exe, with a data folder of its own, because the caches differ.d3d12_ab_compare.py checkchecks each measured run. A run counts only if all of these hold:-MoreA/-MoreBsettings show in the runtime's settings line (d3d12: a run logs the LEONIDA_ settings it starts with (D3D12-RUN-SETTINGS-LINE) #2775), when the run has one. A value the line hides counts as shown.ab-excluded.txt, whichabbanow leaves out, and its slot runs again (-Retry, 1).abbainto<Out>/comparison.txtandcomparison.json.abba.jsonrecords what ran, which exe, and what was left out and why.-DryRunprints the plan and every gate command without starting anything.-Outinside a checkout.#Requires -Version 7.0).docs/measuring_fps.md(section 3) anddocs/game_gate.mddescribe it.Tested
On Windows 11 Pro 10.0.26300:
tests/test_game_abba.py, 6 tests: the switch-mode plan and per-arm settings, the two-build plan with each arm's own gate and data, the refusals and-Outinside a checkout (all through-DryRunin pwsh), the PowerShell 7 line, and a parameter-name check (PowerShell ignores case).tests/test_d3d12_ab_compare.py, 18 tests. They include the new ones forcheck(a good run; each reason to leave a run out; the JSON output) and for an excluded run being left out byabba.test_game_gate.py,test_tool_stdout_encoding.py,test_ci_registration.py, the docs tests,scripts/check_no_game_data.pyon the changed files, andgit diff --checkare clean.main8f41d7d code: a null A/B,LEONIDA_FPS_LINE=1against=0(the top-left frame-rate line). One exe with two settings, 4 pairs, 120 s in the world per run, with the driver mod from mods: gate_driver takes a run from the menus into the world (D3D12-GATE-DRIVER-MOD) #2784 enabled through-More.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140, Windows 11 Pro 10.0.26300
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)