Return failure status for D3D12 launcher preflight errors #3220

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

@⁠merzleckeier on GitHub · 2026-12-02 20:21 UTC · original
merzleckeier:fix/nvidia-launch-preflight-status → main · +69 −7 · 2 files · 1 commits · open

Claimed in the coordination issue as D3D12-LAUNCHER-PREFLIGHT-STATUS.

Depends on: #3210 for propagating the resulting status through the public Windows wrapper and the Series X 2160p preset. Direct invocation of play-nvidia.ps1 benefits on its own.

What and why

Seven existing preflight checks print a diagnostic and abort the launch, but report status 0 to the caller. Report status 1 for the missing title, conflicting options, unavailable Cargo or runtime, and missing Agility SDK. Keep the missing-Agility dry run available as a settings preview.

Tested

  • Synthetic fixture with PowerShell 7.7.0 on Linux. All seven rejection cases failed on main because the status was 0. They report 1 with the change, and the preview reports 0 on both versions.
  • Launcher suite passed on the branch (5 passed, 2 Windows-only skips). The 20 switch checks, 3 line-ending tests, no-game-data and whitespace checks passed.
  • Clean local merge with #3210 at 917cb9e32. The public wrapper forwarded status 1 for both the DLSS conflict and missing Agility, and 0 for the dry-run preview. The Series X 2160p preset forwarded status 1 for missing Agility. Those integration runs used a mocked Windows build and empty executable fixtures under PowerShell on Linux.

GPUs tested: n/a (synthetic checks, no runtime process started).

AI-assisted: OpenAI GPT-6.2 through Codex. GPT-6.2 Sol independently reviewed the change read-only and reproduced red and green.

Checklist

  • Based on upstream main at b41763227.
  • One topic.
  • Synthetic fixtures only.
  • Translator rule: n/a.
**@⁠merzleckeier** on GitHub · 2026-12-02 20:21 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220) `merzleckeier:fix/nvidia-launch-preflight-status` → `main` · +69 −7 · 2 files · 1 commits · open Claimed in the coordination issue as [D3D12-LAUNCHER-PREFLIGHT-STATUS](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570). Depends on: #3210 for propagating the resulting status through the public Windows wrapper and the Series X 2160p preset. Direct invocation of `play-nvidia.ps1` benefits on its own. ### What and why Seven existing preflight checks print a diagnostic and abort the launch, but report status 0 to the caller. Report status 1 for the missing title, conflicting options, unavailable Cargo or runtime, and missing Agility SDK. Keep the missing-Agility dry run available as a settings preview. ### Tested - Synthetic fixture with PowerShell 7.7.0 on Linux. All seven rejection cases failed on `main` because the status was 0. They report 1 with the change, and the preview reports 0 on both versions. - Launcher suite passed on the branch (5 passed, 2 Windows-only skips). The 20 switch checks, 3 line-ending tests, no-game-data and whitespace checks passed. - Clean local merge with #3210 at `917cb9e32`. The public wrapper forwarded status 1 for both the DLSS conflict and missing Agility, and 0 for the dry-run preview. The Series X 2160p preset forwarded status 1 for missing Agility. Those integration runs used a mocked Windows build and empty executable fixtures under PowerShell on Linux. GPUs tested: n/a (synthetic checks, no runtime process started). AI-assisted: OpenAI GPT-6.2 through Codex. GPT-6.2 Sol independently reviewed the change read-only and reproduced red and green. ### Checklist - [x] Based on upstream `main` at `b41763227`. - [x] One topic. - [x] Synthetic fixtures only. - Translator rule: n/a.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 20:26:53 +00:00
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 20:38 UTC · original

VERIFY-3220 — Windows nativo con PowerShell de verdad: el test del PR se ejecuta aquí, no se salta

Head (this PR)
Merge base b41763227 = current main

Ran

python -I tests/test_win_launchers.py                          Ran 7 tests in 6.29s — OK
python -I tests/test_win_launchers.py -k nvidia_preflight      Ran 1 test in 2.93s — OK   (not skipped)
d3d12/scripts/play-nvidia.ps1 parses with 0 errors

The skipUnless(POWERSHELL) guard is why the author could only run this on Linux as a skip: here the test really runs, and it runs the real script (copied to a temp scripts/ beside a synthetic title and a fake target\release\leonida.exe, with Get-CimInstance stubbed) through all eight cases — missing_title, dlss_and_height, fixed_and_dynamic, dlss_and_no_dlss, no_cargo, missing_runtime, missing_agility → exit 1, and preview → exit 0 — asserting the printed line for each.

