Commit Graph

10 Commits

Author SHA1 Message Date
0e5ebd0c69 gate: the summary even when memory.csv cannot be written, the slope up to the stop (review)
`summary` wrote memory.csv before summary.json, so a memory.csv open in another program left no
summary and exit 1. A file it cannot write or remove is now said on stderr, `series` is null and
summary.json is written. The private bytes' slope counted the memory lines written while the title
ends after the stop request; it now covers the world up to the stop, as the frame rates do. New tests:
the 2 s window and the empty cells of memory.csv, its LF line ends, the slope with lines after the
stop and with fewer than 3 lines in the world, and a memory.csv that cannot be written. The census
sentence's contract is one key over the whole part WAITS reads, the ", " between its two numbers too.
The docs name every video memory line the peak counts (the swap chain made, its buffers made again,
a budget change of 256 MB or more) and when the slope and `series` are null.
2026-12-02 04:42:49 +01:00
bb6ff13127 gate: no stale memory.csv, and the docs say what the series holds (review)
`write_series` returned before an older memory.csv was touched, so a folder summarized again from a log
without memory lines kept old rows beside `series: null`: it now removes that file. Two tests go through
`main()`: no memory lines writes no file, and an older file goes. The docs list the CSV header, how its
video memory and census columns are picked (the nearest line within 2 s), `reaper_queue_max_at_s` and
`waiting_objects_max`, and that the summary's video memory peak counts every video memory line, the
swap chain's too, so it can come from a line with no row in the CSV. "Not in this version" no longer
lists the time series and the VRAM and RAM peaks. The census line's fixture is the runtime's sentence
as it is now, with the reaper's bound (LEONIDA_REAPER_LIMIT) at its end; the part the parser reads did
not change.
2026-12-02 04:42:49 +01:00
7150b7fe0c gate: memory.csv and a pile-up's numbers beside the summary (D3D12-GATE-MEMORY-SERIES)
Testers read a pile-up by its slope and by the reaper's queue, which the summary's peaks do not show. The
parser now also reads the runtime's census line written with each memory line (objects let go that wait for
their submissions, and the reaper thread's queue) and writes memory.csv beside summary.json: one row per
memory line with the private bytes, the PC's memory free and left to commit, the card's video memory budget
and in use, the shared memory in use and the two queues. The summary's memory block gets the reaper queue
at its longest and when, the most objects waiting, and the least-squares slope of the private bytes in the
world (MB a minute). The census strings join the contract test.
2026-12-02 04:42:49 +01:00
01203fb3bf gate: a negative memory limit is off, and the poll's order tested in full (review)
A negative -StopOverBudgetSeconds stopped every run at its first video memory line: 0 s over the budget
passed a negative limit. Every limit is now off at 0 or less, with a test for each, and a line at
exactly the private limit is tested not to stop. The poll test gets a memory limit at the time limit
(memory wins), and the script text test checks the target and time limits the loop passes and that the
memory stop's sentence reaches the stop event. The docs give the poll's whole order (a STOP file and the
world time at the same check give `target`), say that `world_time_short` and `world_not_reached` are
not added to `memory_stop`, and name `memory.stop_limits`.
2026-12-02 04:42:49 +01:00
aa75f13197 gate: a memory stop ends a run before memory runs out (D3D12-GATE-MEMORY-STOP)
A memory pile-up has taken a PC's whole Windows down, not only the device, and a fixed 80 GB cap never
triggers on a PC with a 40 GB commit limit. The supervisor now asks `game_gate.py state` for a memory stop,
read from the runtime's latest memory lines: the game's private bytes past -StopPrivateMB (default 90 % of
this PC's commit limit), the PC under -StopCommitLeftMB left to commit for 20 s (default the larger of
128 MB and 0.25 % of the limit), or video memory over the system's budget for -StopOverBudgetSeconds (60).
0 turns one off. The run then stops the same clean way, with the reason `memory`; the limits go into
run.json and the summary, the limit passed into `stop.memory_why`, and the verdict is FAIL `memory_stop`.
`start` forwards the limits to the detached run.
2026-12-02 04:42:48 +01:00
5df6760122 game_gate: the precompile's line names the notes by mark (D3D12-GATE-WARM-WORDS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 08:27:52 +01:00
f806537a8c gate: summary.json gets the run's memory peaks (D3D12-GATE-MEMORY-PEAKS)
Testers could not use the gate daily without memory figures, and a memory pile-up took a 3090's Windows
down twice. The parser now reads the runtime's memory line and video memory line (every 5 s in builds with
diagnostics) and writes a memory block: the private bytes at their most and when, the most of them in
physical memory, the least the PC had left to commit and when, the card's video memory in use at its most
and when with the budget then, the seconds over that budget, and the most shared memory in use. The video
memory is what the system counts for the process, so it works on any card. The five runtime strings it reads
join the contract test.
2026-12-01 01:32:36 +01:00
46ea66693f gate: untracked files in run.json, under_2_at_s from 60 s in the world (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.
2026-11-30 21:58:26 +01:00
be96bdade4 tools: the gate and A/B tools set errors="replace" on stdout
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.
2026-11-30 21:29:32 +01:00
b535fb0dc3 d3d12: an in-game gate: one command, one run folder, one summary.json (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.
2026-11-30 20:39:48 +01:00