Skip to content

tools: read boot timeline states from the configured RVAs - #2186

Open
ecox982745 wants to merge 1 commit into
ProjectLeonida:mainfrom
ecox982745:ed/stage-timeline-peek-rvas
Open

ecox982745 wants to merge 1 commit into
ProjectLeonida:mainfrom
ecox982745:ed/stage-timeline-peek-rvas

Conversation

@ecox982745

@ecox982745 ecox982745 commented Nov 26, 2026 •

Copy link
Copy Markdown

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_RVA and LEONIDA_SESSION_STATE_RVA. Each can be overridden on the command line for saved logs. --load-state-rva selects 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 e06955b7fbc1 on Windows before marking ready for review. All five CLI regression tests failed on main and passed on the clean merge (tree ea5b3638ddd4). 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 0b11d86bc and 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 0b11d86bc produces 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).

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)
@real-rusher

Copy link
Copy Markdown
Contributor

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)

@ecox982745
ecox982745 marked this pull request as ready for review November 28, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants