Repository navigation
tools: read boot timeline states from the configured RVAs - #2186
ecox982745 wants to merge 1 commit into
Conversation
Use the game and session RVAs supplied to the boot script, with command-line overrides for saved logs. Ignore unrelated peek samples and report when a log has no matching fields. AI-assisted-by: OpenAI Codex (gpt-6.2-astra)
|
Verified on main a73a57e (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly into main. With this PR, python -I tests/test_stage_timeline_rvas.py: 5 tests OK. The PR's test file against main's tools/stage_timeline.py: 5 failures, so the new tests fail on main and pass with the change. compileall clean. Overlap for review: #2232 (TOOL-STAGE-TIMELINE-TESTS, mine) also changes tools/stage_timeline.py and adds tests/test_stage_timeline.py. The two conflict in main(), and this PR changes read() to take the RVAs and makes the CLI require them, which #2232's tests do not pass yet. Whichever lands second needs a rebase; if this one lands first, I will rebase #2232 onto it and update its tests to the RVA arguments. AI-assisted: yes (Claude Code) |
Claimed in the coordination issue as TOOL-STAGE-TIMELINE-PEEK-RVAS. This follows aslan2142’s finding after #2138 merged.
What and why
The boot script now records locally configured state addresses. The offline timeline still looked up three fixed addresses. A log recorded with different addresses could report “no title state yet” throughout a run and pair presses with misleading transitions.
The timeline now uses
LEONIDA_GAME_STATE_RVAandLEONIDA_SESSION_STATE_RVA. Each can be overridden on the command line for saved logs.--load-state-rvaselects the optional loading-screen byte. Unrelated samples are skipped, and a log with no matching fields exits with a diagnostic. A matching unreadable field still represents an unknown state.Tested
Verified against main
e06955b7fbc1on Windows before marking ready for review. All five CLI regression tests failed on main and passed on the clean merge (treeea5b3638ddd4). All 17 documentation link tests and the changed-file game-data check passed on that tree.Five offline CLI regression tests with hand-written logs. The new suite failed on main
0b11d86bcand passed on the proposed tree. It covers JSON and text output, press pairing, optional loading-state transitions, hexadecimal spellings, and configuration errors.The semantic suite passed across 498 files and 6,351 tests. Documentation links, text line endings, Python compilation, and the changed-file game-data check passed.
The fork branch starts at its existing main. Its clean merge with upstream
0b11d86bcproduces the exact tested tree (6dc52c3dd). tools: harden stage_timeline.py parsing, OSError handling and stdout guard #1789 also edits this parser and its proposed tests assume fixed addresses. If that PR proceeds, those fixtures will need to supply their RVAs.GPUs tested: N/A for the offline log reader. Tests ran on Windows.
AI-assisted: OpenAI Codex (
gpt-6.2-astra).