Negative control (d3d12/scripts/play-nvidia.ps1 reverted to main, the PR's tests kept):

FAIL: test_nvidia_preflight_failures_return_nonzero_and_keep_the_dry_run_preview   (x4 subtests)
Ran 7 tests — FAILED

What the exit code does downstream, measured rather than assumed

I probed whether exit 1 inside a script called with & can cut off its caller (it cannot: the child script ends, the caller's $LASTEXITCODE becomes 1 and it keeps running), so scripts/play-d3d12.ps1:134 (& ...play-nvidia.ps1 @launch) and scripts/game-gate.ps1:266 ($code = $LASTEXITCODE) do see the number.

One thing this PR does not reach: the play-S-*.ps1 / play-X-*.ps1 wrappers end on the & ...play-nvidia.ps1 ... line and never exit $LASTEXITCODE, so a wrapper run as pwsh -File play-S-1080p.ps1 still returns 0 after a preflight failure. That is outside this PR's stated scope, but if those wrappers are meant to report failure to a shell, they need the line.

What I could not test

  • A real launch: every case is synthetic (fake title, fake runtime); no game run.
  • Launcher.bat end to end: it starts the Python launcher, not this script.

Verdict: red then green on native Windows, with the PowerShell-dependent test actually executed.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 20:38 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7358084273) ## VERIFY-3220 — Windows nativo con PowerShell de verdad: el test del PR **se ejecuta aquí**, no se salta | | | |---|---| | Head | `(this PR)` | | Merge base | `b41763227` = current `main` | **Ran** ``` python -I tests/test_win_launchers.py Ran 7 tests in 6.29s — OK python -I tests/test_win_launchers.py -k nvidia_preflight Ran 1 test in 2.93s — OK (not skipped) d3d12/scripts/play-nvidia.ps1 parses with 0 errors ``` **The `skipUnless(POWERSHELL)` guard is why the author could only run this on Linux as a skip**: here the test really runs, and it runs the **real script** (copied to a temp `scripts/` beside a synthetic title and a fake `target\release\leonida.exe`, with `Get-CimInstance` stubbed) through all eight cases — `missing_title`, `dlss_and_height`, `fixed_and_dynamic`, `dlss_and_no_dlss`, `no_cargo`, `missing_runtime`, `missing_agility` → **exit 1**, and `preview` → **exit 0** — asserting the printed line for each. **Negative control** (`d3d12/scripts/play-nvidia.ps1` reverted to `main`, the PR's tests kept): ``` FAIL: test_nvidia_preflight_failures_return_nonzero_and_keep_the_dry_run_preview (x4 subtests) Ran 7 tests — FAILED ``` ## What the exit code does downstream, measured rather than assumed I probed whether `exit 1` inside a script called with `&` can cut off its caller (it cannot: the child script ends, the caller's `$LASTEXITCODE` becomes 1 and it keeps running), so `scripts/play-d3d12.ps1:134` (`& ...play-nvidia.ps1 @launch`) and `scripts/game-gate.ps1:266` (`$code = $LASTEXITCODE`) do see the number. **One thing this PR does not reach**: the `play-S-*.ps1` / `play-X-*.ps1` wrappers end on the `& ...play-nvidia.ps1 ...` line and never `exit $LASTEXITCODE`, so a wrapper run as `pwsh -File play-S-1080p.ps1` still returns 0 after a preflight failure. That is outside this PR's stated scope, but if those wrappers are meant to report failure to a shell, they need the line. ## What I could not test - **A real launch**: every case is synthetic (fake title, fake runtime); no game run. - **`Launcher.bat` end to end**: it starts the Python launcher, not this script. Verdict: **red then green** on native Windows, with the PowerShell-dependent test actually executed. Written with an AI assistant.
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-02 21:14 UTC · original

Additional coverage for 0beb7d26 on main 8877be37: I ran the checker with #3224 and #3227 combined, with PowerShell 7.7.0 on Linux. It reports red then green. Reversing each of the four PowerShell hunks independently (play-nvidia.ps1 lines 106, 146, 151 and 161) makes the new regression fail. All four report caught. Synthetic launcher fixtures only. AI-assisted.

**@⁠merzleckeier** on GitHub · 2026-12-02 21:14 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7358990565) Additional coverage for `0beb7d26` on `main` `8877be37`: I ran the checker with #3224 and #3227 combined, with PowerShell 7.7.0 on Linux. It reports `red then green`. Reversing each of the four PowerShell hunks independently (`play-nvidia.ps1` lines 106, 146, 151 and 161) makes the new regression fail. All four report `caught`. Synthetic launcher fixtures only. AI-assisted.
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-02 22:00 UTC · original

