make_game: the pipelines stage fills the runtime's own journal with gta6rt --precompile-pipelines (MAKE-GAME-PIPELINES-VIA-RUNTIME) #2392

Closed
qhukz13 wants to merge 9 commits from upstream-pr/2392 into main
qhukz13 commented 2026-11-26 17:42:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T17:42:49Z.


Claimed in the coordination issue as: MAKE-GAME-PIPELINES-VIA-RUNTIME (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198052250, corrected in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198532316)

Touches the code this replaces in: #2113, #1407, #846, #285, #1319 and #2042 (all on the vk_pipeline_check side of the stage). Built on top of RT-PRECOMPILE-SKIP-LIST-EXPLICIT (@aslan2142, now in main): this keeps its entry selection and its summary wording (check_precompile_skip_list.cmake passes).

What and why

make_game.py --stages pipelines ran vk_pipeline_check over the translated shaders and wrote one pipeline_cache.bin. The runtime never hits that cache, which the maintainers' status lists as "vk_pipeline_check never matches the runtime's cache keys":

  • The runtime looks a compute pipeline up in its own journal, pipeline_cache.d/cs-<key>.bin.
  • The checker creates its pipelines on a different device: no pApplicationName, its own executable name, robustness off, a different extension set, a different bindless set-0 layout, VK_SHADER_STAGE_ALL push constants for bound compute, and no decide_subgroup_size / REQUIRE_FULL_SUBGROUPS.
  • So even the driver's own cache keys differ. docs/running.md told players to skip the stage for that reason.

Closing those gaps one at a time in the checker would copy the runtime's device and layout code into a second program. gta6rt --precompile-pipelines already is that program: the same device, layouts, build_compute_pipeline and journal names as play. So the stage now runs it.

The change

make_game.py (stage pipelines):

  • It runs gta6rt.exe --precompile-pipelines --threads <jobs>, using the one in --out, else --runtime-build, else the default build folder. It runs natively on Windows and under Wine elsewhere, with WINE honoured.
  • LEONIDA_SHADERS and LEONIDA_PIPELINE_CACHE_DIR point at the run's work/shaders/spirv and --out, converted to Z:\... under Wine, unless the user set them.
  • The [precompile] i/n lines drive the stage's progress.
  • Exit codes:
    • 2 (some entries failed, or were skipped after a crash) is a warning;
    • 1 (no device or library) fails the stage;
    • anything else is a crash, and the stage reruns up to PIPELINE_CRASH_RETRIES (5).
  • Crashed entries go to <out>/pipeline_crashes.json as before, with each module's SHA-256.
  • Preflight: without the runtime stage, gta6rt.exe must exist; off Windows, Wine must exist. Off Windows without the cross-build or Wine, the default stage list drops pipelines along with runtime.
  • The vk_pipeline_check driving code goes: the exe lookup, staleness check, Linux auto-build, 500-entry batching and the BVH seeding pass. The precompile loads bvh/, fspx*/, exe/ and library/ itself. vk_pipeline_check, its tests, docs and the CI step that runs it stay: it remains the driver-acceptance checker.

gta6rt --precompile-pipelines: a module that kills the run is skipped next time. Before this, a crashed build left nothing behind: the requests/<name>.building lock is DELETE_ON_CLOSE. A rerun built the same module first again and died again.

  • New runtime/src/precompile_inflight.h: requests/inflight.txt lists <name> <key> for the entries inside the driver, rewritten before each create and after it. The key is the module file (size and last write, no read of the module) on this device and driver.
  • The next run moves what a dead run left there to requests/crashed.txt and skips an entry while its key is the one that crashed. Each gets a line, the summary adds , N crashed a run (only when N is not 0, so main's wording stands), and the exit code is 2.
  • A new translation of the module or a new driver gives a new key, so the next run tries it again by itself, and a build that returns clears it from the list. --all tries every recorded one now.
  • One precompile per journal folder (requests/precompile.lock), so a leftover list can only be a dead run's. A second one exits 3, which the stage reports as such, not as a device failure. --list touches nothing.
  • LEONIDA_PRECOMPILE_CRASH_TEST=<entry> ends the run just before that entry's create, so the crash path is tested by a real process death.

Graphics pipelines leave the stage. The runtime builds them at the title's draw from the PSO and the bound formats, and the checker's stub-paired pipelines never matched those (docs/d3d12_vulkan.md). Ordering them ahead of play is #2220 / #2260's work.

Docs updated: README.md, docs/running.md, docs/linux_proton.md, docs/linux.md, docs/pipeline_check.md, docs/d3d12_vulkan.md. Only the lines about the stage changed; the skip-list text and timings are left to RT-PRECOMPILE-SKIP-LIST-EXPLICIT.

Tested

Windows 10 Pro 19045, MSVC 14.44 RelWithDebInfo, GTX 1050 Ti (NVIDIA), on main 2d43417d4. No game files: two or three authored compute shaders (OpExecutionMode LocalSize n 1 1) written to a temporary library.

  • precompile_inflight_test (new, standard library only):

    • passes under MSVC, and under GCC 14 with -fsanitize=address,undefined and with ThreadSanitizer;
    • with the move of leftover entries into crashed.txt removed, it fails at the dead-run check.
  • gta6rt --precompile-pipelines with real process deaths (LEONIDA_PRECOMPILE_CRASH_TEST), 17 checks, all pass:

    • a crash inside an entry's create ends the run with 0xC0000005 and leaves <name> <key> in inflight.txt;
    • the next run names the entry, skips it, records it in crashed.txt, exits 2 with main's summary wording plus , 1 crashed a run, and keeps skipping it while the module file is unchanged;
    • after the module file is rewritten (a new translation), the next run builds it, exits 0 and clears the list;
    • --all builds a freshly crashed entry and clears the list;
    • a held journal folder exits 3, and --list writes nothing.
  • main's precompile_skip_list passes alongside precompile_inflight.

  • The stage end to end on the same machine, through make_game.pipelines() with that build as --runtime-build:

    • 3 journal files in <out>/pipeline_cache.d, progress 3/3;
    • with a crash planted in one entry, the first attempt dies, the retry skips it, and the stage completes with one warning that names it and says how it is retried, and pipeline_crashes.json naming it.

    make_game.py's CLI asks for a game package before any stage, so the run calls the stage function directly.

  • Python test files, on Windows (Python 3.12) and Linux (Python 3.14.8):

    • test_make_game_pipelines (rewritten around a fake gta6rt: arguments, environment, Wine paths, progress, exit codes 0/1/2/3, the retry limit, <name> <key> lines → pipeline_crashes.json, one warning);
    • test_make_game_pipeline_preflight (rewritten);
    • test_make_game_dry_run, test_make_game_platform, test_make_game_argparse, test_make_game_preflight, test_leonida_tui;
    • every other tests/test_make_game_*.py, plus test_ctest_registration, test_text_write_line_endings and test_docs_env_vars.

    test_make_game_pipeline_batches.py is removed with the batching it tested.

  • Every standalone tests/test_*.py on Linux (544 files): no new failure. The one failing file, test_calibrated_texture_extra (test_export_file_replacement_failure_cleans_temporary_file), fails the same way on main 935a2cd5b. The pytest-only files were not run here.

  • python -m compileall, make_game.py --help, scripts/check_no_game_data.py on every changed file, and git diff --check: clean.

Off Windows the stage now needs Wine and a Windows gta6rt.exe, as playing does; the shaders, assets and runtime stages do not. On a machine without them the stage says so in preflight.

Not tested: a real game library, and the stage under Wine (the Wine command line is covered by the tests, not run against a real Wine).

GPUs tested: NVIDIA GeForce GTX 1050 Ti, Windows 10.

AI-assisted: yes. Antigravity (Gemini 4 Neon) wrote the implementation plan and the make_game.py, test and docs changes. Claude Code wrote the runtime part, reviewed the rest, and ran the builds, tests and mutant.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5514716145 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-26T17:42:49Z. --- Claimed in the coordination issue as: MAKE-GAME-PIPELINES-VIA-RUNTIME (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198052250, corrected in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198532316) Touches the code this replaces in: #2113, #1407, #846, #285, #1319 and #2042 (all on the `vk_pipeline_check` side of the stage). Built on top of RT-PRECOMPILE-SKIP-LIST-EXPLICIT (@aslan2142, now in main): this keeps its entry selection and its summary wording (`check_precompile_skip_list.cmake` passes). ### What and why `make_game.py --stages pipelines` ran `vk_pipeline_check` over the translated shaders and wrote one `pipeline_cache.bin`. The runtime never hits that cache, which the maintainers' status lists as "vk_pipeline_check never matches the runtime's cache keys": - The runtime looks a compute pipeline up in its own journal, `pipeline_cache.d/cs-<key>.bin`. - The checker creates its pipelines on a different device: no `pApplicationName`, its own executable name, robustness off, a different extension set, a different bindless set-0 layout, `VK_SHADER_STAGE_ALL` push constants for bound compute, and no `decide_subgroup_size` / `REQUIRE_FULL_SUBGROUPS`. - So even the driver's own cache keys differ. `docs/running.md` told players to skip the stage for that reason. Closing those gaps one at a time in the checker would copy the runtime's device and layout code into a second program. `gta6rt --precompile-pipelines` already is that program: the same device, layouts, `build_compute_pipeline` and journal names as play. So the stage now runs it. ### The change **`make_game.py` (stage `pipelines`):** - It runs `gta6rt.exe --precompile-pipelines --threads <jobs>`, using the one in `--out`, else `--runtime-build`, else the default build folder. It runs natively on Windows and under Wine elsewhere, with `WINE` honoured. - `LEONIDA_SHADERS` and `LEONIDA_PIPELINE_CACHE_DIR` point at the run's `work/shaders/spirv` and `--out`, converted to `Z:\...` under Wine, unless the user set them. - The `[precompile] i/n` lines drive the stage's progress. - Exit codes: - 2 (some entries failed, or were skipped after a crash) is a warning; - 1 (no device or library) fails the stage; - anything else is a crash, and the stage reruns up to `PIPELINE_CRASH_RETRIES` (5). - Crashed entries go to `<out>/pipeline_crashes.json` as before, with each module's SHA-256. - Preflight: without the runtime stage, `gta6rt.exe` must exist; off Windows, Wine must exist. Off Windows without the cross-build or Wine, the default stage list drops `pipelines` along with `runtime`. - The `vk_pipeline_check` driving code goes: the exe lookup, staleness check, Linux auto-build, 500-entry batching and the BVH seeding pass. The precompile loads `bvh/`, `fspx*/`, `exe/` and `library/` itself. `vk_pipeline_check`, its tests, docs and the CI step that runs it stay: it remains the driver-acceptance checker. **`gta6rt --precompile-pipelines`: a module that kills the run is skipped next time.** Before this, a crashed build left nothing behind: the `requests/<name>.building` lock is `DELETE_ON_CLOSE`. A rerun built the same module first again and died again. - New `runtime/src/precompile_inflight.h`: `requests/inflight.txt` lists `<name> <key>` for the entries inside the driver, rewritten before each create and after it. The key is the module file (size and last write, no read of the module) on this device and driver. - The next run moves what a dead run left there to `requests/crashed.txt` and skips an entry while its key is the one that crashed. Each gets a line, the summary adds `, N crashed a run` (only when N is not 0, so main's wording stands), and the exit code is 2. - A new translation of the module or a new driver gives a new key, so the next run tries it again by itself, and a build that returns clears it from the list. `--all` tries every recorded one now. - One precompile per journal folder (`requests/precompile.lock`), so a leftover list can only be a dead run's. A second one exits 3, which the stage reports as such, not as a device failure. `--list` touches nothing. - `LEONIDA_PRECOMPILE_CRASH_TEST=<entry>` ends the run just before that entry's create, so the crash path is tested by a real process death. Graphics pipelines leave the stage. The runtime builds them at the title's draw from the PSO and the bound formats, and the checker's stub-paired pipelines never matched those (docs/d3d12_vulkan.md). Ordering them ahead of play is #2220 / #2260's work. Docs updated: `README.md`, `docs/running.md`, `docs/linux_proton.md`, `docs/linux.md`, `docs/pipeline_check.md`, `docs/d3d12_vulkan.md`. Only the lines about the stage changed; the skip-list text and timings are left to RT-PRECOMPILE-SKIP-LIST-EXPLICIT. ### Tested Windows 10 Pro 19045, MSVC 14.44 RelWithDebInfo, GTX 1050 Ti (NVIDIA), on main `2d43417d4`. No game files: two or three authored compute shaders (`OpExecutionMode LocalSize n 1 1`) written to a temporary library. - **`precompile_inflight_test`** (new, standard library only): - passes under MSVC, and under GCC 14 with `-fsanitize=address,undefined` and with ThreadSanitizer; - with the move of leftover entries into `crashed.txt` removed, it fails at the dead-run check. - **`gta6rt --precompile-pipelines` with real process deaths** (`LEONIDA_PRECOMPILE_CRASH_TEST`), 17 checks, all pass: - a crash inside an entry's create ends the run with `0xC0000005` and leaves `<name> <key>` in `inflight.txt`; - the next run names the entry, skips it, records it in `crashed.txt`, exits 2 with main's summary wording plus `, 1 crashed a run`, and keeps skipping it while the module file is unchanged; - after the module file is rewritten (a new translation), the next run builds it, exits 0 and clears the list; - `--all` builds a freshly crashed entry and clears the list; - a held journal folder exits 3, and `--list` writes nothing. - **main's `precompile_skip_list`** passes alongside `precompile_inflight`. - **The stage end to end on the same machine**, through `make_game.pipelines()` with that build as `--runtime-build`: - 3 journal files in `<out>/pipeline_cache.d`, progress `3/3`; - with a crash planted in one entry, the first attempt dies, the retry skips it, and the stage completes with one warning that names it and says how it is retried, and `pipeline_crashes.json` naming it. `make_game.py`'s CLI asks for a game package before any stage, so the run calls the stage function directly. - **Python test files**, on Windows (Python 3.12) and Linux (Python 3.14.8): - `test_make_game_pipelines` (rewritten around a fake `gta6rt`: arguments, environment, Wine paths, progress, exit codes 0/1/2/3, the retry limit, `<name> <key>` lines → `pipeline_crashes.json`, one warning); - `test_make_game_pipeline_preflight` (rewritten); - `test_make_game_dry_run`, `test_make_game_platform`, `test_make_game_argparse`, `test_make_game_preflight`, `test_leonida_tui`; - every other `tests/test_make_game_*.py`, plus `test_ctest_registration`, `test_text_write_line_endings` and `test_docs_env_vars`. `test_make_game_pipeline_batches.py` is removed with the batching it tested. - Every standalone `tests/test_*.py` on Linux (544 files): no new failure. The one failing file, `test_calibrated_texture_extra` (`test_export_file_replacement_failure_cleans_temporary_file`), fails the same way on main `935a2cd5b`. The pytest-only files were not run here. - `python -m compileall`, `make_game.py --help`, `scripts/check_no_game_data.py` on every changed file, and `git diff --check`: clean. Off Windows the stage now needs Wine and a Windows `gta6rt.exe`, as playing does; the `shaders`, `assets` and `runtime` stages do not. On a machine without them the stage says so in preflight. Not tested: a real game library, and the stage under Wine (the Wine command line is covered by the tests, not run against a real Wine). GPUs tested: NVIDIA GeForce GTX 1050 Ti, Windows 10. AI-assisted: yes. Antigravity (Gemini 4 Neon) wrote the implementation plan and the `make_game.py`, test and docs changes. Claude Code wrote the runtime part, reviewed the rest, and ran the builds, tests and mutant. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lixonik commented 2026-11-26 18:01:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T18:01:58Z.

Review: COMMENTED


Built gta6rt and the inflight test at this head with MSVC on Windows 11. precompile_inflight passed and the Python pipeline tests ran 25 passes with one skip. With a synthetic compute shader, I ran the actual make_game.pipelines stage twice: the first run created one native journal entry, and the second reported it as already journaled and preserved bytes and mtime. GPU: NVIDIA GeForce RTX 5070, 610.88. This checks stage-to-runtime integration and journal reuse by the stage.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6078729866 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#pullrequestreview-6078729866). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-26T18:01:58Z. **Review:** COMMENTED --- Built `gta6rt` and the inflight test at this head with MSVC on Windows 11. `precompile_inflight` passed and the Python pipeline tests ran 25 passes with one skip. With a synthetic compute shader, I ran the actual `make_game.pipelines` stage twice: the first run created one native journal entry, and the second reported it as already journaled and preserved bytes and mtime. GPU: NVIDIA GeForce RTX 5070, 610.88. This checks stage-to-runtime integration and journal reuse by the stage. AI-assisted.
wavehs commented 2026-11-26 18:50:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:50:18Z.

Review: COMMENTED


macOS arm64 check of #2392 (MAKE-GAME-PIPELINES-VIA-RUNTIME). Python build driving, the dashboard/docs, a new Windows-side precompile journal and the portable header its test covers.

Two commits, head 8a73cb09b. It does not merge onto main bdbc7e923: git merge-tree --write-tree exits 1 with conflicts in docs/d3d12_vulkan.md, docs/linux_proton.md, docs/running.md and runtime/shims/d3d12_vulkan_device.cpp. The whole conflict is with one upstream commit, 76109561f ("--precompile-pipelines builds the skip-listed programs unless --skip-listed"), which is not in the branch's merge base 935a2cd5b. I tested the head tree as authored (a clean git archive of 8a73cb09b) and report the merge separately below.

Environment: Apple M3 Pro, arm64, macOS 27.2.1, Apple clang 21.0.0, CMake 4.5.0, CPython 3.15.2.

What ran

  • New runtime/test/precompile_inflight_test.cpp is portable (standard library, Threads::Threads only, registered at runtime/CMakeLists.txt:892-895 outside the WIN32 block). Configured the head tree with CMake on macOS and built the target through CMake: OK. Ran it: precompile_inflight_test: ok. Also built it standalone with -fsanitize=address,undefined: pass, no report.
  • The 23 tests/test_make_game_*.py plus tests/test_leonida_tui.py on the head tree: all OK (skips: argparse 1, paths 2, preflight 2).
  • Negative control: kept the PR's tests, put make_game.py back to the merge base 935a2cd5b. Every changed suite fails - test_make_game_pipelines.py 13 errors of 14, test_make_game_pipeline_preflight.py 16 of 13 cases (subtests), test_make_game_dry_run.py 5 errors, test_make_game_platform.py 2 failures + 3 errors, test_make_game_argparse.py 1 failure, test_make_game_preflight.py 1 error, test_leonida_tui.py 1 error.
  • python -m compileall -q make_game.py tools tests: clean. python -I make_game.py --help: OK.
  • The crash/retry loop is actually covered, not just the happy path: tests/test_make_game_pipelines.py:269-344 pin exit 2 (warn, stage succeeds), exit 1 (fail, no retry), an NT interrupt status (no retry), one crash then success (retry line, pipeline_crashes.json with the module's SHA-256), the retry limit, and a stale report being dropped.
  • Cannot run here: anything that needs gta6rt.exe (no MSVC/Wine), so the real precompile, the lock, the inflight journal on a device and CTest's precompile_skip_list are unexecuted.

The macOS/off-Windows path is graceful. Called the stage directly on this machine (make_game.pipelines(work, out)), three failure modes, all exit 1 with the intended message and no traceback:

gta6rt.exe was not found: run the runtime stage (clang-cl + xwin) or pass --runtime-build.
No translated shaders yet: run the shaders stage first.
'wine' was not found: install Wine or set WINE to run gta6rt.exe in the pipelines stage.

That includes the macOS-specific clang-cl + xwin hint. I could not get further: the stage genuinely needs a Windows gta6rt.exe under Wine on this platform, and there is no Wine here. If macOS is meant to be able to run --stages pipelines, that is now a Wine + Windows-Vulkan requirement that did not exist before this PR; the preflight says so clearly, but it is worth stating in the PR that macOS users are expected to run shaders/assets/runtime only, or to accept Wine.

Findings

  1. The rebase is not optional; a naive resolution drops main's skip-list reporting and fails a CTest. Main's 76109561f added filtered, listed_left_out, the if (listed && !options.skip_listed) message and the left out: N of M listed in LEONIDA_SKIP_COMPUTE wording to the same two fprintf blocks this PR rewrites (runtime/shims/d3d12_vulkan_device.cpp:22389-22412 and :22514-22529 in the conflicted file). Main also added runtime/test/check_precompile_skip_list.cmake, which asserts that line character for character:

    • :96 expects [precompile] done: ... 0 failed; left out: 0 of 1 listed in LEONIDA_SKIP_COMPUTE, 0 not buildable, 0 filtered out; in N s
    • :105 expects 1 compute entries to build (... , 1 left out by --skip-listed, 0 not buildable)

    The head's replacement lines ("[precompile] %zu compute entries to build (%.1f MB of SPIR-V; %zu filtered out, %zu not buildable, %zu crashed a run), ..." and "done: %zu compiled, ... %zu not buildable, %zu crashed a run, in %.0f s") match neither: they have no "left out ... listed in LEONIDA_SKIP_COMPUTE" text, and crashed a run sits where the regex requires ) or , 0 not buildable). Taking the PR's side in those two hunks would leave precompile_skip_list red after the rebase. The merge must keep main's two sentences and add the crashed count, e.g. ... %zu filtered out, %zu crashed a run) and ... left out: %zu of %zu listed in LEONIDA_SKIP_COMPUTE%s, %zu not buildable, %zu filtered out, %zu crashed a run; in %.0f s. I verified the regexes against both sides; I did not resolve the merge myself.

  2. make_game mislabels the new "another precompile holds the lock" exit. runtime/shims/d3d12_vulkan_device.cpp:22322-22324 returns 1 when requests/precompile.lock is held by another process, and make_game.py:2861 maps every exit 1 to gta6rt could not open the Vulkan device or shader library. Exit 1 is also host.open() failing (:22272), so the code is shared; a user who starts two stages, or a stale window, is told the Vulkan device is broken. Either give the lock its own exit status (2 is taken for "built, some failed"; 3 is free) and a branch in pipelines(), or have pipelines() pass the child's last line through when it matches another --precompile-pipelines is using.

  3. A crashed entry stays skipped for good, and make_game has no way to retry it. runtime/src/precompile_inflight.h deliberately keeps crashed.txt across runs (pinned by runtime/test/precompile_inflight_test.cpp:55-58), and only --all (runtime/src/main.cpp:291, which sets rebuild) clears it. make_game.py's command line is [exe, "--precompile-pipelines", "--threads", N] (:2717) and never passes --all; the warning at :2846-2848 names the entries and pipeline_crashes.json but not how to retry. So after the cause is fixed - the case that matters most, a translator change to that module - every later make_game --stages pipelines leaves it out of the journal again, exits 0, and prints the same warning. The impact is bounded (the title compiles that pipeline at play, as before the PR), but the stage's whole value is filling the journal, and the retry is invisible. A --retry-crashed (or forwarding --all when the user deletes crashed.txt) plus one sentence in docs/pipeline_check.md:352-354 would close it. I could not test the retry end to end here; the finding is from the flag wiring and the C++ test.

  4. Nit: when the first run exits 2, the stage logs the exit 2 warning (:2858) and then collect_crashes() logs a second WARNING: N compute entry(ies) crashed for the same entries, so one failure reads as two. collect_crashes() runs unconditionally after the loop; skipping the repeat when code == 2 already reported it would halve the noise.

Not re-run: the shader corpus and GPU fixtures. No translator, scripts/run_gpu_tests.py or runtime test-harness change; the same-main baseline stands (195 PASS / 3 FAIL / 70 SKIP MoltenVK, 190 / 5 / 73 KosmicKrisp at bdbc7e923).

python -I scripts/check_no_game_data.py on all changed files: clean.

No game files. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6079174467 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#pullrequestreview-6079174467). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-26T18:50:18Z. **Review:** COMMENTED --- **macOS arm64 check of #2392** (MAKE-GAME-PIPELINES-VIA-RUNTIME). Python build driving, the dashboard/docs, a new Windows-side precompile journal and the portable header its test covers. Two commits, head `8a73cb09b`. **It does not merge onto `main` `bdbc7e923`**: `git merge-tree --write-tree` exits 1 with conflicts in `docs/d3d12_vulkan.md`, `docs/linux_proton.md`, `docs/running.md` and `runtime/shims/d3d12_vulkan_device.cpp`. The whole conflict is with one upstream commit, `76109561f` ("--precompile-pipelines builds the skip-listed programs unless --skip-listed"), which is not in the branch's merge base `935a2cd5b`. I tested the head tree as authored (a clean `git archive` of `8a73cb09b`) and report the merge separately below. Environment: Apple M3 Pro, arm64, macOS 27.2.1, Apple clang 21.0.0, CMake 4.5.0, CPython 3.15.2. **What ran** - New `runtime/test/precompile_inflight_test.cpp` is portable (standard library, `Threads::Threads` only, registered at `runtime/CMakeLists.txt:892-895` outside the WIN32 block). Configured the head tree with CMake on macOS and built the target through CMake: OK. Ran it: `precompile_inflight_test: ok`. Also built it standalone with `-fsanitize=address,undefined`: pass, no report. - The 23 `tests/test_make_game_*.py` plus `tests/test_leonida_tui.py` on the head tree: all OK (skips: argparse 1, paths 2, preflight 2). - Negative control: kept the PR's tests, put `make_game.py` back to the merge base `935a2cd5b`. Every changed suite fails - `test_make_game_pipelines.py` 13 errors of 14, `test_make_game_pipeline_preflight.py` 16 of 13 cases (subtests), `test_make_game_dry_run.py` 5 errors, `test_make_game_platform.py` 2 failures + 3 errors, `test_make_game_argparse.py` 1 failure, `test_make_game_preflight.py` 1 error, `test_leonida_tui.py` 1 error. - `python -m compileall -q make_game.py tools tests`: clean. `python -I make_game.py --help`: OK. - The crash/retry loop is actually covered, not just the happy path: `tests/test_make_game_pipelines.py:269-344` pin exit 2 (warn, stage succeeds), exit 1 (fail, no retry), an NT interrupt status (no retry), one crash then success (retry line, `pipeline_crashes.json` with the module's SHA-256), the retry limit, and a stale report being dropped. - Cannot run here: anything that needs `gta6rt.exe` (no MSVC/Wine), so the real precompile, the lock, the inflight journal on a device and CTest's `precompile_skip_list` are unexecuted. **The macOS/off-Windows path is graceful.** Called the stage directly on this machine (`make_game.pipelines(work, out)`), three failure modes, all exit 1 with the intended message and no traceback: ``` gta6rt.exe was not found: run the runtime stage (clang-cl + xwin) or pass --runtime-build. No translated shaders yet: run the shaders stage first. 'wine' was not found: install Wine or set WINE to run gta6rt.exe in the pipelines stage. ``` That includes the macOS-specific `clang-cl + xwin` hint. I could not get further: the stage genuinely needs a Windows `gta6rt.exe` under Wine on this platform, and there is no Wine here. If macOS is meant to be able to run `--stages pipelines`, that is now a Wine + Windows-Vulkan requirement that did not exist before this PR; the preflight says so clearly, but it is worth stating in the PR that macOS users are expected to run `shaders`/`assets`/`runtime` only, or to accept Wine. **Findings** 1. **The rebase is not optional; a naive resolution drops main's skip-list reporting and fails a CTest.** Main's `76109561f` added `filtered`, `listed_left_out`, the `if (listed && !options.skip_listed)` message and the `left out: N of M listed in LEONIDA_SKIP_COMPUTE` wording to the same two `fprintf` blocks this PR rewrites (`runtime/shims/d3d12_vulkan_device.cpp:22389-22412` and `:22514-22529` in the conflicted file). Main also added `runtime/test/check_precompile_skip_list.cmake`, which asserts that line character for character: - `:96` expects `[precompile] done: ... 0 failed; left out: 0 of 1 listed in LEONIDA_SKIP_COMPUTE, 0 not buildable, 0 filtered out; in N s` - `:105` expects `1 compute entries to build (... , 1 left out by --skip-listed, 0 not buildable)` The head's replacement lines (`"[precompile] %zu compute entries to build (%.1f MB of SPIR-V; %zu filtered out, %zu not buildable, %zu crashed a run), ..."` and `"done: %zu compiled, ... %zu not buildable, %zu crashed a run, in %.0f s"`) match neither: they have no "left out ... listed in LEONIDA_SKIP_COMPUTE" text, and `crashed a run` sits where the regex requires `)` or `, 0 not buildable)`. Taking the PR's side in those two hunks would leave `precompile_skip_list` red after the rebase. The merge must keep main's two sentences and add the crashed count, e.g. `... %zu filtered out, %zu crashed a run)` and `... left out: %zu of %zu listed in LEONIDA_SKIP_COMPUTE%s, %zu not buildable, %zu filtered out, %zu crashed a run; in %.0f s`. I verified the regexes against both sides; I did not resolve the merge myself. 2. **`make_game` mislabels the new "another precompile holds the lock" exit.** `runtime/shims/d3d12_vulkan_device.cpp:22322-22324` returns 1 when `requests/precompile.lock` is held by another process, and `make_game.py:2861` maps every exit 1 to `gta6rt could not open the Vulkan device or shader library`. Exit 1 is also `host.open()` failing (`:22272`), so the code is shared; a user who starts two stages, or a stale window, is told the Vulkan device is broken. Either give the lock its own exit status (2 is taken for "built, some failed"; 3 is free) and a branch in `pipelines()`, or have `pipelines()` pass the child's last line through when it matches `another --precompile-pipelines is using`. 3. **A crashed entry stays skipped for good, and `make_game` has no way to retry it.** `runtime/src/precompile_inflight.h` deliberately keeps `crashed.txt` across runs (pinned by `runtime/test/precompile_inflight_test.cpp:55-58`), and only `--all` (`runtime/src/main.cpp:291`, which sets `rebuild`) clears it. `make_game.py`'s command line is `[exe, "--precompile-pipelines", "--threads", N]` (`:2717`) and never passes `--all`; the warning at `:2846-2848` names the entries and `pipeline_crashes.json` but not how to retry. So after the cause is fixed - the case that matters most, a translator change to that module - every later `make_game --stages pipelines` leaves it out of the journal again, exits 0, and prints the same warning. The impact is bounded (the title compiles that pipeline at play, as before the PR), but the stage's whole value is filling the journal, and the retry is invisible. A `--retry-crashed` (or forwarding `--all` when the user deletes `crashed.txt`) plus one sentence in `docs/pipeline_check.md:352-354` would close it. I could not test the retry end to end here; the finding is from the flag wiring and the C++ test. 4. **Nit:** when the first run exits 2, the stage logs the `exit 2` warning (`:2858`) and then `collect_crashes()` logs a second `WARNING: N compute entry(ies) crashed` for the same entries, so one failure reads as two. `collect_crashes()` runs unconditionally after the loop; skipping the repeat when `code == 2` already reported it would halve the noise. **Not re-run**: the shader corpus and GPU fixtures. No translator, `scripts/run_gpu_tests.py` or runtime test-harness change; the same-main baseline stands (195 PASS / 3 FAIL / 70 SKIP MoltenVK, 190 / 5 / 73 KosmicKrisp at `bdbc7e923`). `python -I scripts/check_no_game_data.py` on all changed files: clean. No game files. AI-assisted.
qhukz13 commented 2026-11-26 19:28:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T19:28:56Z.


@wavehs thank you, all four were right. Fixed in the force-pushed head, rebased on main 2d43417d4:

  1. Rebase, keeping main's skip-list reporting. precompile_compute_pipelines is main's version with this PR's part added on top.
    • The plan line keeps ... left out by --skip-listed, N not buildable).
    • The done: line is main's sentence word for word. , N crashed a run is added before ; in only when N is not 0, so check_precompile_skip_list.cmake's exact regexes still match.
    • The doc conflicts keep both texts: your skip-list lines and this PR's stage lines.
  2. The busy-lock exit has its own status. A held requests/precompile.lock now exits 3, and the stage reports "another gta6rt --precompile-pipelines is using this pipeline journal" instead of the device message. There is a test for it.
  3. A crashed entry is no longer skipped for good. This is the root of it: a crash is now held against what crashed, not against the name.
    • inflight.txt / crashed.txt lines are <name> <key>.
    • The key is the module file (size and last write, so no read of the module) on this device and driver.
    • A new translation of the module or a new driver gives a new key, and the next run tries it again by itself. A build that returns clears it from the list.
    • --all still forces every one.
    • The stage's warning says this, and so does docs/pipeline_check.md.
  4. One warning. Crashed entries are reported once; the generic exit-2 warning is printed only when nothing was recorded as crashed.

So that the crash path can be tested for real and not only by planting files, LEONIDA_PRECOMPILE_CRASH_TEST=<entry> ends the precompile just before that entry's create.

Tested again: GTX 1050 Ti, NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo.

  • precompile_inflight and main's precompile_skip_list pass. The latter shows the summary lines kept their exact wording.
  • An end-to-end run with real process deaths passes all 17 checks. A crash inside cs_beta's create ends the run with 0xC0000005. The next run names cs_beta, skips it, records cs_beta <key> and exits 2, and keeps skipping it while the file is unchanged. Rewriting the module makes the next run build it and clear the list. --all retries a fresh crash. A held lock exits 3, and --list writes nothing.
  • The whole stage, through make_game.pipelines() with a crash planted in cs_gamma: the first attempt dies, the retry skips it, the stage completes, prints one warning that names cs_gamma and says how it is retried, and writes pipeline_crashes.json.
  • On Linux: the updated precompile_inflight_test under GCC 14 with ASan/UBSan and TSan, and the 15 test_make_game_pipelines cases plus every touched test file.

On macOS: yes, off Windows the stage now needs Wine and a Windows gta6rt.exe, like the game itself. I'll add a sentence to the PR saying that the other stages don't need it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7201637364 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2392#issuecomment-7201637364). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-26T19:28:56Z. --- @wavehs thank you, all four were right. Fixed in the force-pushed head, rebased on main `2d43417d4`: 1. **Rebase, keeping main's skip-list reporting.** `precompile_compute_pipelines` is main's version with this PR's part added on top. - The plan line keeps `... left out by --skip-listed, N not buildable)`. - The `done:` line is main's sentence word for word. `, N crashed a run` is added before `; in` only when N is not 0, so `check_precompile_skip_list.cmake`'s exact regexes still match. - The doc conflicts keep both texts: your skip-list lines and this PR's stage lines. 2. **The busy-lock exit has its own status.** A held `requests/precompile.lock` now exits **3**, and the stage reports "another gta6rt --precompile-pipelines is using this pipeline journal" instead of the device message. There is a test for it. 3. **A crashed entry is no longer skipped for good.** This is the root of it: a crash is now held against *what* crashed, not against the name. - `inflight.txt` / `crashed.txt` lines are `<name> <key>`. - The key is the module file (size and last write, so no read of the module) on this device and driver. - A new translation of the module or a new driver gives a new key, and the next run tries it again by itself. A build that returns clears it from the list. - `--all` still forces every one. - The stage's warning says this, and so does `docs/pipeline_check.md`. 4. **One warning.** Crashed entries are reported once; the generic exit-2 warning is printed only when nothing was recorded as crashed. So that the crash path can be tested for real and not only by planting files, `LEONIDA_PRECOMPILE_CRASH_TEST=<entry>` ends the precompile just before that entry's create. **Tested again:** GTX 1050 Ti, NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo. - `precompile_inflight` and main's `precompile_skip_list` pass. The latter shows the summary lines kept their exact wording. - An end-to-end run with real process deaths passes all 17 checks. A crash inside `cs_beta`'s create ends the run with `0xC0000005`. The next run names `cs_beta`, skips it, records `cs_beta <key>` and exits 2, and keeps skipping it while the file is unchanged. Rewriting the module makes the next run build it and clear the list. `--all` retries a fresh crash. A held lock exits 3, and `--list` writes nothing. - The whole stage, through `make_game.pipelines()` with a crash planted in `cs_gamma`: the first attempt dies, the retry skips it, the stage completes, prints one warning that names `cs_gamma` and says how it is retried, and writes `pipeline_crashes.json`. - On Linux: the updated `precompile_inflight_test` under GCC 14 with ASan/UBSan and TSan, and the 15 `test_make_game_pipelines` cases plus every touched test file. On macOS: yes, off Windows the stage now needs Wine and a Windows `gta6rt.exe`, like the game itself. I'll add a sentence to the PR saying that the other stages don't need it. AI-assisted (Claude Code).
akimfomin commented 2026-11-26 20:09:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by akimfomin on 2026-11-26T20:09:31Z.


The RTX 5070 review already checked that a second stage run preserves the journal bytes and timestamp. To check whether a fresh runtime gets a driver cache hit, Continued has a useful positive control in the #821 test, lines 363–417. For one synthetic compute pipeline, compare the journal written by this PR with a cache the consuming device wrote itself. Check the valid and application-cache-hit bits. If even the control misses, the driver result is inconclusive. The older test used the checker’s seed, so the input to adapt is the new journal.

Would that control change what you test before accepting runtime cache reuse? PortBridge’s one-PR comparison found it on the earlier revision. On the rebased head the search follows the crash code instead. You or your agent can use the linked test directly. If you try it, a one-line result or reason to skip is enough. No installation or private inputs needed.

AI-assisted source review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7202363138 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2392#issuecomment-7202363138). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-26T20:09:31Z. --- The RTX 5070 review already checked that a second stage run preserves the journal bytes and timestamp. To check whether a fresh runtime gets a driver cache hit, Continued has a useful positive control in [the #821 test, lines 363–417](https://github.com/ubiquitarianism/leonida/blob/32a5d9698022711bc52e3c5cf28766691518dc8e/runtime/test/pipeline_cache_seed_test.cpp#L363-L417). For one synthetic compute pipeline, compare the journal written by this PR with a cache the consuming device wrote itself. Check the valid and application-cache-hit bits. If even the control misses, the driver result is inconclusive. The older test used the checker’s seed, so the input to adapt is the new journal. Would that control change what you test before accepting runtime cache reuse? [PortBridge’s one-PR comparison](https://github.com/akimfomin/PortBridge/blob/0cb1fe46d14f0930e7e347e3c9980a53c9d94be9/audit/evidence/m53/development-search.md) found it on the earlier revision. On the rebased head the search follows the crash code instead. You or your agent can use the linked test directly. If you try it, a one-line result or reason to skip is enough. No installation or private inputs needed. AI-assisted source review.
qhukz13 commented 2026-11-26 20:37:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T20:37:55Z.


@akimfomin thanks, good control. I ran it rather than adapting the old seed test: #2198's scripts/check_precompile_verify.py --require-hit (head 95267b8c7, built with MSVC on a GTX 1050 Ti, NVIDIA 582.66, Windows 10). It warms the journal with gta6rt --precompile-pipelines in one process, then --verify in a fresh one, and requires the driver's application-cache-hit bit. Result: driver reported application-cache hit: True. This PR's stage only runs that same --precompile-pipelines, so the journal it writes is the one that control checks.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7202911853 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2392#issuecomment-7202911853). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-26T20:37:55Z. --- @akimfomin thanks, good control. I ran it rather than adapting the old seed test: #2198's `scripts/check_precompile_verify.py --require-hit` (head `95267b8c7`, built with MSVC on a GTX 1050 Ti, NVIDIA 582.66, Windows 10). It warms the journal with `gta6rt --precompile-pipelines` in one process, then `--verify` in a fresh one, and requires the driver's application-cache-hit bit. Result: `driver reported application-cache hit: True`. This PR's stage only runs that same `--precompile-pipelines`, so the journal it writes is the one that control checks. AI-assisted (Claude Code).
lixonik commented 2026-11-26 20:43:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T20:43:03Z.

Review: COMMENTED


Retested the rebased head f445e3f7 on Windows 11, MSVC, RTX 5070 and NVIDIA 610.88. precompile_inflight and precompile_skip_list passed. The two targeted Python files had 26 passes and 1 skip. Running the actual make_game.pipelines() twice produced one native journal entry and preserved its bytes and mtime on the second run.

I also tested the fresh-process cache question. I used the same synthetic compute module for three runs of the #2198 --verify diagnostic (95267b8c7). An empty journal gave missing_or_unusable=1. A journal written by the diagnostic executable itself gave verified=1. The journal written by this PR's actual make_game.pipelines() also gave verified=1 in a separate verifier process, with the application-cache-hit bit required. The verifier left both populated journals unchanged.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6080300502 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#pullrequestreview-6080300502). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-26T20:43:03Z. **Review:** COMMENTED --- Retested the rebased head `f445e3f7` on Windows 11, MSVC, RTX 5070 and NVIDIA 610.88. `precompile_inflight` and `precompile_skip_list` passed. The two targeted Python files had 26 passes and 1 skip. Running the actual `make_game.pipelines()` twice produced one native journal entry and preserved its bytes and mtime on the second run. I also tested the fresh-process cache question. I used the same synthetic compute module for three runs of the #2198 `--verify` diagnostic (`95267b8c7`). An empty journal gave `missing_or_unusable=1`. A journal written by the diagnostic executable itself gave `verified=1`. The journal written by this PR's actual `make_game.pipelines()` also gave `verified=1` in a separate verifier process, with the application-cache-hit bit required. The verifier left both populated journals unchanged. AI-assisted.
kurrutako commented 2026-11-27 17:03:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-11-27T17:03:54Z.


Tested f445e3f7d with the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01. I used a shader pack translated by main fbf100b1b (wave64 emulation on). I ran make_game.py --stages pipelines --runtime-build <PR build> for 20 minutes into an --out holding a copy of a journal that main's --precompile-pipelines --max-bytes 2097151 had filled (3,862 entries). The PR's precompile_inflight and precompile_skip_list passed.

1. A stage that is stopped marks the entries it interrupted as crashed. I stopped the stage's gta6rt from outside (Stop-Process, exit 0xffffffff). The stage logged gta6rt crashed (4294967295 (0xffffffff)); retrying (1/5) so the runtime skips the in-flight entry. The retry then moved the 4 entries that had been inside the driver into requests/crashed.txt. None of them had crashed: they were large modules that had been building for several minutes. Three of the four are game lighting compute programs that a dispatch uses, not ray-tracing ones. Later runs skip them until the module or driver changes.

  • A user who closes the window or ends the task mid-stage gets the same result, because nothing tells a kill apart from a crash.
  • A Ctrl+C also leaves inflight.txt behind, so the next run makes the same move.
  • It might help to tell a crash code (0xC0000005 and similar) from a termination before retrying and recording. Or a stopped run could leave its list in a state the next run does not count.

2. The retry outlives the stage. After the stage's Python process ended, the retried gta6rt kept running and held requests/precompile.lock. The next stage run therefore failed with exit 3 ("another gta6rt --precompile-pipelines is using this pipeline journal") until I ended that process by hand.

3. With the real library, the stage starts with the programs the game is told to skip. The plan line was 5453 compute entries to build (8567.7 MB of SPIR-V; ... 0 left out by --skip-listed ...), largest first, 4 thread(s). Largest first, the first hours go to the 2 MiB-and-larger modules that docs/running.md puts in LEONIDA_SKIP_COMPUTE.

  • In 20 minutes, 2 entries finished, at 435 s each on average.
  • It never reached the smaller entries already in the journal, so this run says nothing about journal reuse.
  • For comparison, main's --precompile-pipelines --threads 8 --max-bytes 2097151 built the 3,950 entries under 2 MiB in 20.6 minutes on this machine. 448 of them failed with VkResult -13.
  • The stage takes no option to pass --skip-listed or a size bound, and it does not apply LEONIDA_SKIP_COMPUTE itself. On a 12 GB NVIDIA card a full stage looks like many hours.

Not tested: a full stage run, journal reuse by the stage on this library, Wine.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7223984948 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2392#issuecomment-7223984948). Originally posted by [kurrutako](https://github.com/kurrutako) on 2026-11-27T17:03:54Z. --- Tested `f445e3f7d` with the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01. I used a shader pack translated by main `fbf100b1b` (wave64 emulation on). I ran `make_game.py --stages pipelines --runtime-build <PR build>` for 20 minutes into an `--out` holding a copy of a journal that main's `--precompile-pipelines --max-bytes 2097151` had filled (3,862 entries). The PR's `precompile_inflight` and `precompile_skip_list` passed. **1. A stage that is stopped marks the entries it interrupted as crashed.** I stopped the stage's `gta6rt` from outside (Stop-Process, exit `0xffffffff`). The stage logged `gta6rt crashed (4294967295 (0xffffffff)); retrying (1/5) so the runtime skips the in-flight entry`. The retry then moved the 4 entries that had been inside the driver into `requests/crashed.txt`. None of them had crashed: they were large modules that had been building for several minutes. Three of the four are game lighting compute programs that a dispatch uses, not ray-tracing ones. Later runs skip them until the module or driver changes. - A user who closes the window or ends the task mid-stage gets the same result, because nothing tells a kill apart from a crash. - A Ctrl+C also leaves `inflight.txt` behind, so the next run makes the same move. - It might help to tell a crash code (`0xC0000005` and similar) from a termination before retrying and recording. Or a stopped run could leave its list in a state the next run does not count. **2. The retry outlives the stage.** After the stage's Python process ended, the retried `gta6rt` kept running and held `requests/precompile.lock`. The next stage run therefore failed with exit 3 ("another gta6rt --precompile-pipelines is using this pipeline journal") until I ended that process by hand. **3. With the real library, the stage starts with the programs the game is told to skip.** The plan line was `5453 compute entries to build (8567.7 MB of SPIR-V; ... 0 left out by --skip-listed ...), largest first, 4 thread(s)`. Largest first, the first hours go to the 2 MiB-and-larger modules that `docs/running.md` puts in `LEONIDA_SKIP_COMPUTE`. - In 20 minutes, 2 entries finished, at 435 s each on average. - It never reached the smaller entries already in the journal, so this run says nothing about journal reuse. - For comparison, main's `--precompile-pipelines --threads 8 --max-bytes 2097151` built the 3,950 entries under 2 MiB in 20.6 minutes on this machine. 448 of them failed with `VkResult -13`. - The stage takes no option to pass `--skip-listed` or a size bound, and it does not apply `LEONIDA_SKIP_COMPUTE` itself. On a 12 GB NVIDIA card a full stage looks like many hours. Not tested: a full stage run, journal reuse by the stage on this library, Wine. AI-assisted (Claude Code).
qhukz13 commented 2026-11-27 21:20:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-27T21:20:36Z.


@kurrutako thank you for the run on the real library; all three were real. Fixed in the two new commits on top of the rebase (head f896a16f4):

  1. A stop or a kill no longer marks what was building as crashed.
    • The record has two strikes now (runtime/src/precompile_inflight.h). An entry left in flight once becomes a suspect (requests/suspect.txt) and is built again. Only a second death on it with the same key holds it as crashed.
    • A stop the runtime is told about leaves nothing: Ctrl+C or the console closing (a console control handler), or the process that started it ending (--parent, below).
    • make_game.py sorts the exit (precompile_exit_kind). A stop ends the stage without a restart. A crash inside a build always restarts, since each one moves the entry on. Only crashes outside a build count against PIPELINE_CRASH_RETRIES, and PIPELINE_MAX_RESTARTS bounds the stage.
  2. No gta6rt outlives the stage. On Windows the stage passes --parent <its pid>; a thread in the runtime waits on that process and ends the run with it. A Wine process cannot watch a host process, so this is Windows only.
  3. Order. The stage passes --smallest-first, so a stage stopped part way has built as many entries as it could. It also passes --skip-listed when LEONIDA_SKIP_COMPUTE is set.

Also new: the stage sets LEONIDA_DEVICE_FAULT=1 unless you set it. On NVIDIA that value is part of every journal file's name, and scripts/windows-boot/boot.ps1 boots with it, so without it the boot read none of the stage's journal (#2481's seed included).

The 448 VkResult -13 you saw are main's. #2438 looks like the cause (ASSUMED for your run; MEASURED here): on our GTX 1050 Ti, main fails 5 valu_fuzz --family mem programs with NVVM compilation failed: 3, and #2438 none.

Tested (MEASURED, n=1 each) on a GTX 1050 Ti 4 GB desktop (profile S), NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo:

  • precompile_inflight and precompile_skip_list pass;
  • tests/test_make_game_pipelines.py: 22 OK (2 POSIX-only skips);
  • a smoke run with two synthetic compute modules and LEONIDA_PRECOMPILE_CRASH_TEST, 15/15:
    • one death is a suspect that is built again, the second is held as crashed and skipped (exit 2), and --all clears it;
    • a kill followed by a clean run leaves no record;
    • --parent of a process that has ended stops the run;
    • a held precompile.lock gives exit 3;
    • make_game's stage restarts twice on a module that crashes every time, then finishes with it skipped and listed in pipeline_crashes.json.
  • The inflight test also passes under ASan/UBSan and TSan on Linux, and a mutant that treats the first death as a crash fails it.

A rerun on your library would be the real check, if you have the time. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7228357835 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7228357835). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-27T21:20:36Z. --- @kurrutako thank you for the run on the real library; all three were real. Fixed in the two new commits on top of the rebase (head `f896a16f4`): 1. **A stop or a kill no longer marks what was building as crashed.** - The record has two strikes now (`runtime/src/precompile_inflight.h`). An entry left in flight once becomes a suspect (`requests/suspect.txt`) and is built again. Only a second death on it with the same key holds it as crashed. - A stop the runtime is told about leaves nothing: Ctrl+C or the console closing (a console control handler), or the process that started it ending (`--parent`, below). - `make_game.py` sorts the exit (`precompile_exit_kind`). A stop ends the stage without a restart. A crash inside a build always restarts, since each one moves the entry on. Only crashes outside a build count against `PIPELINE_CRASH_RETRIES`, and `PIPELINE_MAX_RESTARTS` bounds the stage. 2. **No `gta6rt` outlives the stage.** On Windows the stage passes `--parent <its pid>`; a thread in the runtime waits on that process and ends the run with it. A Wine process cannot watch a host process, so this is Windows only. 3. **Order.** The stage passes `--smallest-first`, so a stage stopped part way has built as many entries as it could. It also passes `--skip-listed` when `LEONIDA_SKIP_COMPUTE` is set. Also new: the stage sets `LEONIDA_DEVICE_FAULT=1` unless you set it. On NVIDIA that value is part of every journal file's name, and `scripts/windows-boot/boot.ps1` boots with it, so without it the boot read none of the stage's journal (#2481's seed included). The 448 `VkResult -13` you saw are main's. #2438 looks like the cause (ASSUMED for your run; MEASURED here): on our GTX 1050 Ti, main fails 5 `valu_fuzz --family mem` programs with `NVVM compilation failed: 3`, and #2438 none. Tested (MEASURED, n=1 each) on a GTX 1050 Ti 4 GB desktop (profile S), NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo: - `precompile_inflight` and `precompile_skip_list` pass; - `tests/test_make_game_pipelines.py`: 22 OK (2 POSIX-only skips); - a smoke run with two synthetic compute modules and `LEONIDA_PRECOMPILE_CRASH_TEST`, 15/15: - one death is a suspect that is built again, the second is held as crashed and skipped (exit 2), and `--all` clears it; - a kill followed by a clean run leaves no record; - `--parent` of a process that has ended stops the run; - a held `precompile.lock` gives exit 3; - `make_game`'s stage restarts twice on a module that crashes every time, then finishes with it skipped and listed in `pipeline_crashes.json`. - The inflight test also passes under ASan/UBSan and TSan on Linux, and a mutant that treats the first death as a crash fails it. A rerun on your library would be the real check, if you have the time. AI-assisted (Claude Code).
moffington commented 2026-11-28 05:40:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-28T05:40:30Z.


Review of f896a16f4 (base cf1c34128). I used hand-written compute shaders only: no game files and no game boot, so this is not the game run the PR is waiting on. Item 1 should be fixed before merge, item 2 is a suggestion, and item 3 is a question.

1. Two tests fail
python -I tests/test_make_game_platform.py and python -I tests/test_make_game_dry_run.py each have one failure. Both files pass at the base and at 81c7fbf1a, and fail from 66686c3e2. The expected command lines lack --smallest-first (and, in dry_run, --parent <pid>). stdlib-tests-linux shows the dry_run failure. That job was also red on main (b1619e0a3) for a different test, so this is easy to miss.

2. Under Wine, a driver segfault is usually reported as a journal conflict
To get a real compiler crash, I used a deliberately corrupted compute module (spirv-val rejects it) that segfaults NVIDIA's compiler. vkCreateDevice fails for gta6rt on this machine without a workaround, so every gta6rt run below used a local Vulkan layer that caps queue counts.

  • A native Linux program that calls vkCreateComputePipelines on the module exits 139. The same program built for Windows, run under Wine without extra layers, logs Exception 0xc0000005 in Unix call and exits 3.
  • With this head's gta6rt.exe and make_game.pipelines() (called directly), 10 of 11 crashing runs exited 3. The stage said another precompile was using the journal and did not restart. The other run ended with signal 9 and was reported as stopped, "not a crash".
  • An injected abort() on the calling thread (synthetic) exits 1, which the stage reports as a failure to open the Vulkan device or shader library.

precompile_exit_kind matches codes 0–3 before it applies the non-Windows crash rule. LEONIDA_PRECOMPILE_CRASH_TEST injects an access violation that surfaces as exit code 5, so it exercises the restart path. The real crashes above surface as 3 and never reach it. One possible fix (untested): outside Windows, require the matching [precompile] message before treating 3 as a locked journal or 1 as a device/library failure. This would not cover the signal 9 case.

3. Question about LEONIDA_DEVICE_FAULT
The stage defaults it to 1. In my test, a later --precompile-pipelines run with it unset found 0 of the stage's 3 journal entries and recompiled them. With =1, it found all 3. I understand that the default matches boot.ps1, the stage logs this, and the docs say to use the game run's environment. However, run_game_wine.sh, run_wine_session.sh and the generated Wine launcher do not set it. Should they, or should the stage default change? I compared precompile runs only. From the code, I expect a game boot to use the same journal names, but I have not tested one.

GPUs tested: NVIDIA RTX 3060 12 GB, driver 615.78.08, Linux 7.2.15, Wine 11.20.

AI-assisted (Claude Code, Claude Sonnet 5.5), with a second-pass audit by a separate agent.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7234814666 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7234814666). Originally posted by [moffington](https://github.com/moffington) on 2026-11-28T05:40:30Z. --- Review of `f896a16f4` (base `cf1c34128`). I used hand-written compute shaders only: no game files and no game boot, so this is not the game run the PR is waiting on. Item 1 should be fixed before merge, item 2 is a suggestion, and item 3 is a question. **1. Two tests fail** `python -I tests/test_make_game_platform.py` and `python -I tests/test_make_game_dry_run.py` each have one failure. Both files pass at the base and at `81c7fbf1a`, and fail from `66686c3e2`. The expected command lines lack `--smallest-first` (and, in `dry_run`, `--parent <pid>`). `stdlib-tests-linux` shows the `dry_run` failure. That job was also red on `main` (`b1619e0a3`) for a different test, so this is easy to miss. **2. Under Wine, a driver segfault is usually reported as a journal conflict** To get a real compiler crash, I used a deliberately corrupted compute module (`spirv-val` rejects it) that segfaults NVIDIA's compiler. `vkCreateDevice` fails for `gta6rt` on this machine without a workaround, so every `gta6rt` run below used a local Vulkan layer that caps queue counts. - A native Linux program that calls `vkCreateComputePipelines` on the module exits 139. The same program built for Windows, run under Wine without extra layers, logs `Exception 0xc0000005 in Unix call` and exits **3**. - With this head's `gta6rt.exe` and `make_game.pipelines()` (called directly), 10 of 11 crashing runs exited 3. The stage said another precompile was using the journal and did not restart. The other run ended with signal 9 and was reported as stopped, "not a crash". - An injected `abort()` on the calling thread (synthetic) exits 1, which the stage reports as a failure to open the Vulkan device or shader library. `precompile_exit_kind` matches codes 0–3 before it applies the non-Windows crash rule. `LEONIDA_PRECOMPILE_CRASH_TEST` injects an access violation that surfaces as exit code 5, so it exercises the restart path. The real crashes above surface as 3 and never reach it. One possible fix (untested): outside Windows, require the matching `[precompile]` message before treating 3 as a locked journal or 1 as a device/library failure. This would not cover the signal 9 case. **3. Question about `LEONIDA_DEVICE_FAULT`** The stage defaults it to 1. In my test, a later `--precompile-pipelines` run with it unset found 0 of the stage's 3 journal entries and recompiled them. With `=1`, it found all 3. I understand that the default matches `boot.ps1`, the stage logs this, and the docs say to use the game run's environment. However, `run_game_wine.sh`, `run_wine_session.sh` and the generated Wine launcher do not set it. Should they, or should the stage default change? I compared precompile runs only. From the code, I expect a game boot to use the same journal names, but I have not tested one. GPUs tested: NVIDIA RTX 3060 12 GB, driver 615.78.08, Linux 7.2.15, Wine 11.20. AI-assisted (Claude Code, Claude Sonnet 5.5), with a second-pass audit by a separate agent.
timbot103 commented 2026-11-28 09:19:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T09:19:32Z.


Verified on native Windows 11 + RTX 5080 (16 GB desktop, NVIDIA 616.64, 02f71ccfe + #2392 head f896a16f4, default 2 s Windows TDR) in a controlled 3+3 alternating cold A/B — full tables in https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7237165210:

  • make_game.py --stages pipelines --no-tui --jobs 16 (LEONIDA_DEVICE_FAULT=1, --skip-listed skipping 1,480 >= 2 MiB shaders): resumed cleanly (rc=0, 461 s internal / 462.3 s wrapper, 3,755 .bin files on disk, 0 failed, 950/951 overlap with warm-baseline journal files).
  • Seeded vs unseeded cold boots (Seconds=180, fresh empty runtime cache per run): in-game .bin compiles dropped from 1,721 / 1,721 / 1,725 → 1 / 1 / 1 (-99.94%), journal hits 1,800+, 0 disabled warnings, 0 VK_ERROR_DEVICE_LOST, and mean PresentX/s rose +32.3% (12.44–13.09 → 15.31–18.28/s).

Prediction HELD (3+3, non-provisional). No game data attached. AI-assisted (second-agent count audit by Claude Opus 5.5 and Codex GPT-6.2-Sol).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237165459 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7237165459). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T09:19:32Z. --- Verified on native Windows 11 + RTX 5080 (16 GB desktop, NVIDIA `616.64`, `02f71ccfe + #2392 head f896a16f4`, default 2 s Windows TDR) in a controlled 3+3 alternating cold A/B — full tables in https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7237165210: - `make_game.py --stages pipelines --no-tui --jobs 16` (`LEONIDA_DEVICE_FAULT=1`, `--skip-listed` skipping `1,480` `>= 2 MiB` shaders): resumed cleanly (`rc=0`, `461 s` internal / `462.3 s` wrapper, `3,755` `.bin` files on disk, `0` failed, `950/951` overlap with warm-baseline journal files). - Seeded vs unseeded cold boots (`Seconds=180`, fresh empty runtime cache per run): in-game `.bin` compiles dropped from **`1,721 / 1,721 / 1,725` → `1 / 1 / 1`** (`-99.94%`), journal hits `1,800+`, `0` disabled warnings, `0` `VK_ERROR_DEVICE_LOST`, and mean `PresentX/s` rose **`+32.3%`** (`12.44–13.09` → `15.31–18.28/s`). Prediction **HELD (3+3, non-provisional)**. No game data attached. AI-assisted (second-agent count audit by Claude Opus 5.5 and Codex GPT-6.2-Sol).
qhukz13 commented 2026-11-28 11:13:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-28T11:13:53Z.


Rebased onto main 431ceba4f (no conflicts) and one fix on top, ff501c8bb: a crash is now held against the compile context as well as the module, driver and device.

The crash key did not include how the run compiles. NVIDIA's diagnostics config (LEONIDA_DEVICE_FAULT=1, which the stage sets, or Aftermath) builds with shader debug info. So a module that died twice with it on stayed skipped on runs without it, and the other way round. The key now hashes journal_name_context, the context the journal names its compute files by: subgroup sizes, the bindless layout, and the diagnostics config with its Aftermath flags. This came up while comparing with #2511's journal stamps.

MEASURED on the PC (synthetic modules from the build, no game data):

  • ctest pipeline_cache_journal, precompile_inflight, d3d12_compile_pool, precompile_skip_list: 4/4 pass.
  • A smoke run with LEONIDA_PRECOMPILE_CRASH_TEST:
    • two deaths with LEONIDA_DEVICE_FAULT=1 hold the module, and the next =1 run skips it (exit 2);
    • a =0 run builds it (exit 0) and clears the record.
    • 5/5 pass. The mutant without the new key input fails the two =0 checks (3/5).

GPUs tested: GTX 1050 Ti 4 GB (Pascal, profile S), driver 582.66, Windows 10.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238413450 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7238413450). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-28T11:13:53Z. --- Rebased onto `main` 431ceba4f (no conflicts) and one fix on top, ff501c8bb: a crash is now held against the compile context as well as the module, driver and device. The crash key did not include how the run compiles. NVIDIA's diagnostics config (`LEONIDA_DEVICE_FAULT=1`, which the stage sets, or Aftermath) builds with shader debug info. So a module that died twice with it on stayed skipped on runs without it, and the other way round. The key now hashes `journal_name_context`, the context the journal names its compute files by: subgroup sizes, the bindless layout, and the diagnostics config with its Aftermath flags. This came up while comparing with #2511's journal stamps. MEASURED on the PC (synthetic modules from the build, no game data): - ctest `pipeline_cache_journal`, `precompile_inflight`, `d3d12_compile_pool`, `precompile_skip_list`: 4/4 pass. - A smoke run with `LEONIDA_PRECOMPILE_CRASH_TEST`: - two deaths with `LEONIDA_DEVICE_FAULT=1` hold the module, and the next `=1` run skips it (exit 2); - a `=0` run builds it (exit 0) and clears the record. - 5/5 pass. The mutant without the new key input fails the two `=0` checks (3/5). GPUs tested: GTX 1050 Ti 4 GB (Pascal, profile S), driver 582.66, Windows 10. AI-assisted (Claude Code).
qhukz13 commented 2026-11-28 11:23:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-28T11:23:28Z.


Main moved again (461 commits), so I merged it into the branch rather than rebasing a third time: 1776efec7, plus 7efeede0c.

  • preflight keeps main's overlap argument and shader_asset_jobs. Main's pipeline_check_prerequisite (for vk_pipeline_check) is dropped, because this stage's preflight already asks for gta6rt.exe.
  • The stage keeps main's handling of an old pipeline_crashes.json that cannot be removed (63fce8be5).
  • Main's seed_bvh() pass over spirv/bvh is not carried over. READ IN CODE: ShaderLibrary loads bvh/index.json into entries_ (runtime/src/shader_library.h, the sub-folder loop and load_index), and stage_entries("cs"), which --precompile-pipelines builds from, reads entries_. So the 52 XboxBvhBuilder programs are built in the same run.
  • Main's two new tests are ported to this stage's fake runtime: an invalid index keeps the previous crash report, and a locked old report does not stop a clean run.
  • 7efeede0c fixes two stale expectations of ours in test_make_game_dry_run.py and test_make_game_platform.py, which still expected the command without --smallest-first/--parent.

MEASURED: all tests/test_make_game*.py and test_text_write_line_endings.py pass on Linux and on the PC (Windows 10, Python stdlib), except test_make_game_preflight.py::test_ensure_submodule_names_the_clone_command_the_readme_gives, which fails the same way on main 4a54aedcb. The runtime side is unchanged since the comment above (ctest 4/4, smoke 5/5).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238519433 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7238519433). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-28T11:23:28Z. --- Main moved again (461 commits), so I merged it into the branch rather than rebasing a third time: 1776efec7, plus 7efeede0c. - `preflight` keeps main's `overlap` argument and `shader_asset_jobs`. Main's `pipeline_check_prerequisite` (for `vk_pipeline_check`) is dropped, because this stage's preflight already asks for `gta6rt.exe`. - The stage keeps main's handling of an old `pipeline_crashes.json` that cannot be removed (63fce8be5). - Main's `seed_bvh()` pass over `spirv/bvh` is not carried over. READ IN CODE: `ShaderLibrary` loads `bvh/index.json` into `entries_` (`runtime/src/shader_library.h`, the sub-folder loop and `load_index`), and `stage_entries("cs")`, which `--precompile-pipelines` builds from, reads `entries_`. So the 52 XboxBvhBuilder programs are built in the same run. - Main's two new tests are ported to this stage's fake runtime: an invalid index keeps the previous crash report, and a locked old report does not stop a clean run. - 7efeede0c fixes two stale expectations of ours in `test_make_game_dry_run.py` and `test_make_game_platform.py`, which still expected the command without `--smallest-first`/`--parent`. MEASURED: all `tests/test_make_game*.py` and `test_text_write_line_endings.py` pass on Linux and on the PC (Windows 10, Python stdlib), except `test_make_game_preflight.py::test_ensure_submodule_names_the_clone_command_the_readme_gives`, which fails the same way on main 4a54aedcb. The runtime side is unchanged since the comment above (ctest 4/4, smoke 5/5). AI-assisted (Claude Code).
Maticcm commented 2026-11-28 21:02:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T21:02:53Z.


Independent native Windows verification of 7efeede0c04ea1ec47144f7644daf255e1e73f2c for the index coverage discussed in #2585. RTX 3080 desktop (10 GiB, driver 630.20), Windows 11 build 26340, Vulkan SDK 1.4.363.1, MSVC 19.50.35717, RelWithDebInfo, Python 3.12.10.

I built the exact gta6rt.exe and called make_game.pipelines() with one valid synthetic compute module in each of the root, bvh, library, and fspx_compute indexes. All four modules passed spirv-val. Both runs used one compile thread and the stage's default compile context.

  • Empty journal: four entries found, four compiled, four journal files written, zero failures.
  • Same journal on the next run: four entries found, four already journaled, zero compiled and zero failures. All four journal file hashes were identical to the first run.
  • Four focused CTests passed without skips: pipeline_cache_journal, precompile_inflight, d3d12_compile_pool, and precompile_skip_list. Python dry-run, platform and pipeline-stage files recorded 89 passes and three skips across 92 tests.

This verifies stage discovery and journal reuse with synthetic inputs. No game boot or performance measurement. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7245733023 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7245733023). Originally posted by [Maticcm](https://github.com/Maticcm) on 2026-11-28T21:02:53Z. --- Independent native Windows verification of `7efeede0c04ea1ec47144f7644daf255e1e73f2c` for the index coverage discussed in #2585. RTX 3080 desktop (10 GiB, driver 630.20), Windows 11 build 26340, Vulkan SDK 1.4.363.1, MSVC 19.50.35717, RelWithDebInfo, Python 3.12.10. I built the exact `gta6rt.exe` and called `make_game.pipelines()` with one valid synthetic compute module in each of the root, `bvh`, `library`, and `fspx_compute` indexes. All four modules passed `spirv-val`. Both runs used one compile thread and the stage's default compile context. - Empty journal: four entries found, four compiled, four journal files written, zero failures. - Same journal on the next run: four entries found, four already journaled, zero compiled and zero failures. All four journal file hashes were identical to the first run. - Four focused CTests passed without skips: `pipeline_cache_journal`, `precompile_inflight`, `d3d12_compile_pool`, and `precompile_skip_list`. Python dry-run, platform and pipeline-stage files recorded 89 passes and three skips across 92 tests. This verifies stage discovery and journal reuse with synthetic inputs. No game boot or performance measurement. AI-assisted (Codex).
kurrutako commented 2026-11-29 08:18:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-11-29T08:18:58Z.


Reran 7efeede0c on the same machine and the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01, the same shader pack. I ran make_game.py --stages pipelines --runtime-build <PR build> into the same --out and cleared the stale crashed.txt and inflight.txt from the last test first. All three problems from my last comment are fixed here.

1. A kill from outside no longer holds entries as crashed. About 4 minutes in, I stopped the stage's gta6rt with Stop-Process, as before.

  • The stage logged gta6rt crashed (4294967295 (0xffffffff)) while the driver built <4 entries>; restarting.
  • The restarted run built those 4 again (the last run ended while the driver built it; built again (one death may be a kill from outside)).
  • crashed.txt was never written, and requests/ was empty at the end.
  • One small thing: a TerminateProcess exit (0xffffffff) still counts as crash in precompile_exit_kind, because it is above 0x80000000. With the two-strike rule that does no harm. But if a user ends the task twice while the same large module is building, that module is held as crashed.

2. No gta6rt outlives the stage. I ended the stage's Python process twice from outside.

  • Both times, no gta6rt was left 15 s later.
  • The next stage run started normally, with no exit 3.

3. Smallest first, and --skip-listed with LEONIDA_SKIP_COMPUTE.

  • Without the skip list, the plan was 5453 entries, smallest first. It reached 2622 entries (48%) in 4 minutes.
  • After the restart, the entries already built were counted again in about 5 s (2500/5453 at +5 s).
  • With LEONIDA_SKIP_COMPUTE set to the 724 library programs of 2 MiB or more, the stage passed --skip-listed, and the plan was 4729 entries.
  • That run reached 3383/4729 (71%) in 10 minutes, at modules of about 925 KB.
  • None of the runs logged a VkResult failure (last time, main had 448 VkResult -13).

Journal reuse: the copy of the journal that main fbf100b1b filled was not reused (so far: 0 from journal files). This build's bindless set differs (16384 2D-array, 4096 3D, 4096 1D became 65536 each), and that layout is part of the journal names, so every entry got a new name. That comes from main, not this PR, but anyone with a journal from before the merge will rebuild it all once. The stage's default LEONIDA_DEVICE_FAULT=1 matched the journal I copied.

Not tested: a full stage run to the end, Ctrl+C or closing the console window, a game boot from this journal, Wine.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253025053 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7253025053). Originally posted by [kurrutako](https://github.com/kurrutako) on 2026-11-29T08:18:58Z. --- Reran `7efeede0c` on the same machine and the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01, the same shader pack. I ran `make_game.py --stages pipelines --runtime-build <PR build>` into the same `--out` and cleared the stale `crashed.txt` and `inflight.txt` from the last test first. All three problems from my last comment are fixed here. **1. A kill from outside no longer holds entries as crashed.** About 4 minutes in, I stopped the stage's `gta6rt` with Stop-Process, as before. - The stage logged `gta6rt crashed (4294967295 (0xffffffff)) while the driver built <4 entries>; restarting`. - The restarted run built those 4 again (`the last run ended while the driver built it; built again (one death may be a kill from outside)`). - `crashed.txt` was never written, and `requests/` was empty at the end. - One small thing: a TerminateProcess exit (`0xffffffff`) still counts as `crash` in `precompile_exit_kind`, because it is above `0x80000000`. With the two-strike rule that does no harm. But if a user ends the task twice while the same large module is building, that module is held as crashed. **2. No `gta6rt` outlives the stage.** I ended the stage's Python process twice from outside. - Both times, no `gta6rt` was left 15 s later. - The next stage run started normally, with no exit 3. **3. Smallest first, and `--skip-listed` with `LEONIDA_SKIP_COMPUTE`.** - Without the skip list, the plan was 5453 entries, smallest first. It reached 2622 entries (48%) in 4 minutes. - After the restart, the entries already built were counted again in about 5 s (`2500/5453` at +5 s). - With `LEONIDA_SKIP_COMPUTE` set to the 724 library programs of 2 MiB or more, the stage passed `--skip-listed`, and the plan was 4729 entries. - That run reached 3383/4729 (71%) in 10 minutes, at modules of about 925 KB. - None of the runs logged a `VkResult` failure (last time, main had 448 `VkResult -13`). **Journal reuse:** the copy of the journal that main `fbf100b1b` filled was not reused (`so far: 0 from journal files`). This build's bindless set differs (`16384 2D-array, 4096 3D, 4096 1D` became `65536` each), and that layout is part of the journal names, so every entry got a new name. That comes from main, not this PR, but anyone with a journal from before the merge will rebuild it all once. The stage's default `LEONIDA_DEVICE_FAULT=1` matched the journal I copied. Not tested: a full stage run to the end, Ctrl+C or closing the console window, a game boot from this journal, Wine. AI-assisted (Claude Code).
OreoFR commented 2026-11-29 12:42:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T12:42:20Z.


@qhukz13 this PR now conflicts with main (README.md, make_game.py). Could you merge main into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7245733023. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256004234 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7256004234). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T12:42:20Z. --- @qhukz13 this PR now conflicts with `main` (`README.md`, `make_game.py`). Could you merge `main` into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7245733023. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)
qhukz13 commented 2026-11-29 14:12:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-29T14:12:31Z.


