Skip to content

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

Open
qhukz13 wants to merge 2 commits into
ProjectLeonida:mainfrom
qhukz13:cont/pipelines-via-runtime
Open

qhukz13 wants to merge 2 commits into
ProjectLeonida:mainfrom
qhukz13:cont/pipelines-via-runtime

Conversation

@qhukz13

@qhukz13 qhukz13 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: MAKE-GAME-PIPELINES-VIA-RUNTIME (#1608 (comment), corrected in #1608 (comment))

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

@lixonik lixonik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 wavehs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
qhukz13 force-pushed the cont/pipelines-via-runtime branch from 8a73cb0 to f445e3f Compare November 26, 2026 19:28
@qhukz13

qhukz13 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@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

Copy link
Copy Markdown
Contributor

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.

@qhukz13

qhukz13 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@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 lixonik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

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 and others added 2 commits November 27, 2026 21:59
…ta6rt --precompile-pipelines

Switch make_game.py's pipelines stage from vk_pipeline_check to gta6rt.exe --precompile-pipelines --threads <jobs> (under Wine off Windows, honouring WINE) so the stage populates <out>/pipeline_cache.d with runtime-matching driver keys.

Stream [precompile] progress lines into Progress/LeonidaBoard, treat exit 2 as a warning, fail on exit 1, retry crashes up to PIPELINE_CRASH_RETRIES, and report pipeline_cache.d/requests/crashed.txt into <out>/pipeline_crashes.json. Remove vk_pipeline_check orchestration from make_game.py while leaving vk_pipeline_check and its own tests intact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd reported

gta6rt --precompile-pipelines resumes by skipping journaled entries, but an entry whose pipeline create takes the
process down (a driver crash, an abort in the compiler) left no journal file and no trace: its
requests/<name>.building lock is opened DELETE_ON_CLOSE, so the OS removes it with the process. The next run built
it first again and died the same way, so a stage that reruns the precompile could never get past it.

requests/inflight.txt now lists "<name> <key>" for the entries inside the driver, written before each create and
cleared after it. A run moves what a dead run left there into requests/crashed.txt and skips an entry while its key
is the one that crashed. The key is the module file (size and last write, no read of the module) on this device and
driver, so a new translation of the module or a new driver tries it again, and a build that returns clears it.
--all tries every recorded entry again. One precompile per journal folder (requests/precompile.lock); a second one
exits 3 with its own message, which make_game reports as such instead of as a device failure. The summary keeps
main's wording (check_precompile_skip_list.cmake) and adds ", N crashed a run" only when N is not 0.
LEONIDA_PRECOMPILE_CRASH_TEST=<entry> ends the run before that entry's create, for tests.

make_game's pipelines stage reads the "<name> <key>" lines, reports crashed entries once (not also as a generic
exit-2 warning) and says how they are retried; docs/pipeline_check.md says the same.

precompile_inflight_test covers the record, a simulated dead run, a changed key, a returning build, --all and
concurrent builders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qhukz13
qhukz13 force-pushed the cont/pipelines-via-runtime branch from f445e3f to 81c7fbf Compare November 27, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants