Return the Vulkan runtime exit status from play.ps1 #3282

Manually merged
github merged 1 commit from github-bot/gh-3282 into gh-pr/3282/base 2026-12-03 15:19:42 +00:00 AGit
Owner

@⁠merzleckeier on GitHub · 2026-12-03 02:42 UTC · original
merzleckeier:fix/vulkan-play-exit-status → main · +51 −0 · 2 files · 1 commits · merged 2026-12-03 15:16 UTC

Claimed in the coordination issue as VULKAN-PLAY-EXIT-STATUS.

What and why

When gta6rt.exe fails, scripts/play.ps1 prints its hexadecimal exit code and PowerShell returns success to the caller. Return the runtime’s exit code after logging it so scripts and automation can detect a failed launch.

Tested

  • Regression on d15e048a: a simulated runtime status of 7 was logged and returned as 0. With this change, the test passed for statuses 0 and 7.
  • Direct pwsh -File calls with a real synthetic child process on Linux PowerShell 7.7.0 confirmed both exit codes and the original log line.
  • Combined with #3280 at fff47a33 without a merge conflict. The new test and all six runnable launcher tests passed. Five launcher tests were skipped on Linux.
  • git diff --check and python -I scripts/check_no_game_data.py scripts/play.ps1 tests/test_play_ps1_exit.py passed.

GPUs tested: n/a (synthetic launcher tests).

AI-assisted: OpenAI Codex (GPT-6), with independent read-only review by GPT-6.2 Sol.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
**@⁠merzleckeier** on GitHub · 2026-12-03 02:42 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3282) `merzleckeier:fix/vulkan-play-exit-status` → `main` · +51 −0 · 2 files · 1 commits · merged 2026-12-03 15:16 UTC Claimed in the coordination issue as [VULKAN-PLAY-EXIT-STATUS](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570). ### What and why When `gta6rt.exe` fails, `scripts/play.ps1` prints its hexadecimal exit code and PowerShell returns success to the caller. Return the runtime’s exit code after logging it so scripts and automation can detect a failed launch. ### Tested - Regression on `d15e048a`: a simulated runtime status of 7 was logged and returned as 0. With this change, the test passed for statuses 0 and 7. - Direct `pwsh -File` calls with a real synthetic child process on Linux PowerShell 7.7.0 confirmed both exit codes and the original log line. - Combined with #3280 at `fff47a33` without a merge conflict. The new test and all six runnable launcher tests passed. Five launcher tests were skipped on Linux. - `git diff --check` and `python -I scripts/check_no_game_data.py scripts/play.ps1 tests/test_play_ps1_exit.py` passed. GPUs tested: n/a (synthetic launcher tests). AI-assisted: OpenAI Codex (GPT-6), with independent read-only review by GPT-6.2 Sol. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 02:53:10 +00:00
Author
Owner

@⁠fiestorra on GitHub · 2026-12-03 02:43 UTC · original

VERIFY-3282 — Windows nativo: una línea, y el control la quita

Un commit, dos ficheros:

scripts/play.ps1            |  1 +
tests/test_play_ps1_exit.py | 50 +++++++++++++++++++++++++++++++++

Y la línea es la que su título dice:

+exit $process.ExitCode

En el head (c355e40b7):

pytest tests/test_play_ps1_exit.py -q     1 passed (0.74 s)

Control (sintético): exit $process.ExitCode → exit 0:

1 failed
  >  self.assertEqual(result.returncode, status, output)

Muerde, y muerde en la aserción que importa: el lanzador devolvía 0 aunque el runtime hubiera fallado, que es lo que hace que un script llamado desde otro script (o desde el launcher) cuente un crash como un éxito. Y la otra aserción del test — assertIn(f"exit code 0x{status:08X}", output) — comprueba que además se dice, que es la mitad que hace falta cuando alguien mira el log en vez del código de salida.

Lo que no probé: el runtime de Vulkan de verdad — el test construye un proceso que termina con un estado conocido, así que lo verificado es que play.ps1 lo propaga, no que ese estado signifique lo que significa dentro de gta6rt.