Merged main into the branch (no force-push). Two things in main met this PR, so the merge is not only mechanical:

  • PIPELINES-ETA (b26e43491) added a batch progress/ETA to the old vk_pipeline_check loop (pipeline_costs, pipelines_progress, PIPELINE_COST_EXPONENT, tests/test_make_game_pipeline_eta.py). This PR replaces that loop with gta6rt --precompile-pipelines, which reports its own progress (pipelines: n/N (p%)), so those helpers and their test go with the loop. @Diegobecker07 FYI; if you want the size-weighted ETA on the new progress lines, it can be a follow-up on top of this.
  • scripts/windows-boot/boot.ps1 now boots with LEONIDA_DEVICE_FAULT=2 (no NVIDIA diagnostics config in the journal names). The stage's default follows the boot script (that is what test_device_fault_matches_the_boot_script checks, and it caught it), so PIPELINE_DEVICE_FAULT is now "2"; the test and docs/pipeline_check.md say so.
  • README.md: main rewrote the build section and the passages this PR edited are gone, so main's README is kept; docs/pipeline_check.md carries the stage description.
  • main's install_runtime/publish staging is kept unchanged.

MEASURED (laptop, CPython): all 25 tests/test_make_game_*.py files pass on the merged tree (24/24 in test_make_game_pipelines.py). NOT run yet: the Windows build and precompile_inflight / smoke runs, because the test PC is off today; I will post them when it is back.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257124709 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7257124709). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-29T14:12:31Z. --- Merged `main` into the branch (no force-push). Two things in `main` met this PR, so the merge is not only mechanical: - **PIPELINES-ETA** (b26e43491) added a batch progress/ETA to the old `vk_pipeline_check` loop (`pipeline_costs`, `pipelines_progress`, `PIPELINE_COST_EXPONENT`, `tests/test_make_game_pipeline_eta.py`). This PR replaces that loop with `gta6rt --precompile-pipelines`, which reports its own progress (`pipelines: n/N (p%)`), so those helpers and their test go with the loop. @Diegobecker07 FYI; if you want the size-weighted ETA on the new progress lines, it can be a follow-up on top of this. - `scripts/windows-boot/boot.ps1` now boots with `LEONIDA_DEVICE_FAULT=2` (no NVIDIA diagnostics config in the journal names). The stage's default follows the boot script (that is what `test_device_fault_matches_the_boot_script` checks, and it caught it), so `PIPELINE_DEVICE_FAULT` is now `"2"`; the test and `docs/pipeline_check.md` say so. - `README.md`: `main` rewrote the build section and the passages this PR edited are gone, so `main`'s README is kept; `docs/pipeline_check.md` carries the stage description. - `main`'s `install_runtime`/`publish` staging is kept unchanged. MEASURED (laptop, CPython): all 25 `tests/test_make_game_*.py` files pass on the merged tree (24/24 in `test_make_game_pipelines.py`). NOT run yet: the Windows build and `precompile_inflight` / smoke runs, because the test PC is off today; I will post them when it is back. AI-assisted (Claude Code).
kurrutako commented 2026-12-01 08:54:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-12-01T08:54:50Z.


