feat(scripts): memtour.py --repo-save, a tour from a repository save #1221

Open
TrashPanda wants to merge 1 commit from TrashPanda/Longshot:feat/memtour-repo-save into main
Contributor

Type: feat · Risk: low · Tested on: Linux, RTX 4070 Ti · Needs: none

Why

scripts/memtour.py (the memory tour: teleports through areas and samples the game's memory) could only start from a
full save folder, which assets/saves doesn't ship, so nobody could run a tour from the saves every checkout has. And
a tour from those saves stopped at its third area: a text box (Kakariko's first visit, the owl in Hyrule Field) holds
every teleport back until A is pressed, and the tour only waited, so every later teleport was refused. Both stood in
the way of measuring #1069's fix.

What changed

--repo-save NAME starts the tour from a repository save, and a teleport refused because "an event is playing" is
asked again after an A press.

  • scripts/memtour.py: --repo-save beside --save (one of the two is required), passed to start_session as
    longshot_ctl.py launch --repo-save passes it; Tour.teleport() presses A after an "event is playing" refusal
    before it asks again.
  • tests/test_memtour.py: an event refusal presses A until the text box closes; a busy refusal presses nothing.

Measurements

Verdict: nothing to measure: a script and its tests. What it does in the game is below.

Flags and settings

None (a script's argument, --repo-save).

Testing

Tested: python -I -B tests/test_memtour.py (17 tests) and python -I -B tests/run_all.py on Linux (only the
checks that fail on main on this PC fail, none new). In the game, Ubuntu 26.04.1, RTX 4070 Ti, from
--repo-save kokiri-start: before the A press, a tour of Hyrule Field, Kakariko and the Market stopped at its third
area (teleport_error ... an event is playing to the end). With it, 16 tours of Kakariko and the Market
(--dests 2,3,2,3,2,3,2,3) each reached 7 or 8 of their 8 areas, a text box passed by one press when there was one
(teleport_error once, then teleport). The tours behind #1069's measurements were run with it.

Not tested: Windows (the script samples /proc: Linux only, as before). Routes through Hyrule Field still stop
sometimes: with the A press, one such tour reached 4 of its 8 areas, the owl's talk letting a teleport through between
its boxes and the map never changing after that. The tours above leave the field out.

Must be tested: None.

Risks

What could break: an A press when the event is not a text box (a cutscene): A skips nothing there and does
nothing else in one.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Issues

See #1069

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
**Type:** feat · **Risk:** low · **Tested on:** Linux, RTX 4070 Ti · **Needs:** none ## Why `scripts/memtour.py` (the memory tour: teleports through areas and samples the game's memory) could only start from a full save folder, which `assets/saves` doesn't ship, so nobody could run a tour from the saves every checkout has. And a tour from those saves stopped at its third area: a text box (Kakariko's first visit, the owl in Hyrule Field) holds every teleport back until A is pressed, and the tour only waited, so every later teleport was refused. Both stood in the way of measuring #1069's fix. ## What changed `--repo-save NAME` starts the tour from a repository save, and a teleport refused because "an event is playing" is asked again after an A press. - `scripts/memtour.py`: `--repo-save` beside `--save` (one of the two is required), passed to `start_session` as `longshot_ctl.py launch --repo-save` passes it; `Tour.teleport()` presses A after an "event is playing" refusal before it asks again. - `tests/test_memtour.py`: an event refusal presses A until the text box closes; a busy refusal presses nothing. ## Measurements **Verdict:** nothing to measure: a script and its tests. What it does in the game is below. ### Flags and settings None (a script's argument, `--repo-save`). ## Testing **Tested:** `python -I -B tests/test_memtour.py` (17 tests) and `python -I -B tests/run_all.py` on Linux (only the checks that fail on `main` on this PC fail, none new). In the game, Ubuntu 26.04.1, RTX 4070 Ti, from `--repo-save kokiri-start`: before the A press, a tour of Hyrule Field, Kakariko and the Market stopped at its third area (`teleport_error ... an event is playing` to the end). With it, 16 tours of Kakariko and the Market (`--dests 2,3,2,3,2,3,2,3`) each reached 7 or 8 of their 8 areas, a text box passed by one press when there was one (`teleport_error` once, then `teleport`). The tours behind #1069's measurements were run with it. **Not tested:** Windows (the script samples `/proc`: Linux only, as before). Routes through Hyrule Field still stop sometimes: with the A press, one such tour reached 4 of its 8 areas, the owl's talk letting a teleport through between its boxes and the map never changing after that. The tours above leave the field out. **Must be tested:** None. ## Risks **What could break:** an A press when the event is not a text box (a cutscene): A skips nothing there and does nothing else in one. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Issues See #1069 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened.
feat(scripts): memtour.py --repo-save, a tour from a repository save
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
9f51056422
memtour.py took only a full save folder (account.sav or option.sav), which assets/saves never ships, so a tour from the
saves every PC has failed at its first check. --repo-save NAME passes the save to start_session, as longshot_ctl.py
launch --repo-save does.

A teleport refused because "an event is playing" is now asked again after an A press: a text box (Kakariko's first
visit, the owl in Hyrule Field) waits for the button, not for time, so a tour from kokiri-start stopped at its third
destination with every later teleport refused.

Assisted-by: Claude
Author
Contributor

Tested in game: Ubuntu 26.04.1, RTX 4070 Ti, NVIDIA 595.99.02: 16 tours of Kakariko and the Market from --repo-save kokiri-start, each reaching 7 or 8 of 8 areas, a text box passed by one A press; before the A press a tour stopped at its third area.

Tested in game: Ubuntu 26.04.1, RTX 4070 Ti, NVIDIA 595.99.02: 16 tours of Kakariko and the Market from --repo-save kokiri-start, each reaching 7 or 8 of 8 areas, a text box passed by one A press; before the A press a tour stopped at its third area.
Author
Contributor

Checks that fail on main @ 0cab3548 on this PC (Ubuntu 26.04.1; its toolchain lacks what they need), python -I -B tests/run_all.py:

  • tests/test_audio_output_devices.py
  • tests/test_bug_report.py
  • tests/test_bug_report_defaults.py
  • tests/test_crash_record.py
  • tests/test_crt_options.py
  • tests/test_dlss_feature_size.py
  • tests/test_failed_compile_keeps_objects.py
  • tests/test_fsr_uniform_ownership.py
  • tests/test_guest_imported.py
  • tests/test_hardware_report.py
  • tests/test_import_reach.py
  • tests/test_lift_lookups.py
  • tests/test_linux_preflight.py
  • tests/test_linux_update.py
  • tests/test_make_game_cache.py
  • tests/test_missing_nup.py
  • tests/test_mods_size_table.py
  • tests/test_nonuniform_image_arrays.py
  • tests/test_parallel_init_order.py
  • tests/test_pending_guest_import.py
  • tests/test_replay_write_order.py
  • tests/test_run_all_changed.py
  • tests/test_vk_occlusion_queries.py
  • tests/test_walk.py
  • tests/test_walk_key.py

This PR's run fails the same ones and nothing else (tests/test_control.py timed out once in the full run on #1222's branch and passes alone).

**Checks that fail on `main` @ 0cab3548 on this PC** (Ubuntu 26.04.1; its toolchain lacks what they need), `python -I -B tests/run_all.py`: - `tests/test_audio_output_devices.py` - `tests/test_bug_report.py` - `tests/test_bug_report_defaults.py` - `tests/test_crash_record.py` - `tests/test_crt_options.py` - `tests/test_dlss_feature_size.py` - `tests/test_failed_compile_keeps_objects.py` - `tests/test_fsr_uniform_ownership.py` - `tests/test_guest_imported.py` - `tests/test_hardware_report.py` - `tests/test_import_reach.py` - `tests/test_lift_lookups.py` - `tests/test_linux_preflight.py` - `tests/test_linux_update.py` - `tests/test_make_game_cache.py` - `tests/test_missing_nup.py` - `tests/test_mods_size_table.py` - `tests/test_nonuniform_image_arrays.py` - `tests/test_parallel_init_order.py` - `tests/test_pending_guest_import.py` - `tests/test_replay_write_order.py` - `tests/test_run_all_changed.py` - `tests/test_vk_occlusion_queries.py` - `tests/test_walk.py` - `tests/test_walk_key.py` This PR's run fails the same ones and nothing else (`tests/test_control.py` timed out once in the full run on #1222's branch and passes alone).
Collaborator

Possibly related, for context:

  • PR #1222 WIP: fix(vk): a revisited area's ASTC textures take the finalized copies' images, not a decode — Renderer PR's measurements use the repo-save tour this adds
  • PR #570 feat(scripts): memtour.py, a memory tour through the control bridge — Merged original memtour.py this extends
Possibly related, for context: - PR #1222 WIP: fix(vk): a revisited area's ASTC textures take the finalized copies' images, not a decode — Renderer PR's measurements use the repo-save tour this adds - PR #570 feat(scripts): memtour.py, a memory tour through the control bridge — Merged original memtour.py this extends
TrashPanda changed title from WIP: feat(scripts): memtour.py --repo-save, a tour from a repository save to feat(scripts): memtour.py --repo-save, a tour from a repository save 2026-11-16 20:00:30 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
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 'feat/memtour-repo-save:TrashPanda-feat/memtour-repo-save'
git switch 'TrashPanda-feat/memtour-repo-save'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1221
No description provided.