tools/game_run_summary.py: name device lost and title breakpoint in the END words (GAME-RUN-SUMMARY-END-NAMES) #2968
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2968"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T21:56:07Z.
Re-created from the original #2844.
aznohonza/mandy-contribwas made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, same head4edb90521bb9457a16dcb8f662a2a4cb3802a71d. The original review thread is at #2844.tools/game_run_summary.pyprintsprocess exit 3 (0x00000003), no exit event in the startup tracefor a run the title ended in its own device-removed handler.docs/agent_collaboration.mdfixes the vocabulary forRUN ... END:time limit | process crash | device lost | stall | watchdog exit | title breakpoint. The summary now uses two of those words:[rt] vulkan: the device was lost (...)line becomesend: device lost (process exit 3);0x80000003exception becomesend: title breakpoint (process exit 3). The code is matched from any exception in the trace, normalised for0xand case, so a later teardown fault does not hide it.The time limit, and a guest exit before a device-lost line, keep their own end, so a timed-out or cleanly exited run is not renamed by a loss written during teardown. An exit 3 with an
0x80000003exception is atitle breakpointwhen no device loss is present; a device loss without an exit event wins over the breakpoint, because the breakpoint is its handler. A plain exit 3 with no such exception keeps the old fallback, and the loader-error branch is unchanged; the no-exit-code branch gained the loss variant.The docstring names the mapping and says the
[rt]lines are the C++gta6rtruntime's; the native Rust runtime'sLeonida: host GPU failure: ... device removedlines are not read.Tested:
python3 -I tests/test_game_run_summary.py(15 tests, including the two new endings, a later teardown fault, a bare80000003, and the exit/time-limit ordering) andpython3 -I tests/test_run_game_wine.py(9). No game files, no Wine, no GPU.Claimed in #2570 as GAME-RUN-SUMMARY-END-NAMES (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7302707897).
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T22:04:50Z.
Small normalization edge case at
4edb90521. With process exit 3, an empty stderr.log, and one synthetic exception event in boot.jsonl, the CLI recognizes both 80000003 and 0x80000003. With 0X80000003 it reports the generic process exit and counts the exception as (other). EXCEPTION_CODE filters out the uppercase prefix before _same_code gets to normalize it.I tried changing just the prefix in the validation regex from 0x to 0[xX] in a scratch copy. All three spellings then produced title breakpoint. A nine-digit code and a code with trailing text still went to (other), and a valid non-breakpoint code still produced the generic exit. The 15 existing summary tests pass on the unmodified head. This is a synthetic input compatibility finding. Codex-assisted for #2570.
Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T22:14:30Z.
Fixed in
2b3224972. You were right that only the filter was strict —_same_codealready lowercases and drops the prefix, soEXCEPTION_CODEnow accepts0[xX].test_title_breakpoint_survives_a_later_exception_and_accepts_a_bare_codecovers0x80000003,0X80000003and80000003; the suite fails on the old filter and passes with this (15 tests). Your two negatives (nine digits, trailing text) still go to(other).AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T22:21:30Z.
Review: COMMENTED
The precedence is right: a device loss beats the breakpoint because the int3 at
game_scarlett_master.exe+0x2474606is the title's own device-removed path (runtime/src/vulkan_backend.h:607-610), and a guest exit or time limit keeps its own word. The new labels come from the documented END vocabulary,DEVICE_LOSTmatches the only writer, and unknown/zero codes still fall through to a message.0x/0X/bare breakpoint codes are now accepted, which fixes the0X80000003miss reported in the thread.One gap at
tools/game_run_summary.py:160: the breakpoint only has to exist anywhere in the trace. WithLEONIDA_SKIP_ASSERTSthe handler records each skip as both anexceptionandint3_skipped(runtime/src/assert_skip.h:18-19,:123), and exit 3 is also whatLEONIDA_UNIMPLEMENTED=stopuses (kStopExitCode = 3,runtime/shims/registry.cpp:41). A run that stepped over an assert and later stopped on an unimplemented import is reported astitle breakpoint— I reproduced it with a synthetic folder. Consider lettingstartup_events["int3_skipped"]veto the word, or require the breakpoint to be the last guest exception.Nit: the module docstring (
:16-19) should say a device loss takes precedence over the breakpoint. The body's "no-exit-code branch unchanged" is also slightly off —:156-157adds a loss variant there.15/15 tests,
check_no_game_dataclean, merge clean against current main.Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T22:22:00Z.
Confirmed on
2b3224972with the unmodified CLI. All three breakpoint spellings now produce the same end, the nine-digit and trailing-text cases still count as (other), and 0Xc0000005 remains a distinct non-breakpoint exception. All 15 summary tests passed. This resolves my VERIFY-2968-EXCEPTION-SPELLINGS finding from #2570. Codex-assisted.Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T22:28:22Z.
Both points are in
ddee96da7:int3_skippedevent now vetoes the breakpoint word, soLEONIDA_SKIP_ASSERTSplus anLEONIDA_UNIMPLEMENTED=stopexit 3 reports the genericprocess exit 3, nottitle breakpoint. The test adds that trace (exit 3,0x80000003,int3_skipped) and it fails without the veto. I kept the "later unrelated exception" case as it was (test_title_breakpoint_survives_a_later_exception...), since that one is still the title's own int3.15/15 summary tests pass;
0x/0X/bare still agree. On the body: the "no-exit-code branch unchanged" sentence is indeed off — the branch gained the loss variant; I will fix that wording.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T22:29:20Z.
The skipped-int3 fix handles a skipped-only trace, but one earlier skip now masks every later breakpoint in the run. I reproduced this through the CLI at
ddee96da7with synthetic boot.jsonl events, process exit 3 and empty stderr.The last two had reported title breakpoint at
2b3224972. This sequence can arise after the configured skip count is exhausted: assert_skip.h returns EXCEPTION_CONTINUE_SEARCH for the next occurrence without writing an int3_skipped event. The existing 15 tests pass on the new head.Matching each skip to one preceding breakpoint occurrence would preserve the skipped-only fix and retain a later unmatched breakpoint, including a repeat at the same site. This is a trace-classification check, using no game files. Codex-assisted for #2570.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T22:30:43Z.
Counted skip matching preserves both exit labels in the synthetic CLI matrix.
I tried the counted pairing suggested above on
ddee96da7e9f935b360deac7b78607056798656bintegrated into main1abef08d09f6c085efbd47de4cc9e2010bb70793. In 12 synthetic cases, the scratch change consumed one preceding breakpoint at the same recorded location perint3_skippedevent. It restoredtitle breakpointin all three mixed cases the global veto misses: a later breakpoint at a different location, a later breakpoint at the same location, and a later breakpoint followed by a teardown fault.It also kept the current head's corrections for traces with only skipped breakpoints. A skip followed by an explicit loader error or guest exit kept that end, and one or two skips followed by an unimplemented call left the generic exit-3 label. The device-loss, timeout and malformed-code controls stayed the same. All 15 stock tests passed on the current head and the scratch change.
This covers synthetic traces with ordered, matching locations. Incomplete or interleaved records can make pairing ambiguous. AI-assisted, independently checked against the raw results.
Imported from ubiquitarianism/leonida. Originally posted by aznohonza on 2026-12-01T22:41:22Z.
Implemented the pairing you and merzleckeier described in
8642cbe54. Eachint3_skippedevent consumes the latest preceding0x80000003exception with the same recordedat; anything left unmatched still names the end, including a repeat at the same address, and a skipped-only trace stays the generic exit 3. Both scripts useshims::module_offset, so theatstrings are the same shape.The new test covers breakpoint A + skip A (generic), + later breakpoint B (title breakpoint), and + breakpoint A again (title breakpoint). 16/16 summary tests pass.
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T22:50:51Z.
The counted skip fix passes the full CLI matrix and the cgroup-summary integration.
I reran the original 12 synthetic cases on main
1abef08d0, on8642cbe54, and with #2967cb661b0f0layered in. The two updated trees agree in all 12 cases. A skipped-only trace stays a generic process exit, and a later breakpoint still givestitle breakpointat the same or another location, including cases with a subsequent teardown exception. The separate loader, guest return, timeout, malformed-event, and device-lost cases give their expected classifications. The stock summary suites pass 12 on main, 16 with this PR, and 17 in combination.I also exercised four of those cases through the actual Linux wrapper using a synthetic Wine process. With both PRs applied, skip-only, later-same, later-other, and device-lost give their expected end labels both in the caller cgroup and in fresh dedicated systemd scopes. The caller reading is explicitly labeled as the caller cgroup’s lifetime peak. Dedicated scope peaks match the actual kernel
memory.peakreadings, at 101,863,424 to 105,709,568 bytes across four runs. Synthetic traces and child processes only. AI-assisted with OpenAI Codex and independent raw-log verification.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T00:34:31Z.
Merging. Head
8642cbe54merges cleanly withmaind741a9f8fand does not force a rebase of #2566. Ran main plus the PR myself, after #2967 landed on the same tool: test_game_run_summary 17 green, 8 failures with tools/game_run_summary.py from main; ci_registration, line endings, stdout encoding and docs suites green. Third-party verdict on this head; all CI green. Merged by MoonEyes.AI-assisted (Claude Code).