d3d12: an in-game gate: one command, one run folder, one summary.json (D3D12-GAME-GATE) #2782

Merged
TheGeogeo merged 4 commits from upstream-pr/2782 into main 2026-11-30 21:21:34 +00:00
TheGeogeo commented 2026-11-30 19:40:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-30T19:40:25Z.


Claimed in the coordination issue as: D3D12-GAME-GATE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7288010093)

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|stop runs leonida.exe through this checkout's scripts/play-d3d12.ps1, so a run is what players run, and writes one folder per run under -RunRoot:
    • run.json, launch.ps1, the -DryRun settings, 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.
  • It refuses to run in three cases:
    • a run root inside a checkout;
    • a run already going;
    • a missing exe, which the play script would build inside the timed run.
  • It stops the game with WM_SYSCOMMAND/SC_CLOSE once -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 plain WM_CLOSE does not end the title. It kills the game only 60 s later.
  • It keeps the game's real exit code: 0x887A0005 means the device was lost.
  • start runs the same thing detached, created through CIM, so the end of an agent's or a console's job does not end the run. A supervisor.log keeps its output.
  • tools/game_gate.py (standard library) turns the folder into summary.json (leonida-gate-summary/1, described in docs/game_gate.md). It has:
    • build, card, driver, settings (from the run's settings line, #2775, so no paths), precompile counts;
    • the time to the world: two frame lines with 500 draws or more; cutscenes count;
    • when the pipeline cache went warm: 60 s with nothing being made and no wait run out;
    • fps from the presents: median, p5, frame p95, the end median, the first second under 2 frames, the longest gap with no frame;
    • crashes by kind: device lost (also an out-of-memory command list that did not close), panic, or fault by module kind, never names or addresses;
    • exit, stop and the verdict.
  • PASS needs all of these:
    • 300 s in the world;
    • no device loss, panic, or fault before the stop;
    • no gap over 10 s without a presented frame, so a run frozen on pipeline compiles does not pass (DadaCap's case);
    • the game alive at the stop.
  • ERROR covers a STOP file before the time, menus only at the time limit, and a relaunch.

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:

    • the parser on synthetic run folders, which the tests write in the runtime's formats with no game data: PASS, device loss by exit code and by report, out-of-memory list close, panic with the title alive, menus only, STOP before the time, too little world time, frozen on compiles, dying before the stop, warm cache with dropped draws, percentiles, frame-line fallback, ANSI colour, title watchdog, settings and precompile lines, no path in the summary;
    • a contract test: every runtime string the parser reads is still in the source;
    • a script check: no variable reuses a parameter's name in another case. That PowerShell trap turned the game process into a string here during validation.

    They run in the standard-library CI loop.

  • test_docs_design_rows.py, test_ci_registration.py, check_no_game_data.py and git diff --check are clean.

  • In game, RTX 3080 10 GB, driver 32.0.16.2140, Series S profile, main 8f41d7d01:

    • R0, the first start after the translator change. Precompile: 74 s translating, 3,049 pipelines warmed in 334 s. The world came at 504 s. Verdict FAIL 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.
    • R1, warm, detached 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.
    • R2, warm, stopped with stop 35 s into the world: ERROR stopped_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

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. The data template and the run folders stay outside the checkout. The summary holds numbers and switch names only.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator change.)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5572452824 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-30T19:40:25Z. --- Claimed in the coordination issue as: D3D12-GAME-GATE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7288010093) ### 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|stop` runs `leonida.exe` through this checkout's `scripts/play-d3d12.ps1`, so a run is what players run, and writes one folder per run under `-RunRoot`: - `run.json`, `launch.ps1`, the `-DryRun` settings, 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`. - It refuses to run in three cases: - a run root inside a checkout; - a run already going; - a missing exe, which the play script would build inside the timed run. - It stops the game with `WM_SYSCOMMAND`/`SC_CLOSE` once `-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 plain `WM_CLOSE` does not end the title. It kills the game only 60 s later. - It keeps the game's real exit code: 0x887A0005 means the device was lost. - `start` runs the same thing detached, created through CIM, so the end of an agent's or a console's job does not end the run. A `supervisor.log` keeps its output. - `tools/game_gate.py` (standard library) turns the folder into `summary.json` (`leonida-gate-summary/1`, described in `docs/game_gate.md`). It has: - build, card, driver, settings (from the run's `settings` line, #2775, so no paths), precompile counts; - the time to the world: two frame lines with 500 draws or more; cutscenes count; - when the pipeline cache went warm: 60 s with nothing being made and no wait run out; - fps from the presents: median, p5, frame p95, the end median, the first second under 2 frames, the longest gap with no frame; - crashes by kind: device lost (also an out-of-memory command list that did not close), panic, or fault by module kind, never names or addresses; - exit, stop and the verdict. - **PASS** needs all of these: - 300 s in the world; - no device loss, panic, or fault before the stop; - no gap over 10 s without a presented frame, so a run frozen on pipeline compiles does not pass (DadaCap's case); - the game alive at the stop. - **ERROR** covers a STOP file before the time, menus only at the time limit, and a relaunch. 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: - the parser on synthetic run folders, which the tests write in the runtime's formats with no game data: PASS, device loss by exit code and by report, out-of-memory list close, panic with the title alive, menus only, STOP before the time, too little world time, frozen on compiles, dying before the stop, warm cache with dropped draws, percentiles, frame-line fallback, ANSI colour, title watchdog, settings and precompile lines, no path in the summary; - a contract test: every runtime string the parser reads is still in the source; - a script check: no variable reuses a parameter's name in another case. That PowerShell trap turned the game process into a string here during validation. They run in the standard-library CI loop. - `test_docs_design_rows.py`, `test_ci_registration.py`, `check_no_game_data.py` and `git diff --check` are clean. - In game, RTX 3080 10 GB, driver 32.0.16.2140, Series S profile, `main` 8f41d7d01: - **R0**, the first start after the translator change. Precompile: 74 s translating, 3,049 pipelines warmed in 334 s. The world came at 504 s. Verdict FAIL `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. - **R1**, warm, detached `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**. - **R2**, warm, stopped with `stop` 35 s into the world: **ERROR** `stopped_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 - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. The data template and the run folders stay outside the checkout. The summary holds numbers and switch names only. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: no translator change.)
OreoFR commented 2026-11-30 19:45:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T19:45:34Z.


Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16, main 51dbc5b58 merged with head b535fb0dc.

  • MEASURED, green: tests/test_game_gate.py 20 passed; python -I tests/test_game_gate.py OK. Red (main + only the test): 1 error at import, as expected for a new tool.
  • python -I scripts/check_no_game_data.py on tools/game_gate.py, tests/test_game_gate.py, docs/game_gate.md: clean.
  • MEASURED, one docs test fails with this PR (passes on main: tests/test_docs_*.py 57 passed there): tests/test_docs_cli_flags.py::DocsCliFlags::test_fenced_commands_use_the_flags_of_their_tool, ('docs/game_gate.md:19', 'scripts/game-gate.ps1', '-NoFrameGen'). Line 19 shows -PlayArgs '-SeriesS -NoFrameGen': those are the game's flags inside a string, but the checker reads -NoFrameGen as a flag of game-gate.ps1, which has no such parameter. The check job should hit the same failure. Possible fixes: show the game flags outside the fenced command (in the prose or a separate block), or a placeholder such as -PlayArgs '<game flags>'.
  • Not covered: scripts/game-gate.ps1 itself (needs PowerShell and the game).

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7289896513 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7289896513). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T19:45:34Z. --- Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16, `main` `51dbc5b58` merged with head `b535fb0dc`. - MEASURED, green: `tests/test_game_gate.py` **20 passed**; `python -I tests/test_game_gate.py` OK. Red (`main` + only the test): 1 error at import, as expected for a new tool. - `python -I scripts/check_no_game_data.py` on `tools/game_gate.py`, `tests/test_game_gate.py`, `docs/game_gate.md`: clean. - **MEASURED, one docs test fails with this PR** (passes on `main`: `tests/test_docs_*.py` 57 passed there): `tests/test_docs_cli_flags.py::DocsCliFlags::test_fenced_commands_use_the_flags_of_their_tool`, `('docs/game_gate.md:19', 'scripts/game-gate.ps1', '-NoFrameGen')`. Line 19 shows `-PlayArgs '-SeriesS -NoFrameGen'`: those are the game's flags inside a string, but the checker reads `-NoFrameGen` as a flag of `game-gate.ps1`, which has no such parameter. The `check` job should hit the same failure. Possible fixes: show the game flags outside the fenced command (in the prose or a separate block), or a placeholder such as `-PlayArgs '<game flags>'`. - Not covered: `scripts/game-gate.ps1` itself (needs PowerShell and the game). AI-assisted: Claude Code
TheGeogeo commented 2026-11-30 19:52:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-30T19:52:11Z.


