WIP: feat(menu): save and resume when restarting for changed settings #61

Draft
mooki wants to merge 9 commits from mooki/Longshot:restart-in-place-next into main
First-time contributor

Why

Draft: this waits for Nicholas Gower's Skip title work. No open or merged Longshot pull request carrying that dependency was found in the complete public title/body inventory checked during this move. Its credited commit remains in this branch until the dependency lands, when it must be dropped during rebase.

Applying a restart-only setting should not send the player back to the title to load an older save. With Restart in place on, Restart asks the game to autosave, relaunches and loads that save. No Longshot game build/run was requested for this draft; the new evidence is game-free, and the pictures below retain their original Hookshot identities.

What changed

  • A separate headless-menu repair lets scripted confirmation presses count without window focus, posts Restart/Quit requests without a window, and serves them in the POSIX display loop. Shader preparation keeps its worker-completion path.
  • The credited title-loading dependency keeps Skip title screen off by default. The restart path reuses its newest-save lookup and title presses; the existing input-tap implementation is not duplicated.
  • Restart in place is on by default. The game must accept the autosave request, write and commit before relaunch. The menu displays waiting/refusal; Esc, leaving the row or closing the menu cancels the pending relaunch. A refusal asks again before returning to the title.
  • A one-use continuation note must still match the newest save's slot/time. The restarted process then loads that save even with Skip title screen off; input isolation applies to this automatic continuation, not ordinary Skip title starts.
  • Main's Skip opening 52, live frame-rate cap 53, renderer API 21, dynamic display-mode choices, Auto/Dev changes and callbacks are retained. Skip title uses its reserved 44; Restart in place uses 64, without changing the host/renderer layout.
  • Migration-time test-only commits follow main's README.md case, apply the existing CRT policy before all fixture/forced headers, and update the opening-skip check to assert the actual Skip title enum at 44 rather than an obsolete reservation comment. All opening-52, no-collision, save/commit, cancellation and core-ownership assertions remain.

Risk: this is the game's save/load, not a process snapshot. It does not preserve enemies or objects in flight. Cancelling after the game accepted a save does not undo that save; it cancels the relaunch. Windows uses a new process, while Linux's execve keeps its PID.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
HOS_RESTART_CONTINUE New internal environment note: One-use slot/time/position continuation validated at restart Unset Off by default: internal handoff, not a player switch Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
RX_VK_MENU_SCRIPT Changed: Timed menu confirmation works without window focus, Restart/Quit included Unset Off by default: scripted tests Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
HOS_HEADLESS Changed behavior: Headless loop serves Restart/Quit; preparation keeps worker completion Off Off by default: testing/server operation Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
Restart in place New Gameplay row: Ask for a fresh save, then restart and load it On On after more testing: retain proposed default; current Longshot runtime untested Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
restart_in_place New ini key: Persists the Restart in place row 1 On after more testing: as the menu row Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
Skip title screen New Gameplay row/dependency: Automatically load the newest save at ordinary startup Off Off by default: player choice Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
skip_title_screen New ini key: Persists Skip title screen 0 Off by default: player choice Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
Restart Changed menu action: Autosave/continue while enabled; cancellation/refusal remain explicit Inactive until confirmed Off by default: automatic action Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
Restart now Changed confirmation action: Uses the same save-and-continue path Inactive until confirmed Off by default: automatic action Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
Quit Changed headless menu action: Can be confirmed through scripted windowless input Inactive until confirmed Off by default: automatic action Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
HOS_OPT_RESTART_PLACE New internal option64: Request/status channel between menu and game; no ABI field 0, no request Off by default: internal protocol Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime
HOS_OPT_SKIP_TITLE Allocated internal option44: Answers the Skip title row without taking opening52 0, off Off by default: follows player row Applying restart-only settings No process-snapshot restoration Current Longshot game; Windows runtime

Measurements

Branch state: on main d725b3631982ed0035ea3ac9cbe1677e9fad260c; head 74f8248ef5899f1f8f43af39f718ec79b1ae2583; whole game-free suite on this head: 512 passed, 1 failed, 20 skipped (main d725b3631982ed0035ea3ac9cbe1677e9fad260c: 510 passed, 1 failed, 20 skipped); the commits are unchanged by rebases apart from the results table.

The sole failure in both suites in the branch-state block is tests/test_updater_asset_digest.py: local NU1100 means Microsoft.AspNetCore.App.Ref (= 10.0.13) cannot be resolved. The historical suites below also include this failure.

Main d725b3631 differs from d4a69456 only by scripts, docs and tests, so earlier labelled behavior evidence remains applicable; no game code changed in the clean rebase. The new suite is recorded in the branch-state block, not substituted into the older evidence.

main: d4a69456c9 (2026-11-12)
this PR: restart-in-place-next @ 9eb1429808
Hardware: Core i9-13900K, 96 GB RAM, Arch Linux 7.2.15-1-omarchy; repository-default compiler selection, with GCC for drivers that declare it. No GPU used for the new checks.
Scene: authored restart/save/title state and temporary saves in the game-free fixtures; not a newly run game.
Method: the previously recorded whole suite was on the then-final head9eb14298, after every commit; pinned-main suite shared for today's migrations. Two interleaved source-control pairs run the same restart test against main and branch. Test output, not duration, is the measurement. A feature's current-game and off-cost proof remains unrun.

How to reproduce: python -I -B tests/run_all.py --jobs 6 --strict; python -I -B tests/test_restart_in_place.py. For a future game run, use a disposable save, change a restart-only setting, confirm Restart, verify fresh save/commit/continuation; separately cancel during the autosave wait.

main @ d4a69456 this PR @ 9eb14298
Whole suite 507 passed, 2 failed, 20 skipped 510 passed, 1 failed, 20 skipped
Restart test, run 1 / run 2 Fails: row absent / fails: row absent Pass / pass
Median failed invocation count 1 0
Current Longshot game Not run Not run; remains a draft
vk_menu.cpp: no Gameplay row for Restart in place
restart in place: all checks passed
PASS: Restart in place saves by the game's own answer, and the game started again continues only from that save
507 passed, 2 failed, 20 skipped in 504 s (linux, 6 at once)
510 passed, 1 failed, 20 skipped in 239 s (linux, 6 at once)

The base suite was run once for all moved pull requests of this day, on that commit. The shared base also fails two bounded-time cases in tests/test_appimage_package_retry.py; that test passes here. No package was installed. These checks have not yet been run on a forge runner.

The earlier Longshot suite, at e0950172, was 509/2/20: the same .NET failure plus test_opening_skip.py expecting the obsolete “44 is reserved” comment. The final test checks the real declaration instead, and the complete suite was rerun on the final head. Initial Windows-target captures also found missing early CRT policy. Those failures remain recorded; their corrected captures pass. Ten distinct translation-unit captures passed across the retained checks, with later execution-dependent variants outside their coverage. This is not Windows execution.

Historical hosted checks: the archived record for GitHub head ff3f413d265852a4499073cd2199b3ccf8bf3505 has all four Windows/Ubuntu source-check parts completed successfully in run 43165972215. That is not a check of this Longshot integration. Core restart/autoload files are rename-only; surrounding runtime/menu files retain newer main behavior, and the fixture adaptations above are new. The added-lines old-name scan is empty.

Historical game evidence, not repeated: Hookshot 2a3c6f5c on 6ff87f59, 2026-11-11; Linux/RTX 4090/NVIDIA 615.78.08, windowless:

