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

Merged
merzleckeier merged 1 commit from upstream-pr/3282 into main 2026-12-03 15:16:47 +00:00
merzleckeier commented 2026-12-03 02:42:18 +00:00 (Migrated from github.com)

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


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5618805185 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3282). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T02:42:18Z. --- Claimed in the coordination issue as [VULKAN-PLAY-EXIT-STATUS](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7365703158). ### 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.
fiestorra commented 2026-12-03 02:43:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T02:43:53Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7365799134 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7365799134). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T02:43:53Z. --- ## 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.
lixonik commented 2026-12-03 06:29:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T06:29:10Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369888527 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7369888527). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T06:29:10Z. --- **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).
TurboTheTurtle commented 2026-12-03 07:09:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TurboTheTurtle on 2026-12-03T07:09:38Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370664077 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3282#issuecomment-7370664077). Originally posted by [TurboTheTurtle](https://github.com/TurboTheTurtle) on 2026-12-03T07:09:38Z. --- 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.
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!3282
No description provided.