Tested head 94e5d09cf on Windows 11 with Python 3.14.6. No GPU run, no game files.

On the head

  • pytest tests/test_make_game_*.py tests/test_leonida_tui.py: 496 passed, 10 skipped.
    • test_find_flag_executes_without_error was deselected: it scans the local disks.
  • make_game.py --help: OK.

Merging main cd73ddab7

  • Conflicts in:
    • make_game.py: the pipelines stage and the argparse block.
    • tests/test_make_game_dry_run.py.
    • tests/test_make_game_pipelines.py.
    • docs/linux.md.
  • All of them are mechanical:
    • the PR's side for the stage and its tests;
    • main's side for --no-ftz32, the newline="\n" test writes and the CI job names.
  • After resolving: 520 passed, 10 skipped. test_text_encoding and test_docs_env_vars pass.

Failing CI checks

  • The 6 checks fail on:
    • text_encoding on scripts/windows-boot/test_crash_monitor.py;
    • test_interp_computed_ij_fallback;
    • test_mesh_serial_waves;
    • ps_exp_f32_denorm_rt.
  • They failed the same way on main on 2026-11-29. Main is green now, so a rebase should clear them.

#846 regression

  • The merge drops main's test_the_crash_report_survives_a_retry_setup_failure (#846).
  • I checked with a mocked gta6rt that crashes, then exits 1 on the restart: the stage fails without writing pipeline_crashes.json.
  • Calling collect_crashes() before the device/locked fail() would keep #846's behaviour.

AI-assisted (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7305951724 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7305951724). Originally posted by [kurrutako](https://github.com/kurrutako) on 2026-12-01T08:54:50Z. --- Tested head `94e5d09cf` on Windows 11 with Python 3.14.6. No GPU run, no game files. **On the head** - `pytest tests/test_make_game_*.py tests/test_leonida_tui.py`: 496 passed, 10 skipped. - `test_find_flag_executes_without_error` was deselected: it scans the local disks. - `make_game.py --help`: OK. **Merging main `cd73ddab7`** - Conflicts in: - `make_game.py`: the pipelines stage and the argparse block. - `tests/test_make_game_dry_run.py`. - `tests/test_make_game_pipelines.py`. - `docs/linux.md`. - All of them are mechanical: - the PR's side for the stage and its tests; - main's side for `--no-ftz32`, the `newline="\n"` test writes and the CI job names. - After resolving: 520 passed, 10 skipped. `test_text_encoding` and `test_docs_env_vars` pass. **Failing CI checks** - The 6 checks fail on: - `text_encoding` on `scripts/windows-boot/test_crash_monitor.py`; - `test_interp_computed_ij_fallback`; - `test_mesh_serial_waves`; - `ps_exp_f32_denorm_rt`. - They failed the same way on main on 2026-11-29. Main is green now, so a rebase should clear them. **#846 regression** - The merge drops main's `test_the_crash_report_survives_a_retry_setup_failure` (#846). - I checked with a mocked `gta6rt` that crashes, then exits 1 on the restart: the stage fails without writing `pipeline_crashes.json`. - Calling `collect_crashes()` before the `device`/`locked` `fail()` would keep #846's behaviour. AI-assisted (Claude Code)
aslan2142 commented 2026-12-01 11:53:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:53:19Z.

Review: CHANGES_REQUESTED


Keeping #2392 over closed #2113 (#2113 extended vk_pipeline_check's pipeline_cache.bin, which does not match the runtime's compute cache keys, whereas #2392 switches make_game.py --stages pipelines directly to gta6rt --precompile-pipelines to populate pipeline_cache.d).

Holding from merge until:

  1. Current conflicts with main (make_game.py, docs/linux.md, tests/test_make_game_dry_run.py, tests/test_make_game_pipelines.py) are resolved and CI is green.
  2. #846's test_the_crash_report_survives_a_retry_setup_failure coverage (noted by @kurrutako) is preserved across the merge.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130718098 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#pullrequestreview-6130718098). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:53:19Z. **Review:** CHANGES_REQUESTED --- Keeping **#2392** over closed **#2113** (`#2113` extended `vk_pipeline_check`'s `pipeline_cache.bin`, which does not match the runtime's compute cache keys, whereas `#2392` switches `make_game.py --stages pipelines` directly to `gta6rt --precompile-pipelines` to populate `pipeline_cache.d`). Holding from merge until: 1. Current conflicts with `main` (`make_game.py`, `docs/linux.md`, `tests/test_make_game_dry_run.py`, `tests/test_make_game_pipelines.py`) are resolved and CI is green. 2. `#846`'s `test_the_crash_report_survives_a_retry_setup_failure` coverage (noted by `@kurrutako`) is preserved across the merge. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 17:25:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:25:51Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319286485 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7319286485). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:25:51Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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!2392
No description provided.