gate: ignore crashes.log entries older than the run; LEONIDA_SUSPEND_DEADLINE_MS #3487

Merged
leonida/mandy
MoonEyes merged 2 commits from fix/gate-old-crashes into main 2026-12-04 18:18:02 +00:00

Pull request successfully merged and closed

Member

Two small fixes, no change to the game by default.

  1. tools/game_gate.py ignores crashes.log entries whose unix time header is older than the run's start (5 s margin). The gate copies the data folder from a template; when that template holds an old crashes.log, every run reported faults that happened days before (fault_after_stop on nearly every run, and a false fault_before_stop). An entry without a readable header stays counted. Test in tests/test_game_gate.py (an entry a day old is skipped, one 30 s into the run is counted).
  2. LEONIDA_SUSPEND_DEADLINE_MS sets how long the title gets to finish suspending after the window is closed (default 1000, unchanged; bounded 100..60000), to check whether a title still starting up would answer given more time.

Tested: python -I tests/test_game_gate.py: 40 OK; cargo test -p leonida-hle: 309 passed; tests/test_d3d12_switches.py: OK; check_no_game_data clean. The two clippy collapsible_if errors in xmem.rs are already on main (file untouched here). A separate reviewer (Claude Opus 5.5) ACCEPTED.

AI-assisted: written by Claude Opus 5.5 (Claude Code), reviewed by a separate Claude Opus 5.5 judge. Merged on Moon's written authorization (two maintainers).

🤖 Generated with Claude Code

Two small fixes, no change to the game by default. 1. `tools/game_gate.py` ignores `crashes.log` entries whose `unix time` header is older than the run's start (5 s margin). The gate copies the data folder from a template; when that template holds an old `crashes.log`, every run reported faults that happened days before (`fault_after_stop` on nearly every run, and a false `fault_before_stop`). An entry without a readable header stays counted. Test in `tests/test_game_gate.py` (an entry a day old is skipped, one 30 s into the run is counted). 2. `LEONIDA_SUSPEND_DEADLINE_MS` sets how long the title gets to finish suspending after the window is closed (default 1000, unchanged; bounded 100..60000), to check whether a title still starting up would answer given more time. Tested: `python -I tests/test_game_gate.py`: 40 OK; `cargo test -p leonida-hle`: 309 passed; `tests/test_d3d12_switches.py`: OK; check_no_game_data clean. The two clippy `collapsible_if` errors in `xmem.rs` are already on main (file untouched here). A separate reviewer (Claude Opus 5.5) ACCEPTED. AI-assisted: written by Claude Opus 5.5 (Claude Code), reviewed by a separate Claude Opus 5.5 judge. Merged on Moon's written authorization (two maintainers). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The gate copies the template's data folder, crashes.log included, and counted every
entry in it: a run closed 4 s after it started was failed for 8 faults of 28 Nov to
3 Dec. Entries whose "unix time" header precedes the run start are now skipped.

lifecycle: the time the suspend routines get before the title is ended anyway can be
set with LEONIDA_SUSPEND_DEADLINE_MS (default 1000, kept in 100..60000), to see
whether a title still starting up ever finishes its suspend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Member

Merged by Moon's agent on Moon's written authorization. Separate reviewer: ACCEPT. After the update merge with main, d3d12_switches.py --check and tests/test_game_gate.py (40 OK) pass on 343dcaecac.

Merged by Moon's agent on Moon's written authorization. Separate reviewer: ACCEPT. After the update merge with main, `d3d12_switches.py --check` and `tests/test_game_gate.py` (40 OK) pass on 343dcaecac.
Sign in to join this conversation.
No description provided.