Keep the launcher script path intact on F1 restart #3303

Open
merzleckeier wants to merge 2 commits from upstream-pr/3303 into main
merzleckeier commented 2026-12-03 06:50:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T06:50:13Z.


Claimed in the coordination issue as D3D12-F1-RESTART-SCRIPT-PATH.

What and why

F1 Save and Restart embeds the launcher script path in PowerShell source, where a typographic apostrophe in the checkout path can end the string early. Pass the original path in the child process's environment and let PowerShell's call operator read it as one value. The restart delay, options, console behavior and replayed argument text stay as before. #3253 covers quoting values in that replayed argument text.

Tested

  • Red/green against d9b618f1, using the actual command builders and synthetic scripts under PowerShell 7.7.0 on Linux. Previously all four typographic cases (U+2018 through U+201B) failed to parse. Now all four and the ASCII apostrophe case execute the exact script and bind both test switches.
  • Windows MSVC diagnostics build under Wine 11.22: all three host::menu::tests:: tests passed, including the new test for the child environment and command.
  • Changed-file clean-room check and git diff --check passed. Native Windows PowerShell 5.1 execution remains unverified.

GPUs tested: n/a. All tests used synthetic launcher inputs.

AI-assisted: OpenAI Codex (GPT-6) for implementation and a separate read-only GPT-6.2 Sol review.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • Clean-room check passed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5621510667 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T06:50:13Z. --- Claimed in the coordination issue as [D3D12-F1-RESTART-SCRIPT-PATH](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7370215588). ### What and why F1 Save and Restart embeds the launcher script path in PowerShell source, where a typographic apostrophe in the checkout path can end the string early. Pass the original path in the child process's environment and let PowerShell's call operator read it as one value. The restart delay, options, console behavior and replayed argument text stay as before. #3253 covers quoting values in that replayed argument text. ### Tested - Red/green against `d9b618f1`, using the actual command builders and synthetic scripts under PowerShell 7.7.0 on Linux. Previously all four typographic cases (U+2018 through U+201B) failed to parse. Now all four and the ASCII apostrophe case execute the exact script and bind both test switches. - Windows MSVC diagnostics build under Wine 11.22: all three `host::menu::tests::` tests passed, including the new test for the child environment and command. - Changed-file clean-room check and `git diff --check` passed. Native Windows PowerShell 5.1 execution remains unverified. GPUs tested: n/a. All tests used synthetic launcher inputs. AI-assisted: OpenAI Codex (GPT-6) for implementation and a separate read-only GPT-6.2 Sol review. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] Clean-room check passed.
fiestorra commented 2026-12-03 07:06:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T07:06:21Z.


VERIFY-3303 — 6 tests de menu en verde, y es la confirmación de que la prueba de este menú está donde debe

d3d12/crates/leonida-gpu/src/host/menu.rs   1 file changed, 29 insertions(+), 8 deletions(-)
cargo test -p leonida-gpu --lib menu        6 passed

El cambio: mantener intacta la ruta del script del launcher en el reinicio de F1 — o sea, el mismo flujo que #3233/#3247/#3269 por el otro lado: ellos lo tocan en play-nvidia.ps1 y en los tests de PowerShell; este lo toca en el menú del runtime.

Y eso es lo que quiero señalar: el mismo botón (F1 SAVE AND RESTART) tiene lógica en tres sitios — el menú del runtime, el script de play, y los tests de los dos, y cada PR toca uno. Si entran tres arreglos parciales sin un test que ate los tres, la próxima vez que alguien cambie F1 va a romper uno de los lados sin saberlo.

Lo que verifiqué: los 6 tests de menu con el cambio.
Lo que no: el reinicio de verdad con F1, que necesita el juego.
Y la pregunta que le haría: ¿el test comprueba la ruta que se pasa al script o sólo que la cadena se conserva? La primera es la que importa; la segunda puede pasar con una ruta que ya no existe.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370599108 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303#issuecomment-7370599108). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T07:06:21Z. --- ## VERIFY-3303 — 6 tests de `menu` en verde, y es la confirmación de que la prueba de este menú está donde debe ``` d3d12/crates/leonida-gpu/src/host/menu.rs 1 file changed, 29 insertions(+), 8 deletions(-) cargo test -p leonida-gpu --lib menu 6 passed ``` **El cambio**: **mantener intacta la ruta del script del launcher en el reinicio de F1** — **o sea, el mismo flujo que `#3233`/`#3247`/`#3269` por el otro lado**: **ellos lo tocan en `play-nvidia.ps1` y en los tests de PowerShell; este lo toca en el menú del runtime.** **Y eso es lo que quiero señalar**: **el mismo botón (F1 SAVE AND RESTART) tiene lógica en tres sitios** — **el menú del runtime, el script de `play`, y los tests de los dos**, **y cada PR toca uno.** **Si entran tres arreglos parciales sin un test que ate los tres, la próxima vez que alguien cambie F1 va a romper uno de los lados sin saberlo.** **Lo que verifiqué**: **los 6 tests de `menu` con el cambio.** **Lo que no**: **el reinicio de verdad con F1, que necesita el juego.** **Y la pregunta que le haría**: **¿el test comprueba la ruta que se pasa al script o sólo que la cadena se conserva?** **La primera es la que importa; la segunda puede pasar con una ruta que ya no existe.**
lixonik commented 2026-12-03 07:17:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T07:17:04Z.


Windows native verification -- PASS on head 2872ebbfb (merged cleanly via git merge --no-ff onto main d9b618f10).

Checks (Windows 10 x64)

  • python -I scripts/check_no_game_data.py -> PASS
  • cargo test -p leonida-gpu --lib --locked menu:: -> 3 passed, 0 failed (covers d3d12/crates/leonida-gpu/src/host/menu.rs)

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370811687 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303#issuecomment-7370811687). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T07:17:04Z. --- **Windows native verification -- PASS** on head `2872ebbfb` (merged cleanly via `git merge --no-ff` onto `main` `d9b618f10`). ### Checks (Windows 10 x64) - `python -I scripts/check_no_game_data.py` -> **PASS** - `cargo test -p leonida-gpu --lib --locked menu::` -> **3 passed, 0 failed** (covers `d3d12/crates/leonida-gpu/src/host/menu.rs`) AI-assisted: yes (Antigravity -- Gemini 4 Neon).
merzleckeier commented 2026-12-03 07:18:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T07:18:50Z.


The original Rust test checks command construction. In 5942d059 I added an execution regression using the production restart_process command. It launches a real synthetic PowerShell script from a directory named Mandy’s checkout. The script requires both switches and writes its own $PSCommandPath, which the test checks against the intended script. The old inline path makes this test fail, and the fix passes with PowerShell 7.7.0.

The full Windows MSVC build passed under Wine; the test requiring powershell.exe skipped there because the executable was unavailable. The native D3D12 CI job is running for this head. A separate GPT-6.2 Sol reviewer checked the update. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370847323 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303#issuecomment-7370847323). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T07:18:50Z. --- The original Rust test checks command construction. In `5942d059` I added an execution regression using the production `restart_process` command. It launches a real synthetic PowerShell script from a directory named `Mandy’s checkout`. The script requires both switches and writes its own `$PSCommandPath`, which the test checks against the intended script. The old inline path makes this test fail, and the fix passes with PowerShell 7.7.0. The full Windows MSVC build passed under Wine; the test requiring `powershell.exe` skipped there because the executable was unavailable. The [native D3D12 CI job](https://github.com/ProjectLeonida/mandy/actions/runs/47056574446) is running for this head. A separate GPT-6.2 Sol reviewer checked the update. AI-assisted with OpenAI Codex.
merzleckeier commented 2026-12-03 07:27:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T07:27:33Z.


All CI jobs are now green on 5942d059. The native D3D12 Windows job reports ok for restart_runs_the_launcher_script_from_a_quoted_directory as well as the command-construction test. The execution test uses a synthetic launcher script. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7371021254 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303#issuecomment-7371021254). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T07:27:33Z. --- All CI jobs are now green on `5942d059`. The [native D3D12 Windows job](https://github.com/ProjectLeonida/mandy/actions/runs/47056574446/job/144081322402) reports `ok` for `restart_runs_the_launcher_script_from_a_quoted_directory` as well as the command-construction test. The execution test uses a synthetic launcher script. AI-assisted with OpenAI Codex.
MoonEyes commented 2026-12-03 07:31:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T07:31:20Z.


RUN (in game, batch of two pull requests), each head merged with git merge --no-ff onto main d9b618f10, in one build: #3291 6b0ee46be, #3303 2872ebbfb. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 16.1, mean 16.9
Rendered fps, last 120 s median 16.1
Time under 5 fps in the world 0 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #3303 moved during the run to 5942d0596, which only adds a #[test] inside mod tests of host/menu.rs (git diff 2872ebbfb 5942d0596 outside *.md is that test alone), so this run also stands for that head.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. #3291's ceiling is opt-in and was left off. #3303 changes the F1 SAVE AND RESTART path, which was not exercised in game here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7371097096 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3303#issuecomment-7371097096). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T07:31:20Z. --- RUN (in game, batch of two pull requests), each head merged with `git merge --no-ff` onto main `d9b618f10`, in one build: #3291 `6b0ee46be`, #3303 `2872ebbfb`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 16.1, mean 16.9 | | Rendered fps, last 120 s | median 16.1 | | Time under 5 fps in the world | 0 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #3303 moved during the run to `5942d0596`, which only adds a `#[test]` inside `mod tests` of `host/menu.rs` (`git diff 2872ebbfb 5942d0596` outside `*.md` is that test alone), so this run also stands for that head. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. #3291's ceiling is opt-in and was left off. #3303 changes the F1 SAVE AND RESTART path, which was not exercised in game here. AI-assisted (Claude Code).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3303:upstream-pr/3303'
git switch 'upstream-pr/3303'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3303'
git switch 'upstream-pr/3303'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3303'
git switch 'upstream-pr/3303'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3303'
git switch 'main'
git merge --squash 'upstream-pr/3303'
git switch 'main'
git merge --ff-only 'upstream-pr/3303'
git switch 'main'
git merge 'upstream-pr/3303'
git push origin 'main'
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!3303
No description provided.