Y una nota sobre el tamaño: una línea de producción y cincuenta de test es la proporción correcta para esto — el valor no está en exit $process.ExitCode, está en que alguien escribió el test que lo distingue de exit 0 en las dos direcciones.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-03 02:43 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7365799134) ## VERIFY-3282 — Windows nativo: una línea, y el control la quita **Un commit, dos ficheros**: ``` scripts/play.ps1 | 1 + tests/test_play_ps1_exit.py | 50 +++++++++++++++++++++++++++++++++ ``` **Y la línea es la que su título dice**: ```powershell +exit $process.ExitCode ``` **En el head (`c355e40b7`)**: ``` pytest tests/test_play_ps1_exit.py -q 1 passed (0.74 s) ``` **Control (sintético)**: **`exit $process.ExitCode` → `exit 0`**: ``` 1 failed > self.assertEqual(result.returncode, status, output) ``` **Muerde, y muerde en la aserción que importa**: **el lanzador devolvía 0 aunque el runtime hubiera fallado**, **que es lo que hace que un script llamado desde otro script (o desde el launcher) cuente un crash como un éxito.** **Y la otra aserción del test — `assertIn(f"exit code 0x{status:08X}", output)` — comprueba que además se *dice***, **que es la mitad que hace falta cuando alguien mira el log en vez del código de salida.** **Lo que no probé**: **el runtime de Vulkan de verdad** — **el test construye un proceso que termina con un estado conocido**, **así que lo verificado es que `play.ps1` lo propaga**, **no que ese estado signifique lo que significa dentro de `gta6rt`.** **Y una nota sobre el tamaño**: **una línea de producción y cincuenta de test es la proporción correcta para esto** — **el valor no está en `exit $process.ExitCode`, está en que alguien escribió el test que lo distingue de `exit 0` en las dos direcciones.** Written with an AI assistant.
Author
Owner

@⁠lixonik on GitHub · 2026-12-03 06:29 UTC · original

Windows native verification (red -> green) -- PASS on head c355e40b7 (merged cleanly via git merge --no-ff onto main d9b618f10).

Checks (Windows 10 x64, Python 3.12, PowerShell 5.1)

  • python -I scripts/check_no_game_data.py -> PASS
  • Green:
    • python -I tests/test_play_ps1_exit.py -v -> Ran 1 test in 0.514s / OK
  • Red (reverted scripts/play.ps1 to main d9b618f10, keeping the PR's tests):
    • tests/test_play_ps1_exit.py -> Ran 1 test in 0.497s / FAILED (failures=1) (exit 1)

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

**@⁠lixonik** on GitHub · 2026-12-03 06:29 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7369888527) **Windows native verification (`red -> green`) -- PASS** on head `c355e40b7` (merged cleanly via `git merge --no-ff` onto `main` `d9b618f10`). ### Checks (Windows 10 x64, Python 3.12, PowerShell 5.1) - `python -I scripts/check_no_game_data.py` -> **PASS** - **Green:** - `python -I tests/test_play_ps1_exit.py -v` -> **Ran 1 test in 0.514s / OK** - **Red** (reverted `scripts/play.ps1` to `main` `d9b618f10`, keeping the PR's tests): - `tests/test_play_ps1_exit.py` -> **Ran 1 test in 0.497s / FAILED (failures=1)** (exit `1`) AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Author
Owner

@⁠TurboTheTurtle on GitHub · 2026-12-03 07:09 UTC · original

tested: the new test passes and the printed code is the process's own. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB, tree at e5c777734 (three d3d12/README.md commits on main d9b618f10).

python -I tests/test_play_ps1_exit.py -> Ran 1 test in 0.650s, OK, rc 0. node --test tests/test_*.cjs -> 113 tests, 0 fail. Head c355e40b7.

The one line lands where the process is already waited for, so exit code 0x... at scripts/play.ps1:66 and the returned status come from the same $process.ExitCode, which is what the D3D12 side does too: every preset under d3d12/scripts hands back its layer's status, and the four preset starts measured on this card each returned the code their test expected.

**@⁠TurboTheTurtle** on GitHub · 2026-12-03 07:09 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7370664077) tested: the new test passes and the printed code is the process's own. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB, tree at `e5c777734` (three `d3d12/README.md` commits on main `d9b618f10`). `python -I tests/test_play_ps1_exit.py` -> `Ran 1 test in 0.650s`, `OK`, rc 0. `node --test tests/test_*.cjs` -> 113 tests, 0 fail. Head `c355e40b7`. The one line lands where the process is already waited for, so `exit code 0x...` at `scripts/play.ps1:66` and the returned status come from the same `$process.ExitCode`, which is what the D3D12 side does too: every preset under `d3d12/scripts` hands back its layer's status, and the four preset starts measured on this card each returned the code their test expected.
github-bot changed target branch from main to gh-pr/3282/base 2026-12-03 15:19:14 +00:00
github manually merged commit c355e40b78 into gh-pr/3282/base 2026-12-03 15:19:19 +00:00
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!3282
No description provided.