Skip to content

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

Merged
MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
ecox982745:ed/stage-timeline-peek-rvas
Nov 28, 2026
Merged

MoonEyes merged 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

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 39b900ad7781 matches the tested tree. On Windows, main c1ecf04edcb8 passed its seven parser tests and failed all five configured-address tests. On the combined tree 30abb0b24960, 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).

@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
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).
@ecox982745
ecox982745 force-pushed the ed/stage-timeline-peek-rvas branch from 7850cc1 to 39b900a Compare November 28, 2026 15:35
@MoonEyes

Copy link
Copy Markdown
Collaborator

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 c1ecf04, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.

@MoonEyes
MoonEyes merged commit d11ca43 into ProjectLeonida:main Nov 28, 2026
@OreoFR

OreoFR commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Verified by OreoFR

  • Base: main 3408969a7 + PR head 39b900ad7
  • Test: python -I tests/test_stage_timeline.py tests/test_stage_timeline_rvas.py
  • Red on main: 7 FAIL + 3 ERROR (TypeError read() takes 1 argument, unknown --game-state-rva option): the missing function itself (configurable RVAs)
  • Green with the PR: 7 + 5 OK
  • Verdict: READY
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

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.

4 participants