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

Open
github-bot wants to merge 1 commit from github-bot/gh-2186 into main AGit
Owner

@⁠ecox982745 on GitHub · 2026-11-26 03:21 UTC · original
ecox982745:ed/stage-timeline-peek-rvas → main · +108 −17 · 3 files · 1 commits · draft

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

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

**@⁠ecox982745** on GitHub · 2026-11-26 03:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2186) `ecox982745:ed/stage-timeline-peek-rvas` → `main` · +108 −17 · 3 files · 1 commits · draft Claimed in the coordination issue as [TOOL-STAGE-TIMELINE-PEEK-RVAS](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). This follows [aslan2142’s finding](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) 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 - 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`). #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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:39 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:12 UTC · original

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)

**@⁠real-rusher** on GitHub · 2026-11-26 10:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2186#issuecomment-7189055786) 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)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2186/head:github-bot/gh-2186'
git switch 'github-bot/gh-2186'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2186'
git switch 'github-bot/gh-2186'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2186'
git switch 'github-bot/gh-2186'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2186'
git switch 'main'
git merge --squash 'github-bot/gh-2186'
git switch 'main'
git merge --ff-only 'github-bot/gh-2186'
git switch 'main'
git merge 'github-bot/gh-2186'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.