Commit Graph

8 Commits

Author SHA1 Message Date
eac2b61d2f gate: the world time comes before the memory stop, the commit floor tested at 20 s (review)
A run that reached -WorldSeconds at the same poll as a memory limit was reported FAIL `memory_stop`.
It is a measurement, and its memory peaks are in the summary all the same, so the supervisor now
checks the target first. The poll's order is one function, Get-StopReason, which the test takes out
of the script and puts to PowerShell 7 with synthetic polls. The commit floor's boundary is now
tested at exactly 20 s, and the docs say what `stop.memory_why` holds: the gate's whole sentence.
2026-12-02 04:42:49 +01:00
cb5bcfc205 gate: the private-bytes stop also follows the PC's memory (review)
With a large page file the commit limit is far above what a PC survives: two Windows crashes (0x10E)
came at about 100 GB private on a PC with 64 GB of memory and a 175 GB limit, where 90 % of the limit
is 158 GB. The default is now the lower of 90 % of the commit limit and 1.25 x the physical memory
(80 GB there, 36 GB here); the video memory stop stays on by default.
2026-12-02 04:42:48 +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
9fc7de03e3 game-gate: the DLSS preflight follows the switch PowerShell binds (D3D12-F1-DLSS-REBUILD)
The preflight added in 218b0328b read -NoDlss out of -PlayArgs with a pattern over
the text. Two reviews of the pull request showed where that goes wrong:

- `-NoDlss: $true`, a space after the colon, binds true, and the gate refused the
  run and asked for a DLSS rebuild (andrew-ai, PowerShell 7.6.9);
- `-Adapter 'Fixture -NoDlss Adapter'` binds no switch, and the gate let the run
  go on into a build inside the run (merzleckeier, PowerShell 7.4.21).

The gate now asks PowerShell itself: Test-NoDlssBound takes the param block of
scripts\play-d3d12.ps1 and lets it bind the arguments the launch line gives the
script (-Game, -Data, -More, then -PlayArgs); nothing of the play script runs.
The first thing the probe writes is the answer, so text behind a `;` in
-PlayArgs cannot stand in for it. Arguments PowerShell cannot bind (an ambiguous
-No, a switch that does not exist, a value outside a ValidateSet) count as
-NoDlss not said, as the start itself fails on them, and the refusal then says
that they did not bind and with which error. The probe is reached only when the
build's note, the SDK and cargo already say the play script would build.

tests/test_game_gate.py takes the function out of the script and puts 19 lines of
-PlayArgs to PowerShell 7 against the real play script's parameters: bare,
shortened, :$true, : $true, :$false, : $false, alone and among other switches,
the quoted adapter name alone, with -NoDlss:$false and with a real -NoDlss, an
argument that does not bind, and a `; $true` behind the arguments (skipped where
there is no pwsh). A second test holds that no pattern is matched against
-PlayArgs any more.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 00:05:03 +02:00
218b0328b8 game-gate: no run with a build the play script would make again for DLSS (D3D12-F1-DLSS-REBUILD)
The gate refuses to run without a build, because the play script would make
it inside the run. Since the change before this one, play-nvidia.ps1 also
makes a build noted as made without DLSS again once NVIDIA's SDK is there,
whatever the start's switches ask for: on such a checkout that build too
would be made inside the run, after the gate wrote down the exe's hash and
what it was built with. The gate now refuses that run as well and names the
build script. Not with -NoDlss in -PlayArgs (shortened or with :$true too)
and not without cargo: the play script makes no build then.

That commit's message calls this guard a follow-up, for want of PowerShell 7
on the PC it was written on; it has been installed since, and this is it.

Checked with PowerShell 7.7.0: the guard's own lines against a synthetic
folder, eleven cases; and the whole script twice. With a build noted as made
without DLSS and the SDK there it refuses before anything starts (exit 1, no
run folder). With a build noted as made with DLSS it goes on as before:
run.json carries built_with, and the run ends at once with ERROR not_started,
there being no game in the folder.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 22:43:34 +02:00
f4c6aca754 gate: game-gate.ps1 says it needs PowerShell 7 (D3D12-GATE-PWSH7)
Under Windows PowerShell 5.1 the gate failed in about 2 s without starting the game and without saying
why (reported by a tester). A #Requires -Version 7.0 line makes 5.1 refuse it with a message before
anything runs; docs/game_gate.md says so, and a test keeps the line.
2026-12-01 01:28:02 +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
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