Thanks, OreoFR. Confirmed and fixed in the new head of this pull request.

tests/test_docs_cli_flags.py read the -SeriesS -NoFrameGen inside -PlayArgs '...' in the fenced command of docs/game_gate.md as flags of game-gate.ps1. The block now shows -PlayArgs '<play-d3d12.ps1 switches>', and the text gives -SeriesS -NoFrameGen as the example.

test_docs_cli_flags.py, test_game_gate.py (20) and test_docs_design_rows.py pass. Only docs/game_gate.md changed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7290057245 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7290057245). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-30T19:52:11Z. --- Thanks, OreoFR. Confirmed and fixed in the new head of this pull request. `tests/test_docs_cli_flags.py` read the `-SeriesS -NoFrameGen` inside `-PlayArgs '...'` in the fenced command of `docs/game_gate.md` as flags of `game-gate.ps1`. The block now shows `-PlayArgs '<play-d3d12.ps1 switches>'`, and the text gives `-SeriesS -NoFrameGen` as the example. `test_docs_cli_flags.py`, `test_game_gate.py` (20) and `test_docs_design_rows.py` pass. Only `docs/game_gate.md` changed.
OreoFR commented 2026-11-30 19:57:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T19:57:59Z.


Re-checked by OreoFR on the new head 22e096e47 merged with main 0f86bd594 (macOS 27.2.1, Apple M5, Python 3.12.16): tests/test_game_gate.py 20 passed; tests/test_docs_*.py 57 passed, 134 subtests passed (the test_docs_cli_flags failure is gone); check_no_game_data.py on the three changed files: clean. scripts/game-gate.ps1 itself is not covered here (needs PowerShell and the game).

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7290205071 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7290205071). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T19:57:59Z. --- Re-checked by OreoFR on the new head `22e096e47` merged with `main` `0f86bd594` (macOS 27.2.1, Apple M5, Python 3.12.16): `tests/test_game_gate.py` 20 passed; `tests/test_docs_*.py` **57 passed, 134 subtests passed** (the `test_docs_cli_flags` failure is gone); `check_no_game_data.py` on the three changed files: clean. `scripts/game-gate.ps1` itself is not covered here (needs PowerShell and the game). AI-assisted: Claude Code
TheGeogeo commented 2026-11-30 20:30:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-30T20:30:04Z.


CI check and linux-python-and-viewer failed on tests/test_tool_stdout_encoding.py: tools/game_gate.py's __main__ block did not set errors="replace" on stdout (that test came to main after this branch). Fixed in be96bdade with the same guard as tools/d3d12_run_fps.py. On Windows: test_tool_stdout_encoding.py OK, test_game_gate.py 20 OK, merge with current main clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291021083 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291021083). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-30T20:30:04Z. --- CI `check` and `linux-python-and-viewer` failed on `tests/test_tool_stdout_encoding.py`: `tools/game_gate.py`'s `__main__` block did not set `errors="replace"` on stdout (that test came to `main` after this branch). Fixed in be96bdade with the same guard as `tools/d3d12_run_fps.py`. On Windows: `test_tool_stdout_encoding.py` OK, `test_game_gate.py` 20 OK, merge with current `main` clean.
OreoFR commented 2026-11-30 20:34:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T20:34:36Z.


Re-checked by OreoFR on the new head be96bdade merged with main d8ca18240 (macOS 27.2.1, Apple M5, Python 3.12.16): tests/test_game_gate.py 20 passed; tests/test_tool_stdout_encoding.py 4 passed (the new stdout guard); tests/test_docs_*.py 57 passed.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291141851 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291141851). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T20:34:36Z. --- Re-checked by OreoFR on the new head `be96bdade` merged with `main` `d8ca18240` (macOS 27.2.1, Apple M5, Python 3.12.16): `tests/test_game_gate.py` 20 passed; `tests/test_tool_stdout_encoding.py` 4 passed (the new stdout guard); `tests/test_docs_*.py` 57 passed. AI-assisted: Claude Code
fiestorra commented 2026-11-30 20:47:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T20:47:58Z.


