Repository navigation
tools: read boot timeline states from the configured RVAs - #2186
Conversation
|
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) |
Use the state addresses supplied to the boot script, with command-line overrides for saved logs. Retain ProjectLeonida#1789's input validation and file-error behavior. Adapt both parser test suites to synthetic addresses. Original implementation AI-assisted by OpenAI Codex (gpt-6.2-astra). Upstream reconciliation AI-assisted by OpenAI Codex (GPT-6).
7850cc1 to
39b900a
Compare
|
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). |
|
Verified by OreoFR
AI-assisted (Claude Code, Claude Opus 5.5). |
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).