tools: read boot timeline states from the configured RVAs #2186
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2186
Loading…
Reference in a new issue
No description provided.
Delete branch "ed/stage-timeline-peek-rvas"
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?
Pull request successfully merged and closed
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
After #1789 landed, I rebased this patch onto its parser commit and updated its fixtures to supply synthetic RVAs. The proposed GitHub merge for head
39b900ad7781matches the tested tree. On Windows, mainc1ecf04edcb8passed its seven parser tests and failed all five configured-address tests. On the combined tree30abb0b24960, all twelve passed, including the missing-file and directory cases. All 17 documentation link tests, Python compilation and the changed-file game-data check passed on that tree.The five configured-address tests cover JSON and text output, press pairing, optional loading-state transitions, hexadecimal spellings and configuration errors. The original revision also passed the semantic suite across 498 files and 6,351 tests.
GPUs tested: N/A for the offline log reader. Tests ran on Windows.
AI-assisted: OpenAI Codex (
gpt-6.2-astra).Verified on main a73a57e1 (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)
Red/green: On main test_stage_timeline.py and test_stage_timeline_rvas.py have 7 failures and 3 errors (states not read from the configured RVAs, --game-state-rva unknown), and with the PR 7 + 5 tests pass on Windows 11 at OreoFR's (RTX 4070).
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.
Verified by OreoFR
3408969a7+ PR head39b900ad7python -I tests/test_stage_timeline.py tests/test_stage_timeline_rvas.pyAI-assisted (Claude Code, Claude Opus 5.5).