Verified on Windows, and one thing the suite cannot currently tell apart: replacing statistics.median() with max() in parse_frames leaves all 20 tests passing.

What was run, at d60df1525 cherry-picked onto main d8ca18240 in a clean worktree, Python 3.13.14:

python -m pytest tests/test_game_gate.py -q      20 passed in 2.24s

Control, compile level: with tools/game_gate.py removed the suite does not collect (ImportError on the test module), so the tests are bound to the tool.

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)
python -m pytest tests/test_game_gate.py -q      20 passed in 2.08s

Why it passes: every case writes frames at one constant rate, so for each fixture median == max == mean. assertEqual(s["fps"]["median"], 50.0) is satisfied by any of the three, and median (L291, L311) is therefore not tested as a median.

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 median == 50 while the maximum is 60. That single case makes the mutation above fail, and it is the case a real run produces anyway, since a title does not hold one frame rate.

The other numbers I checked are not affected - world_at_s == 70.0, fps.source == "presents", the exit code, cache_saved and crash.kind all moved when I mutated what feeds them, so the gap is specific to the rate statistics.

Two things I could not test here: the game-gate.ps1 launcher (it drives a real run folder and this is not the machine for it) and anything that needs game data - both are outside the no-game-data boundary this suite is built for.

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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291485678 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291485678). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T20:47:58Z. --- **Verified on Windows, and one thing the suite cannot currently tell apart: replacing `statistics.median()` with `max()` in `parse_frames` leaves all 20 tests passing.** **What was run**, at `d60df1525` cherry-picked onto `main` `d8ca18240` in a clean worktree, Python 3.13.14: ``` python -m pytest tests/test_game_gate.py -q 20 passed in 2.24s ``` **Control, compile level:** with `tools/game_gate.py` removed the suite does not collect (`ImportError` on the test module), so the tests are bound to the tool. **Control, behaviour level, and this is the finding:** ```python out["median"] = round(1000.0 / max(counted), 2) # was statistics.median(counted) out["median"] = round(max(rates), 2) # was statistics.median(rates) ``` ``` python -m pytest tests/test_game_gate.py -q 20 passed in 2.08s ``` **Why it passes: every case writes frames at one constant rate**, so for each fixture `median == max == mean`. **`assertEqual(s["fps"]["median"], 50.0)` is satisfied by any of the three**, and `median` (L291, L311) is therefore not tested as a median. **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 `median == 50` while the maximum is 60.** **That single case makes the mutation above fail**, and it is the case a real run produces anyway, since a title does not hold one frame rate. **The other numbers I checked are not affected** - `world_at_s == 70.0`, `fps.source == "presents"`, the exit code, `cache_saved` and `crash.kind` all moved when I mutated what feeds them, so the gap is specific to the rate statistics. **Two things I could not test here:** the **`game-gate.ps1` launcher** (it drives a real run folder and this is not the machine for it) and **anything that needs game data** - both are outside the `no-game-data` boundary this suite is built for. **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.
enlight3d commented 2026-11-30 20:53:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-30T20:53:43Z.


RUN (independent run on Windows, #2782 head be96bdade, tested as it is; it merges cleanly into main d8ca18240 per git merge-tree --write-tree. CI on be96bdade: change-scope, check, linux-gpu-tools, linux-python-and-viewer, no-game-data, semantic-tests and windows pass; wine skipped. Since b535fb0dc, the first head I tested, only docs/game_gate.md (one line) and the stdout guard in tools/game_gate.py's __main__ block (4 lines) changed; scripts/game-gate.ps1 is identical.)

Commands, from the repository root, python -I (Python 3.13.12), at low priority:

  • python -I -m unittest discover -s tests -p test_game_gate.py on be96bdade: 20 tests OK (the synthetic logs, plus the contract test that the runtime still writes the lines the parser reads).
  • python -I -m unittest discover -s tests -p test_tool_stdout_encoding.py on be96bdade: 4 tests OK.
  • Red, import: on main with only the PR's test file added, the module does not import (ImportError, no game_gate).
  • Red, behavioural, one mutant per PASS/FAIL rule, with the tests kept (on b535fb0dc; the gap mutant again on be96bdade). Each one fails tests:
    • present gap checked against 1000 x GAP_FAIL_S: test_a_run_frozen_on_a_compile_fails_though_alive fails;
    • world time never short (world_s < 0): test_too_little_world_time_at_the_time_limit_fails and test_a_stop_file_before_the_world_time_is_an_error fail;
    • device loss not a failure: test_a_lost_device_fails_by_its_exit_code_and_its_report and test_an_out_of_memory_list_close_counts_as_a_lost_device fail;
    • panic not a failure: test_a_panic_fails_even_with_the_title_alive fails;
    • exit before the stop not a failure: test_dying_before_the_stop_fails fails.
  • scripts/game-gate.ps1 parses with no error in Windows PowerShell 5.1 and in PowerShell 7 ([System.Management.Automation.Language.Parser]::ParseFile).
  • Neighbours, since docs/README.md changes: test_i18n_index.py 9 OK and test_docs_design_rows.py 5 OK.

In-game run on the RTX 3090: #2613's gate (head c6a8f7164) run with scripts/game-gate.ps1 -WorldSeconds 600 -MaxMinutes 20, -SeriesS -NoDlss -NoFrameGen, Enter through a keys file until the world. The tool gave PASS, no device loss, no crash, exit 0x0 'clean', stopped by the window close (no kill, cache saved), save copied into the run folder. Against my own sampler on the same run: seconds in the world 607.9 vs 608; device loss, crash and exit code agree; fps median 11.2 (tool, presents after world+60 s) vs 10.1 (runtime fps lines from the world on), consistent given the different bases. (That run used 22e096e47; game-gate.ps1 is the same there, and game_gate.py differs only by the 4-line stdout guard.)

Review notes (not blocking):

  1. run.json said dirty: false while two untracked files had been copied into the worktree. The script uses git status --porcelain --untracked-files=no (game-gate.ps1 line 122), so untracked files are left out on purpose or by accident. Worth a word in docs/game_gate.md, or a separate field.
  2. world_at_s counts from the start of the run, precompile included: 347 s in that run, about 276 s of it precompile. So it is not the game's own time to the world. Worth documenting, or a second field from the game's start.
  3. under_2_at_s came out at 356 s, 9 s after arrival, on a loading dip. The scan starts at the second the world is reached (fps_block, from int(world)), not at warm_at_s or at world+60 s like the median. Counting it from warm_at_s would say more. The longest present gap is also measured from the world on, so a long load hitch right after arrival can fail a run on present_gap.
  4. No VRAM figures and no REAPING lines in the summary, as we said before.

Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291619665 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291619665). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-30T20:53:43Z. --- RUN (independent run on Windows, #2782 head be96bdade, tested as it is; it merges cleanly into main d8ca18240 per `git merge-tree --write-tree`. CI on be96bdade: change-scope, check, linux-gpu-tools, linux-python-and-viewer, no-game-data, semantic-tests and windows pass; wine skipped. Since b535fb0dc, the first head I tested, only `docs/game_gate.md` (one line) and the stdout guard in `tools/game_gate.py`'s `__main__` block (4 lines) changed; `scripts/game-gate.ps1` is identical.) Commands, from the repository root, `python -I` (Python 3.13.12), at low priority: - `python -I -m unittest discover -s tests -p test_game_gate.py` on be96bdade: 20 tests OK (the synthetic logs, plus the contract test that the runtime still writes the lines the parser reads). - `python -I -m unittest discover -s tests -p test_tool_stdout_encoding.py` on be96bdade: 4 tests OK. - Red, import: on main with only the PR's test file added, the module does not import (`ImportError`, no `game_gate`). - Red, behavioural, one mutant per PASS/FAIL rule, with the tests kept (on b535fb0dc; the gap mutant again on be96bdade). Each one fails tests: - present gap checked against 1000 x `GAP_FAIL_S`: `test_a_run_frozen_on_a_compile_fails_though_alive` fails; - world time never short (`world_s < 0`): `test_too_little_world_time_at_the_time_limit_fails` and `test_a_stop_file_before_the_world_time_is_an_error` fail; - device loss not a failure: `test_a_lost_device_fails_by_its_exit_code_and_its_report` and `test_an_out_of_memory_list_close_counts_as_a_lost_device` fail; - panic not a failure: `test_a_panic_fails_even_with_the_title_alive` fails; - exit before the stop not a failure: `test_dying_before_the_stop_fails` fails. - `scripts/game-gate.ps1` parses with no error in Windows PowerShell 5.1 and in PowerShell 7 (`[System.Management.Automation.Language.Parser]::ParseFile`). - Neighbours, since `docs/README.md` changes: `test_i18n_index.py` 9 OK and `test_docs_design_rows.py` 5 OK. In-game run on the RTX 3090: #2613's gate (head c6a8f7164) run with `scripts/game-gate.ps1 -WorldSeconds 600 -MaxMinutes 20`, `-SeriesS -NoDlss -NoFrameGen`, Enter through a keys file until the world. The tool gave PASS, no device loss, no crash, exit 0x0 'clean', stopped by the window close (no kill, cache saved), save copied into the run folder. Against my own sampler on the same run: seconds in the world 607.9 vs 608; device loss, crash and exit code agree; fps median 11.2 (tool, presents after world+60 s) vs 10.1 (runtime fps lines from the world on), consistent given the different bases. (That run used 22e096e47; `game-gate.ps1` is the same there, and `game_gate.py` differs only by the 4-line stdout guard.) Review notes (not blocking): 1. `run.json` said `dirty: false` while two untracked files had been copied into the worktree. The script uses `git status --porcelain --untracked-files=no` (`game-gate.ps1` line 122), so untracked files are left out on purpose or by accident. Worth a word in `docs/game_gate.md`, or a separate field. 2. `world_at_s` counts from the start of the run, precompile included: 347 s in that run, about 276 s of it precompile. So it is not the game's own time to the world. Worth documenting, or a second field from the game's start. 3. `under_2_at_s` came out at 356 s, 9 s after arrival, on a loading dip. The scan starts at the second the world is reached (`fps_block`, from `int(world)`), not at `warm_at_s` or at world+60 s like the median. Counting it from `warm_at_s` would say more. The longest present gap is also measured from the world on, so a long load hitch right after arrival can fail a run on `present_gap`. 4. No VRAM figures and no REAPING lines in the summary, as we said before. Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
TheGeogeo commented 2026-11-30 20:58:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-30T20:58:47Z.


Thanks for the run and the mutants. The four notes, in 46ea66693:

  1. Untracked files. dirty stays "a tracked file changed". run.json and the summary now carry untracked, the number of files git does not track. docs/game_gate.md says both.
  2. world_at_s. It counts from the gate's start, like every time in the summary, so the precompile is in it. The docs say so now, and give the precompile's own seconds (precompile.shaders_s, precompile.made_s). I did not add a derived field: the two bases are already there.
  3. under_2_at_s. It now counts from 60 s in the world, the base the median already uses, so an arrival dip is no longer the run's. New test test_a_dip_on_arrival_is_not_the_first_second_under_2: it fails with the previous game_gate.py (it found 70 s) and passes now (300 s).
    The longest gap between presents stays measured from the world on, on purpose. A freeze on pipeline compiles comes right after arrival (DadaCap's case), and 10 s with no frame is what a player sees. The docs give that reason.
  4. VRAM and REAPING. These stay out of this PR, as agreed.

On Windows: test_game_gate.py 21 OK (with the previous game_gate.py, the two changed tests fail). The docs tests and test_tool_stdout_encoding.py pass. check_no_game_data.py is clean, the script parses in PowerShell 7, and the merge with current main is clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291740720 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291740720). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-30T20:58:47Z. --- Thanks for the run and the mutants. The four notes, in 46ea66693: 1. **Untracked files.** `dirty` stays "a tracked file changed". `run.json` and the summary now carry `untracked`, the number of files git does not track. `docs/game_gate.md` says both. 2. **`world_at_s`.** It counts from the gate's start, like every time in the summary, so the precompile is in it. The docs say so now, and give the precompile's own seconds (`precompile.shaders_s`, `precompile.made_s`). I did not add a derived field: the two bases are already there. 3. **`under_2_at_s`.** It now counts from 60 s in the world, the base the median already uses, so an arrival dip is no longer the run's. New test `test_a_dip_on_arrival_is_not_the_first_second_under_2`: it fails with the previous `game_gate.py` (it found 70 s) and passes now (300 s). The longest gap between presents stays measured from the world on, on purpose. A freeze on pipeline compiles comes right after arrival (DadaCap's case), and 10 s with no frame is what a player sees. The docs give that reason. 4. **VRAM and REAPING.** These stay out of this PR, as agreed. On Windows: `test_game_gate.py` 21 OK (with the previous `game_gate.py`, the two changed tests fail). The docs tests and `test_tool_stdout_encoding.py` pass. `check_no_game_data.py` is clean, the script parses in PowerShell 7, and the merge with current `main` is clean.
MoonEyes commented 2026-11-30 21:04:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T21:04:57Z.


Verified by MoonEyes (another person than the author) on head 46ea66693 merged with main d8ca18240: Windows 11, Python 3.14. tests/test_game_gate.py OK. Docs and test_tool_stdout_encoding OK. Red: the test does not import without the new tool. No game run from me (#2782 was run by enlight3d on an RTX 3090).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291889300 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7291889300). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T21:04:57Z. --- Verified by MoonEyes (another person than the author) on head `46ea66693` merged with `main` `d8ca18240`: Windows 11, Python 3.14. `tests/test_game_gate.py` OK. Docs and `test_tool_stdout_encoding` OK. Red: the test does not import without the new tool. No game run from me (#2782 was run by enlight3d on an RTX 3090). AI-assisted (Claude Code).
ecox982745 commented 2026-11-30 21:09:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-30T21:09:54Z.


Native Windows CLI handoff check with the merged A/B comparator from #2783. Tested 46ea66693 merged onto a596adfac (tree b7cc594c8). I generated synthetic gate logs with menu and world presents, real timestamp parsing, and a known 5 ms B improvement plus 0.5 ms of drift per run. The Windows paths contained spaces, an apostrophe, and an ampersand.

game_gate.py summary wrote all ten summaries. d3d12_ab_compare.py abba consumed them directly. It used the four balanced pairs, excluded the pair containing the device-loss fixture, and reported B faster, −4.999 ms, with a 95% interval of −5.913 to −4.085 ms. The discarded run was labeled gate FAIL. All 21 game-gate tests and 13 comparator tests also passed.

Synthetic logs only. This verifies the handoff and comparison arithmetic. AI-assisted with OpenAI Codex (GPT-6.2 Sol).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7292006078 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7292006078). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-30T21:09:54Z. --- Native Windows CLI handoff check with the merged A/B comparator from #2783. Tested `46ea66693` merged onto `a596adfac` (tree `b7cc594c8`). I generated synthetic gate logs with menu and world presents, real timestamp parsing, and a known 5 ms B improvement plus 0.5 ms of drift per run. The Windows paths contained spaces, an apostrophe, and an ampersand. `game_gate.py summary` wrote all ten summaries. `d3d12_ab_compare.py abba` consumed them directly. It used the four balanced pairs, excluded the pair containing the device-loss fixture, and reported **B faster, −4.999 ms**, with a 95% interval of **−5.913 to −4.085 ms**. The discarded run was labeled `gate FAIL`. All 21 game-gate tests and 13 comparator tests also passed. Synthetic logs only. This verifies the handoff and comparison arithmetic. AI-assisted with OpenAI Codex (GPT-6.2 Sol).
OreoFR commented 2026-11-30 21:11:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T21:11:40Z.


Re-checked by OreoFR on the new head 46ea66693 merged with main a596adfac (macOS 27.2.1, Apple M5, Python 3.12.16): tests/test_game_gate.py 21 passed; tests/test_tool_stdout_encoding.py 4 passed; tests/test_docs_*.py 57 passed.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7292048873 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7292048873). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T21:11:40Z. --- Re-checked by OreoFR on the new head `46ea66693` merged with `main` `a596adfac` (macOS 27.2.1, Apple M5, Python 3.12.16): `tests/test_game_gate.py` **21 passed**; `tests/test_tool_stdout_encoding.py` 4 passed; `tests/test_docs_*.py` 57 passed. AI-assisted: Claude Code
MoonEyes commented 2026-11-30 21:21:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T21:21:30Z.


Merging. Head 46ea66693 merges cleanly with main a596adfac and does not force a rebase of #2566. CI is green on this head. Checked on it by OreoFR (macOS), ecox982745 and me (Windows); the notes of enlight3d's RTX 3090 run are addressed in this head. Tooling, tests and docs only. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7292287739 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7292287739). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T21:21:30Z. --- Merging. Head `46ea66693` merges cleanly with `main` `a596adfac` and does not force a rebase of #2566. CI is green on this head. Checked on it by OreoFR (macOS), ecox982745 and me (Windows); the notes of enlight3d's RTX 3090 run are addressed in this head. Tooling, tests and docs only. Merged by MoonEyes. AI-assisted (Claude Code).
enlight3d commented 2026-11-30 21:53:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-30T21:53:42Z.


Follow-up on #2782 head 46ea66693, after my RUN on be96bdade. It merges cleanly into main 407f71a23. CI on 46ea66693: all checks pass (wine skipped).

The delta be96bdade..46ea66693 is one commit, and only the review points:

  • run.json gets an untracked count (git status --porcelain --untracked-files=normal, the ?? lines) beside dirty, and summary.json carries it.
  • under_2_at_s is now scanned from 60 s in the world, like the median (second = int(begin) instead of int(world)), with a new test.
  • docs/game_gate.md documents world_at_s and the rest.
  • The longest present gap is still measured from the arrival, on purpose. Nothing else changes.

Commands, from the repository root, python -I (Python 3.13.12), at low priority:

  • python -I -m unittest discover -s tests -p test_game_gate.py on 46ea66693: 21 tests OK.
  • Red, by assertion: with be96bdade's tools/game_gate.py and the new tests, 2 tests fail. test_a_dip_on_arrival_is_not_the_first_second_under_2 gets 70.0 for 300.0: the old scan stops on the arrival dip. test_a_clean_run_in_the_world_passes fails with KeyError: 'untracked'. With 46ea66693's tool, both pass.
  • python -I -m unittest discover -s tests -p test_tool_stdout_encoding.py: 4 tests OK.
  • scripts/game-gate.ps1 parses with no error in Windows PowerShell 5.1 and in PowerShell 7.

Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7293054812 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2782#issuecomment-7293054812). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-30T21:53:42Z. --- Follow-up on #2782 head 46ea66693, after my RUN on be96bdade. It merges cleanly into main 407f71a23. CI on 46ea66693: all checks pass (wine skipped). The delta be96bdade..46ea66693 is one commit, and only the review points: - `run.json` gets an `untracked` count (`git status --porcelain --untracked-files=normal`, the `??` lines) beside `dirty`, and `summary.json` carries it. - `under_2_at_s` is now scanned from 60 s in the world, like the median (`second = int(begin)` instead of `int(world)`), with a new test. - `docs/game_gate.md` documents `world_at_s` and the rest. - The longest present gap is still measured from the arrival, on purpose. Nothing else changes. Commands, from the repository root, `python -I` (Python 3.13.12), at low priority: - `python -I -m unittest discover -s tests -p test_game_gate.py` on 46ea66693: 21 tests OK. - Red, by assertion: with be96bdade's `tools/game_gate.py` and the new tests, 2 tests fail. `test_a_dip_on_arrival_is_not_the_first_second_under_2` gets 70.0 for 300.0: the old scan stops on the arrival dip. `test_a_clean_run_in_the_world_passes` fails with `KeyError: 'untracked'`. With 46ea66693's tool, both pass. - `python -I -m unittest discover -s tests -p test_tool_stdout_encoding.py`: 4 tests OK. - `scripts/game-gate.ps1` parses with no error in Windows PowerShell 5.1 and in PowerShell 7. Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
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!2782
No description provided.