Repository navigation
d3d12: an in-game gate: one command, one run folder, one summary.json (D3D12-GAME-GATE) - #2782
Conversation
… (D3D12-GAME-GATE) Testers ran in-game gates and A/Bs by hand on five machines, each with their own launcher wrapper and log parsers, and lost runs to consoles and key files. scripts/game-gate.ps1 runs leonida.exe through the checkout's play-d3d12.ps1 and writes one folder per run: run.json, launch.ps1, the -DryRun settings, the F1 settings file, the launcher's output (the precompile lines nobody kept), the runtime's log, events.jsonl and a copy of the tester's data template (their own saves are never touched). It stops the game with WM_SYSCOMMAND/SC_CLOSE (the runtime's own end: suspend, pipeline cache saved) once -WorldSeconds were spent in the world, on a STOP file or after -MaxMinutes, and kills it only 60 s later; it keeps the game's exit code. `start` runs the same detached (created through CIM, so an agent's or console's end does not end it); `stop` asks a run to end. tools/game_gate.py (standard library) reads the folder into summary.json (leonida-gate-summary/1): build, card, settings (the run's settings line, no paths), precompile counts, time to the world (two frame lines with 500 draws or more, cutscenes included), when the pipeline cache went warm (60 s with nothing being made), fps from the presents (median, p5, frame p95, end median, the first second under 2 frames, the longest gap with no frame), crashes by kind (device lost, panic, fault by module kind), exit, stop and a verdict: PASS needs 300 s in the world, no device loss, panic or fault, no gap over 10 s, alive at the stop. The testers' answers to a draft on the bridge are folded in. Its tests use synthetic logs and check that the runtime still writes what it reads.
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16,
AI-assisted: Claude Code |
…wn (review) test_docs_cli_flags read the -SeriesS -NoFrameGen inside -PlayArgs '...' in the fenced command as flags of game-gate.ps1. The block now shows a placeholder, and the text gives the example.
|
Thanks, OreoFR. Confirmed and fixed in the new head of this pull request.
|
test_docs_repo_paths failed: docs/measuring_fps.md named scripts/game-gate.ps1, which only ProjectLeonida#2782 adds. Name the game gate's run folders instead, here and in the tool's docstring.
|
Re-checked by OreoFR on the new head AI-assisted: Claude Code |
tests/test_tool_stdout_encoding.py (on main since this branch started) wants every tool's __main__ block to do it: under -I a redirected stdout is strict in the console's code page.
|
CI |
|
Re-checked by OreoFR on the new head AI-assisted: Claude Code |
|
Verified on Windows, and one thing the suite cannot currently tell apart: replacing What was run, at Control, compile level: with Control, behaviour level, and this is the finding: out["median"] = round(1000.0 / max(counted), 2) # was statistics.median(counted)
out["median"] = round(max(rates), 2) # was statistics.median(rates)Why it passes: every case writes frames at one constant rate, so for each fixture The smallest change that closes it: one case with a varying rate - say alternating 40 and 60 fps, or an even number of 40s and 60s - asserting The other numbers I checked are not affected - Two things I could not test here: the AI-assisted: yes - DeepSeek v4.1 (flash). The mutation is the point of the comment, not a verdict on the PR: the tool and its 20 passing tests are a solid addition. Written with an AI assistant. |
|
RUN (independent run on Windows, #2782 head be96bda, tested as it is; it merges cleanly into main d8ca182 per Commands, from the repository root,
In-game run on the RTX 3090: #2613's gate (head c6a8f71) run with Review notes (not blocking):
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40. |
…d (review) run.json's dirty leaves untracked files out; a new untracked count says how many there are. The first second under 2 frames counted from the world's first second, so the arrival's streaming dip was the run's; it now counts from 60 s in the world, like the median. The longest gap with no frame stays from the world on: a freeze on pipeline compiles comes right after arrival. The docs say both, and that world_at_s counts from the gate's start, the precompile included.
|
Thanks for the run and the mutants. The four notes, in 46ea666:
On Windows: |
|
Verified by MoonEyes (another person than the author) on head AI-assisted (Claude Code). |
|
Native Windows CLI handoff check with the merged A/B comparator from #2783. Tested
Synthetic logs only. This verifies the handoff and comparison arithmetic. AI-assisted with OpenAI Codex (GPT-6.2 Sol). |
|
Re-checked by OreoFR on the new head AI-assisted: Claude Code |
|
Merging. Head AI-assisted (Claude Code). |
|
Follow-up on #2782 head 46ea666, after my RUN on be96bda. It merges cleanly into main 407f71a. CI on 46ea666: all checks pass (wine skipped). The delta be96bda..46ea666 is one commit, and only the review points:
Commands, from the repository root,
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40. |
Claimed in the coordination issue as: D3D12-GAME-GATE (#2570 (comment))
What and why
In-game gates and A/Bs were run by hand on five machines (MoonEyes, OreoFR, enlighted, DadaCap, mine), each with its own launcher wrapper and log parsers. Runs were lost to agent consoles and to key files read while written. The precompile lines were never kept. Verdicts were written in free text.
This adds one command and one result format. The format was circulated on the bridge as a draft first, and the testers' answers are folded in.
scripts/game-gate.ps1 run|start|stoprunsleonida.exethrough this checkout'sscripts/play-d3d12.ps1, so a run is what players run, and writes one folder per run under-RunRoot:run.json,launch.ps1, the-DryRunsettings, and the F1 settings file when there is one;launcher.txt, the precompile lines;leonida.log, the runtime's log with one line per present;events.jsonl, what the gate did and saw;data\, a copy of the tester's data template, so their own saves are never touched;summary.json.WM_SYSCOMMAND/SC_CLOSEonce-WorldSeconds(300) were spent in the world, on a STOP file (stop), or after-MaxMinutes. That is the runtime's own end: the title is suspended and the pipeline cache saved. A plainWM_CLOSEdoes not end the title. It kills the game only 60 s later.startruns the same thing detached, created through CIM, so the end of an agent's or a console's job does not end the run. Asupervisor.logkeeps its output.tools/game_gate.py(standard library) turns the folder intosummary.json(leonida-gate-summary/1, described indocs/game_gate.md). It has:settingsline, d3d12: a run logs the LEONIDA_ settings it starts with (D3D12-RUN-SETTINGS-LINE) #2775, so no paths), precompile counts;Not in this one: a Lua driver for the menus, an ABBA runner, a time series, VRAM peaks, a "memory rising" warning, and the Vulkan runtime.
Tested
On Windows 11 Pro 10.0.26300:
tests/test_game_gate.py, 20 tests, all passing:They run in the standard-library CI loop.
test_docs_design_rows.py,test_ci_registration.py,check_no_game_data.pyandgit diff --checkare clean.In game, RTX 3080 10 GB, driver 32.0.16.2140, Series S profile,
main8f41d7d:present_gap(11.4 s without a frame during the compile storm), as intended for a cold run. This run found the variable trap, which is now fixed and tested.start, 300 s target: world at 85 s, 304 s in the world. Stopped with SC_CLOSE: exit 0 in 6 s, cache saved, title suspended. 26.9 fps median, p5 22.9, longest gap 0.39 s, no crash. PASS.stop35 s into the world: ERRORstopped_early, with a clean stop (exit 0, cache saved).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.docs/design.md, with how it was confirmed. (Not applicable: no translator change.)