Repository navigation
stage_timeline: a missing or unreadable log is one error line; add unit tests (TOOL-STAGE-TIMELINE-TESTS) - #2232
real-rusher wants to merge 2 commits into
Conversation
…traceback Co-Authored-By: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5
|
All 13 tests passed on Windows with Python 3.13.18 at There are two merge conflicts worth coordinating. #2186 changes the arguments to I tested a local resolution against main All 25 tests passed together after retaining the separate parser cases from #1789 and making these fixture changes:
This was a local CPU integration check. |
|
Review pass on Windows (this box has no cmake/clang-cl, so no C++ build was run; this PR is pure Python tooling, so that is all the verification needed here). Head What I ran on this machine (Windows 11, CPython 3.14.9, all via
From reading the hunk: The author's numbers (Linux, 3.13) reproduce identically on Windows/3.14. Nothing blocking. |
|
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
(AI-assisted test run; output checked by hand.) |
|
Conflicts with: #2186 (tools: read boot timeline states from the configured RVAs). Both change main() in tools/stage_timeline.py, and #2186 makes read() and the CLI take the state RVAs, which this PR's tests do not pass yet. If #2186 lands first, I will rebase this PR onto it and update tests/test_stage_timeline.py to the RVA arguments; if this one lands first, #2186 only needs to keep the OSError guard around its read() call. |
lixonik
left a comment
There was a problem hiding this comment.
Windows 11: 13/13 stage timeline tests passed, including the CLI's missing/unreadable-input diagnostics. No findings.
AI-assisted.
|
Closing as a duplicate of #1789 (STAGE-TIMELINE-STDOUT-GUARD-AND-PARSER-SAFETY), which is older, makes the same OSError change and adds tests/test_stage_timeline.py at the same path. I missed it when I claimed this. Thanks to everyone who verified this one, and to @ecox982745 for pointing out the overlap. If the timeline and CLI cases here are wanted on top of #1789, they can follow as a separate test file once #1789 and #2186 have landed. |
Claimed in the coordination issue as: TOOL-STAGE-TIMELINE-TESTS (#1608)
What and why
tools/stage_timeline.py had no tests, and a wrong path or a folder ended in a FileNotFoundError or IsADirectoryError traceback. It now prints
stage_timeline: error: cannot read <log>: <reason>and exits 2, like awc_names and check_no_game_data.tests/test_stage_timeline.py covers read() and timeline() on synthetic logs (stage changes, "?" and list values, the session low dword, unknown values, press pairing, the loading screen end) and the command line (text and JSON reports, no peek lines, a missing log, a folder). Standard library only, no game data.
Tested
python -I tests/test_stage_timeline.py: 13 tests pass. On main, the two error tests fail and the other 11 pass.
Also run: python -m compileall -q make_game.py tools tests, scripts/check_no_game_data.py on both files, tests/test_ci_registration.py, tests/test_text_write_line_endings.py. All pass. Linux, Python 3.13.
GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a, no translator change)🤖 Assisted by Claude Code