This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-12-02 22:00 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7360086921) This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-02 22:45 UTC · original

Linking the independent Windows verification in #3187. It includes this exact head 0beb7d26 merged onto main at 16243cd6 with #3187. All 10 launcher tests and all 4 Rust/Build Tools tests passed. The verification also exercises the missing-tool and missing-build exit paths through the launchers. It used synthetic launcher inputs on Windows 11 and PowerShell 5.1.

**@⁠merzleckeier** on GitHub · 2026-12-02 22:45 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7361126625) Linking the [independent Windows verification in #3187](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/3187). It includes this exact head `0beb7d26` merged onto `main` at `16243cd6` with #3187. All 10 launcher tests and all 4 Rust/Build Tools tests passed. The verification also exercises the missing-tool and missing-build exit paths through the launchers. It used synthetic launcher inputs on Windows 11 and PowerShell 5.1.
Author
Owner

@⁠lixonik on GitHub · 2026-12-02 22:47 UTC · original

Windows native verification (red -> green) -- PASS on head 0beb7d26d (merged cleanly via git merge --no-ff onto main 16243cd6e).

Checks (Windows 10 x64, Python 3.12)

  • python -I scripts/check_no_game_data.py -> PASS
  • Green (python -I tests/test_win_launchers.py -v on merged head 0beb7d26d): Ran 10 tests in 18.882s / OK
  • Red (reverted d3d12/scripts/play-nvidia.ps1 to main 16243cd6e, keeping the PR's tests/test_win_launchers.py): Ran 10 tests in 18.689s / FAILED (failures=7)

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

**@⁠lixonik** on GitHub · 2026-12-02 22:47 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7361171276) **Windows native verification (`red -> green`) -- PASS** on head `0beb7d26d` (merged cleanly via `git merge --no-ff` onto `main` `16243cd6e`). ### Checks (Windows 10 x64, Python 3.12) - `python -I scripts/check_no_game_data.py` -> **PASS** - **Green** (`python -I tests/test_win_launchers.py -v` on merged head `0beb7d26d`): **Ran 10 tests in 18.882s / OK** - **Red** (reverted `d3d12/scripts/play-nvidia.ps1` to `main` `16243cd6e`, keeping the PR's `tests/test_win_launchers.py`): **Ran 10 tests in 18.689s / FAILED (failures=7)** AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 15:26 UTC · original

In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3220, #3240, #3253 and #3257 merged into main b053a1813; this PR tested at its current head 0beb7d26d. Series S 1080, DLSS FG 2x, launched through play-nvidia.ps1 with -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s.

  • Result: PASS. No device lost, no crash, no unhandled exception; the run ended on its time limit.
  • Median over the last 240 s: 17.3 fps (main alone today: 16-17.5); 19.9 frames per 1000 over 100 ms.
  • Not covered: the F1 menu was not pressed by hand, and this does not test the specific path the PR changes beyond a normal launch.

AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.

**@⁠MoonEyes** on GitHub · 2026-12-03 15:26 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3220#issuecomment-7383155232) In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3220, #3240, #3253 and #3257 merged into main `b053a1813`; this PR tested at its current head `0beb7d26d`. Series S 1080, DLSS FG 2x, launched through `play-nvidia.ps1` with `-SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed`, scripted walk, 330 s. - Result: **PASS**. No device lost, no crash, no unhandled exception; the run ended on its time limit. - Median over the last 240 s: 17.3 fps (main alone today: 16-17.5); 19.9 frames per 1000 over 100 ms. - Not covered: the F1 menu was not pressed by hand, and this does not test the specific path the PR changes beyond a normal launch. AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.
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/3220/head:github-bot/gh-3220'
git switch 'github-bot/gh-3220'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3220'
git switch 'github-bot/gh-3220'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3220'
git switch 'github-bot/gh-3220'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3220'
git switch 'main'
git merge --squash 'github-bot/gh-3220'
git switch 'main'
git merge --ff-only 'github-bot/gh-3220'
git switch 'main'
git merge 'github-bot/gh-3220'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3220
No description provided.