Historical case this PR @ 2a3c6f5c (Hookshot)
Title restart Relaunch uses the selected 1920x1080 instead of 2048x1152
Cancel Cancelled after 2997 ms during autosave cooldown; original process continues, new size remains pending
Save loaded Wrote and committed a fresh save, relaunch loaded it, returned to Kokiri Forest after 52.8 s; 0.00 m displacement at the position log's printed precision, not full state restoration
menu: restart, in place: the game is asked to save first
restart: no game is in play yet: the game starts again at its title
display: window closed for a restart (the Insert menu's Restart now)
hookshot v2.1.0-rc.3-193-g2a3c6f5c (source 5feb7b9a)
oe: output resolution 1920x1080

All three historical runs ended at their requested wall bounds, exit 124, without fatal/crash/device-loss lines. The title case had two startup virtual-core escapes. The save case's interval contained one known NVIDIA mapping refusal, not an all-zero kernel result; attribution to a process was unproved, and its original all-zero kernel expectation failed. No Xid or cache-operation fault was recorded. Those outcomes are not relabelled as new Longshot results or a performance comparison.

The main suite is the shared once-per-base run, not repeated here. The complete branch suite ran after every commit, 2026-11-12 19:16:36–19:20:02 local, with the repository default compiler and a fresh HOME/XDG. Runner execution took 234 s on main and 206 s on the branch, not a performance comparison. All older failed runs remain above; no game or native Windows rerun is inferred.

Testing

Tested: on this PC (Arch Linux, RTX 4090 with NVIDIA 615.78.08, i9-13900K), the current-head whole game-free suite; no GPU was used for these new checks. The earlier two interleaved restart-fixture pairs at the measured commits above fail for the absent Gameplay row on main and pass save/commit/cancel/continuation checks on the branch. Ten distinct translation units compiled for the Windows target across the earlier checks; not run on Windows. Later execution-dependent variants were outside that coverage. Historical Hookshot 2a3c6f5c on 6ff87f59 changed the title's output size to 1920x1080 through Restart, cancelled during the autosave wait while keeping the original process running, and saved/relaunched back to the logged Kokiri Forest position. These were windowless Linux checks, not a new Longshot run.

Tested but not measured: historical Hookshot functional scenarios below; no new Longshot game run.

Not tested: no Longshot game build/run was requested for this draft; current-game off-cost/default comparison remains unrun while the Skip title dependency is pending. No AMD/Deck, physical input, window/monitor restoration, co-op reconnection, long sessions, corrupt saves, other areas or current-build Restart in place off run. The retained game evidence is bounded, historical Linux/windowless testing; Windows-target syntax is not a Windows game. No test request was posted during this move.

The title-flow automation can time out; it does not validate damaged save contents. A save refused by the game is not forced.

Needs other testers:

  • Windows x64: run the changed restart/title/file-open fixtures and try Restart plus cancellation with a disposable Kokiri Forest save, expecting passing fixtures, restart into the fresh save in a new process and cancellation to keep the original process running (request to open)

Screenshots

No current-game pair: main @ d4a69456 and this PR @ 9eb14298 were checked game-free, not photographed in game. Historical screenshots are this PR @ 2a3c6f5c (Hookshot), as labelled below.

Hookshot 2a3c6f5c, 2026-11-11: choose 1920x1080, confirm Restart, replacement reaches the title. The size change comes from the log, not the scaled capture.

Same Hookshot build/date: waiting for autosave, cancellation leaves the selected size pending, original process continues.

Same Hookshot build/date: before Restart, autosave wait, return to the same logged position. The camera differs because this is a save/load.

All three retained panels were inspected. None is a new Longshot screenshot.

Risk and rollback

A wrong continuation note or save lifecycle assumption could load an older save or keep Restart waiting. Set Restart in place Off (restart_in_place=0) for the ordinary title restart; keep Skip title screen Off (skip_title_screen=0) for manual loading. Do not set HOS_RESTART_CONTINUE manually. Cancelling stops relaunch, not an already accepted autosave; reverting the change removes this behavior but does not undo written saves. The historical and current untested limits above remain.

Reviewer notes

Start with oot_restart.c save/write/commit gates, oot_autoload.c continuation validation, menu cancellation and input isolation; then the headless display-loop repair. The credited dependency still waits on the linked Skip title work. Check both option44 ownership and opening52, and the retained Windows fixture failures/repairs before treating syntax as execution.

Issues

Original draft/report: https://github.com/NotRexed/Hookshot/issues/2607
Dependency: https://github.com/NotRexed/Hookshot/issues/1560
No corresponding restart issue or Skip title dependency pull request was found on Longshot in the public inventory checked during this move. The old GitHub numbers are not Forgejo issue numbers.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing. WIP; no current Longshot game run.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Repeated fixture proof is above; current-game/default/off-cost proof remains unrun.
  • 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.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

  • Flags noted, and the switch reference updated (docs/development.md, the README).

  • Screenshots for a change that shows on screen. Historical, explicitly labelled.

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

  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. No current game builds; fixture compilation only.

  • Docs updated.


Moved from NotRexed/Hookshot#2607.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]

## Why **Draft: this waits for Nicholas Gower's [Skip title work](https://github.com/NotRexed/Hookshot/issues/1560).** No open or merged Longshot pull request carrying that dependency was found in the complete public title/body inventory checked during this move. Its credited commit remains in this branch until the dependency lands, when it must be dropped during rebase. Applying a restart-only setting should not send the player back to the title to load an older save. With Restart in place on, Restart asks the game to autosave, relaunches and loads that save. No Longshot game build/run was requested for this draft; the new evidence is game-free, and the pictures below retain their original Hookshot identities. ## What changed - A separate headless-menu repair lets scripted confirmation presses count without window focus, posts Restart/Quit requests without a window, and serves them in the POSIX display loop. Shader preparation keeps its worker-completion path. - The credited title-loading dependency keeps Skip title screen off by default. The restart path reuses its newest-save lookup and title presses; the existing input-tap implementation is not duplicated. - **Restart in place is on by default.** The game must accept the autosave request, write and commit before relaunch. The menu displays waiting/refusal; Esc, leaving the row or closing the menu cancels the pending relaunch. A refusal asks again before returning to the title. - A one-use continuation note must still match the newest save's slot/time. The restarted process then loads that save even with Skip title screen off; input isolation applies to this automatic continuation, not ordinary Skip title starts. - Main's Skip opening **52**, live frame-rate cap **53**, renderer API **21**, dynamic display-mode choices, Auto/Dev changes and callbacks are retained. Skip title uses its reserved **44**; Restart in place uses **64**, without changing the host/renderer layout. - Migration-time test-only commits follow main's `README.md` case, apply the existing CRT policy before all fixture/forced headers, and update the opening-skip check to assert the **actual** Skip title enum at 44 rather than an obsolete reservation comment. All opening-52, no-collision, save/commit, cancellation and core-ownership assertions remain. **Risk:** this is the game's save/load, not a process snapshot. It does not preserve enemies or objects in flight. Cancelling after the game accepted a save does not undo that save; it cancels the relaunch. Windows uses a new process, while Linux's `execve` keeps its PID. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | `HOS_RESTART_CONTINUE` | New internal environment note: One-use slot/time/position continuation validated at restart | Unset | Off by default: internal handoff, not a player switch | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `RX_VK_MENU_SCRIPT` | Changed: Timed menu confirmation works without window focus, Restart/Quit included | Unset | Off by default: scripted tests | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `HOS_HEADLESS` | Changed behavior: Headless loop serves Restart/Quit; preparation keeps worker completion | Off | Off by default: testing/server operation | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `Restart in place` | New Gameplay row: Ask for a fresh save, then restart and load it | On | On after more testing: retain proposed default; current Longshot runtime untested | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `restart_in_place` | New ini key: Persists the Restart in place row | 1 | On after more testing: as the menu row | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `Skip title screen` | New Gameplay row/dependency: Automatically load the newest save at ordinary startup | Off | Off by default: player choice | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `skip_title_screen` | New ini key: Persists Skip title screen | 0 | Off by default: player choice | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `Restart` | Changed menu action: Autosave/continue while enabled; cancellation/refusal remain explicit | Inactive until confirmed | Off by default: automatic action | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `Restart now` | Changed confirmation action: Uses the same save-and-continue path | Inactive until confirmed | Off by default: automatic action | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `Quit` | Changed headless menu action: Can be confirmed through scripted windowless input | Inactive until confirmed | Off by default: automatic action | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `HOS_OPT_RESTART_PLACE` | New internal option64: Request/status channel between menu and game; no ABI field | 0, no request | Off by default: internal protocol | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | | `HOS_OPT_SKIP_TITLE` | Allocated internal option44: Answers the Skip title row without taking opening52 | 0, off | Off by default: follows player row | Applying restart-only settings | No process-snapshot restoration | Current Longshot game; Windows runtime | ## Measurements <!-- branch-state --> Branch state: on main `d725b3631982ed0035ea3ac9cbe1677e9fad260c`; head `74f8248ef5899f1f8f43af39f718ec79b1ae2583`; whole game-free suite on this head: `512 passed, 1 failed, 20 skipped` (main `d725b3631982ed0035ea3ac9cbe1677e9fad260c`: `510 passed, 1 failed, 20 skipped`); the commits are unchanged by rebases apart from the results table. <!-- /branch-state --> The sole failure in both suites in the branch-state block is `tests/test_updater_asset_digest.py`: local `NU1100` means `Microsoft.AspNetCore.App.Ref (= 10.0.13)` cannot be resolved. The historical suites below also include this failure. Main `d725b3631` differs from d4a69456 only by scripts, docs and tests, so earlier labelled behavior evidence remains applicable; no game code changed in the clean rebase. The new suite is recorded in the branch-state block, not substituted into the older evidence. main: d4a69456c9de5131589af1fcf9a09adba4c403d1 (2026-11-12) this PR: restart-in-place-next @ 9eb14298087d0944c0a668f130c4d4b81271b506 Hardware: Core i9-13900K, 96 GB RAM, Arch Linux 7.2.15-1-omarchy; repository-default compiler selection, with GCC for drivers that declare it. No GPU used for the new checks. Scene: authored restart/save/title state and temporary saves in the game-free fixtures; not a newly run game. Method: the previously recorded whole suite was on the then-final head9eb14298, after every commit; pinned-main suite shared for today's migrations. Two interleaved source-control pairs run the same restart test against main and branch. Test output, not duration, is the measurement. A feature's current-game and off-cost proof remains unrun. How to reproduce: `python -I -B tests/run_all.py --jobs 6 --strict`; `python -I -B tests/test_restart_in_place.py`. For a future game run, use a disposable save, change a restart-only setting, confirm Restart, verify fresh save/commit/continuation; separately cancel during the autosave wait. | | main @ d4a69456 | this PR @ 9eb14298 | |---|---|---| | Whole suite | 507 passed, 2 failed, 20 skipped | 510 passed, 1 failed, 20 skipped | | Restart test, run 1 / run 2 | Fails: row absent / fails: row absent | Pass / pass | | Median failed invocation count | 1 | 0 | | Current Longshot game | Not run | Not run; remains a draft | ```text vk_menu.cpp: no Gameplay row for Restart in place restart in place: all checks passed PASS: Restart in place saves by the game's own answer, and the game started again continues only from that save 507 passed, 2 failed, 20 skipped in 504 s (linux, 6 at once) 510 passed, 1 failed, 20 skipped in 239 s (linux, 6 at once) ``` The base suite was run once for all moved pull requests of this day, on that commit. The shared base also fails two bounded-time cases in `tests/test_appimage_package_retry.py`; that test passes here. No package was installed. These checks have not yet been run on a forge runner. The earlier Longshot suite, at `e0950172`, was 509/2/20: the same .NET failure plus `test_opening_skip.py` expecting the obsolete “44 is reserved” comment. The final test checks the real declaration instead, and the **complete suite was rerun** on the final head. Initial Windows-target captures also found missing early CRT policy. Those failures remain recorded; their corrected captures pass. Ten distinct translation-unit captures passed across the retained checks, with later execution-dependent variants outside their coverage. This is not Windows execution. **Historical hosted checks:** the archived record for GitHub head `ff3f413d265852a4499073cd2199b3ccf8bf3505` has all four Windows/Ubuntu source-check parts completed successfully in [run 43165972215](https://github.com/NotRexed/Hookshot/actions/runs/43165972215). That is not a check of this Longshot integration. Core restart/autoload files are rename-only; surrounding runtime/menu files retain newer main behavior, and the fixture adaptations above are new. The added-lines old-name scan is empty. **Historical game evidence, not repeated:** Hookshot `2a3c6f5c` on `6ff87f59`, 2026-11-11; Linux/RTX 4090/NVIDIA 615.78.08, windowless: | Historical case | this PR @ 2a3c6f5c (Hookshot) | |---|---| | Title restart | Relaunch uses the selected 1920x1080 instead of 2048x1152 | | Cancel | Cancelled after 2997 ms during autosave cooldown; original process continues, new size remains pending | | Save loaded | Wrote and committed a fresh save, relaunch loaded it, returned to Kokiri Forest after 52.8 s; 0.00 m displacement at the position log's printed precision, not full state restoration | ```text menu: restart, in place: the game is asked to save first restart: no game is in play yet: the game starts again at its title display: window closed for a restart (the Insert menu's Restart now) hookshot v2.1.0-rc.3-193-g2a3c6f5c (source 5feb7b9a) oe: output resolution 1920x1080 ``` All three historical runs ended at their requested wall bounds, exit 124, without fatal/crash/device-loss lines. The title case had two startup virtual-core escapes. The save case's interval contained **one known NVIDIA mapping refusal**, not an all-zero kernel result; attribution to a process was unproved, and its original all-zero kernel expectation failed. No Xid or cache-operation fault was recorded. Those outcomes are not relabelled as new Longshot results or a performance comparison. The main suite is the shared once-per-base run, not repeated here. The complete branch suite ran after every commit, 2026-11-12 19:16:36–19:20:02 local, with the repository default compiler and a fresh HOME/XDG. Runner execution took 234 s on main and 206 s on the branch, not a performance comparison. All older failed runs remain above; no game or native Windows rerun is inferred. ## Testing **Tested:** on this PC (Arch Linux, RTX 4090 with NVIDIA 615.78.08, i9-13900K), the current-head whole game-free suite; no GPU was used for these new checks. The earlier two interleaved restart-fixture pairs at the measured commits above fail for the absent Gameplay row on main and pass save/commit/cancel/continuation checks on the branch. Ten distinct translation units compiled for the Windows target across the earlier checks; not run on Windows. Later execution-dependent variants were outside that coverage. Historical Hookshot `2a3c6f5c` on `6ff87f59` changed the title's output size to `1920x1080` through Restart, cancelled during the autosave wait while keeping the original process running, and saved/relaunched back to the logged Kokiri Forest position. These were windowless Linux checks, not a new Longshot run. Tested but not measured: historical Hookshot functional scenarios below; no new Longshot game run. **Not tested:** no Longshot game build/run was requested for this draft; current-game off-cost/default comparison remains unrun while the Skip title dependency is pending. No AMD/Deck, physical input, window/monitor restoration, co-op reconnection, long sessions, corrupt saves, other areas or current-build Restart in place off run. The retained game evidence is bounded, historical Linux/windowless testing; Windows-target syntax is not a Windows game. No test request was posted during this move. The title-flow automation can time out; it does not validate damaged save contents. A save refused by the game is not forced. **Needs other testers:** - Windows x64: run the changed restart/title/file-open fixtures and try Restart plus cancellation with a disposable Kokiri Forest save, expecting passing fixtures, restart into the fresh save in a new process and cancellation to keep the original process running (request to open) ## Screenshots No current-game pair: main @ d4a69456 and this PR @ 9eb14298 were checked game-free, not photographed in game. Historical screenshots are this PR @ 2a3c6f5c (Hookshot), as labelled below. ![Hookshot `2a3c6f5c`, 2026-11-11: choose 1920x1080, confirm Restart, replacement reaches the title. The size change comes from the log, not the scaled capture.](https://git.magicbean.dev/attachments/cf609a87-1d43-4a6d-a880-6fd16f0a00f9) ![Same Hookshot build/date: waiting for autosave, cancellation leaves the selected size pending, original process continues.](https://git.magicbean.dev/attachments/0c379e74-ff89-4734-8816-7f9e4294ace8) ![Same Hookshot build/date: before Restart, autosave wait, return to the same logged position. The camera differs because this is a save/load.](https://git.magicbean.dev/attachments/d28f7d8a-a953-41ff-bd4b-3b53d07820ce) All three retained panels were inspected. None is a new Longshot screenshot. ## Risk and rollback A wrong continuation note or save lifecycle assumption could load an older save or keep Restart waiting. Set Restart in place Off (`restart_in_place=0`) for the ordinary title restart; keep Skip title screen Off (`skip_title_screen=0`) for manual loading. Do not set `HOS_RESTART_CONTINUE` manually. Cancelling stops relaunch, not an already accepted autosave; reverting the change removes this behavior but does not undo written saves. The historical and current untested limits above remain. ## Reviewer notes Start with `oot_restart.c` save/write/commit gates, `oot_autoload.c` continuation validation, menu cancellation and input isolation; then the headless display-loop repair. The credited dependency still waits on the linked Skip title work. Check both option44 ownership and opening52, and the retained Windows fixture failures/repairs before treating syntax as execution. ## Issues Original draft/report: https://github.com/NotRexed/Hookshot/issues/2607 Dependency: https://github.com/NotRexed/Hookshot/issues/1560 No corresponding restart issue or Skip title dependency pull request was found on Longshot in the public inventory checked during this move. The old GitHub numbers are not Forgejo issue numbers. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. WIP; no current Longshot game run. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [ ] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Repeated fixture proof is above; current-game/default/off-cost proof remains unrun. - [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. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Flags noted, and the switch reference updated (docs/development.md, the README). - [x] Screenshots for a change that shows on screen. Historical, explicitly labelled. - [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. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. No current game builds; fixture compilation only. - [x] Docs updated. --- Moved from NotRexed/Hookshot#2607. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <[email protected]>
Keep the menu requests, the headless display loop and the POSIX main-loop entry together. Shader preparation keeps its worker-completion path. Extend the startup fixture with headless Restart and Quit while retaining window sizing, failure diagnostics and preparation checks.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Rebase Nicholas Gower’s pull request #1560 for the restart-in-place dependency. Keep the existing hos_hid_tap implementation, current menu rows and option handlers. The option remains off by default.

Co-Authored-By: Nicholas Gower <[email protected]>
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Keep the existing restart-in-place state machine on the current menu. Ask the game for its autosave before relaunching, pass a one-use continuation note and use the title-loading dependency to return to that save. Cancelling stops the pending restart. Adapt its status cell to the shared row renderer and leave compact mode before showing the save wait.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
The extracted OpenFile now calls the restart observer on successful writes. Supply a recording observer, keep every existing virtual-core assertion, and check successful, refused and failed writes without changing production code.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Record the tested build, menu setting change, inspected pictures and zero kernel driver lines. Keep the startup virtual-core escapes and shared-load limitation visible; no performance or window-placement claim.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Record the two authorized headless cases on the unchanged production build. Cancellation leaves the original process running; the saved restart returns to the same logged position. Keep the known kernel mapping-refusal line and the shared-load limits visible instead of claiming an all-zero kernel result.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Keep restart and title assertions, compile all fixture translation units with the existing secure-CRT policy, and follow main’s README.md case rename.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
The environment header is included before the generated fixture body. Select the same CRT declaration policy on the compile command, preserving all existing assertions and flags.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Skip title now occupies reserved option 44. Check its actual enum declaration while retaining all opening, option 52, no-collision and gameplay assertions. Declare the standard fixture CRT policy before headers for the Windows-target check.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <[email protected]>
Author
First-time contributor

Discussion carried over from NotRexed/Hookshot#2607

Every comment that was readable on the original thread when it was copied on 2026-11-12, in order, unchanged except that issue and pull request numbers are written as links to the old repository and names carry no @. Comments by an account that has since been closed there could no longer be read and are missing; where a reply quotes them, the quote remains.


mooki000, 2026-11-12 06:07 UTC (comment, original):

Rebased 14a058b1 onto current main 87991bc8 as ff3f413d, preserving all six commits and their complete messages/trailers, including Nicholas Gower's exact NotRexed/Hookshot#1560 co-author line. Resolutions retain both sets of historical test records, main's current prompts/camera/Bug report/reset behavior, and the updated Restart explanation in all 13 catalogues; save/resume behavior and defaults are unchanged. On the first rebase, GCC passed 137 selected checks and Clang 136 with only main's background-input fixture warning; the suite was 471 passed / 1 inherited failure / 20 skipped. Main then moved only by NotRexed/Hookshot#2671; the final rebase changes no PR file blob. Feature/fixture checks and main negatives were rerun with both compilers, along with NotRexed/Hookshot#2671's offline test and Windows-target host syntax (zero errors under the documented platform supplement). The final PR gate passes. The suite was not repeated, and no new game run or native Windows execution is claimed; this remains a draft carrying NotRexed/Hookshot#1560. Sources: the NotRexed/Hookshot#2607 evidence and final-handoff ledger above.

## Discussion carried over from NotRexed/Hookshot#2607 Every comment that was readable on [the original thread](https://github.com/NotRexed/Hookshot/pull/2607) when it was copied on 2026-11-12, in order, unchanged except that issue and pull request numbers are written as links to the old repository and names carry no @. Comments by an account that has since been closed there could no longer be read and are missing; where a reply quotes them, the quote remains. --- **mooki000**, 2026-11-12 06:07 UTC (comment, [original](https://github.com/NotRexed/Hookshot/pull/2607#issuecomment-6816117174)): Rebased `14a058b1` onto current main `87991bc8` as `ff3f413d`, preserving all six commits and their complete messages/trailers, including Nicholas Gower's exact [NotRexed/Hookshot#1560](https://github.com/NotRexed/Hookshot/issues/1560) co-author line. Resolutions retain both sets of historical test records, main's current prompts/camera/Bug report/reset behavior, and the updated Restart explanation in all 13 catalogues; save/resume behavior and defaults are unchanged. On the first rebase, GCC passed 137 selected checks and Clang 136 with only main's background-input fixture warning; the suite was 471 passed / 1 inherited failure / 20 skipped. Main then moved only by [NotRexed/Hookshot#2671](https://github.com/NotRexed/Hookshot/issues/2671); the final rebase changes no PR file blob. Feature/fixture checks and main negatives were rerun with both compilers, along with [NotRexed/Hookshot#2671](https://github.com/NotRexed/Hookshot/issues/2671)'s offline test and Windows-target host syntax (zero errors under the documented platform supplement). The final PR gate passes. The suite was not repeated, and no new game run or native Windows execution is claimed; this remains a draft carrying [NotRexed/Hookshot#1560](https://github.com/NotRexed/Hookshot/issues/1560). Sources: the [NotRexed/Hookshot#2607](https://github.com/NotRexed/Hookshot/issues/2607) evidence and final-handoff ledger above.
Author
First-time contributor

Rebased onto main d725b3631 as 74f8248e and updated the description with settings, labelled comparisons, reproduction and rollback. Earlier results, uploaded pictures and limitations retain their tested commits; intervening main changes are scripts, docs and tests only. The exact refreshed head's whole suite is 512 passed, 1 failed and 20 skipped, with only the same local .NET reference-pack failure as current main. This remains WIP pending the Skip title dependency and a current Longshot game/off-cost proof.

Rebased onto main d725b3631 as 74f8248e and updated the description with settings, labelled comparisons, reproduction and rollback. Earlier results, uploaded pictures and limitations retain their tested commits; intervening main changes are scripts, docs and tests only. The exact refreshed head's whole suite is 512 passed, 1 failed and 20 skipped, with only the same local .NET reference-pack failure as current main. This remains WIP pending the Skip title dependency and a current Longshot game/off-cost proof.
mooki force-pushed restart-in-place-next from 9eb1429808 to 74f8248ef5
All checks were successful
PR description / Description follows the template (pull_request_target) Successful in 2s
2026-11-13 01:34:03 +00:00
Compare
Author
First-time contributor

Added the Testing section and updated its checklist. Added one branch base/suite block, consolidated duplicate results and simplified the supporting wording; everything else is unchanged.

Added the Testing section and updated its checklist. Added one branch base/suite block, consolidated duplicate results and simplified the supporting wording; everything else is unchanged.
All checks were successful
PR description / Description follows the template (pull_request_target) Successful in 2s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'restart-in-place-next:mooki-restart-in-place-next'
git switch 'mooki-restart-in-place-next'
Sign in to join this conversation.
No description provided.