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

Merged
ecox982745 merged 1 commit from upstream-pr/2186 into main 2026-11-28 20:17:06 +00:00
ecox982745 commented 2026-11-26 03:21:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-26T03:21:32Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5503397253 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2186). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-26T03:21:32Z. --- Claimed in the coordination issue as [TOOL-STAGE-TIMELINE-PEEK-RVAS](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181546373). This follows [aslan2142’s finding](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181450722) 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 commented 2026-11-26 10:12:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:12:37Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7189055786 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2186#issuecomment-7189055786). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T10:12:37Z. --- 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)
MoonEyes commented 2026-11-28 20:17:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:17:03Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7245172223 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2186#issuecomment-7245172223). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T20:17:03Z. --- 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.
OreoFR commented 2026-11-28 22:00:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T22:00:09Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246425655 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2186#issuecomment-7246425655). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T22:00:09Z. --- **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 in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2186
No description provided.