windows-boot: read the precompiled journal beside gta6rt.exe as the boot's seed (BOOT-PRECOMPILED-JOURNAL) #2481
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2481"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-27T16:36:23Z.
Claimed in the coordination issue as BOOT-PRECOMPILED-JOURNAL: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7223005887 (not an item of #2464; found in game runs today).
What and why
gta6rt --precompile-pipelineswrites its compute journal besidegta6rt.exe(pipeline_cache.d, when it runs withoutLEONIDA_PIPELINE_CACHE_DIR).scripts/windows-boot/boot.ps1points the runtime at its own cache folder (<OutDir>\pipeline-cache), so a boot never read that journal and compiled again every pipeline the pre-compile had built.Now, when
pipeline_cache.dexists besidegta6rt.exeand neither the shell nor-SetEnv/KEY=VALUEsetLEONIDA_PIPELINE_JOURNAL_SEED_DIR,boot.ps1passes it as the runtime's read-only seed (the runtime falls back to it for files its writable journal lacks) and lists it in the[boot] envlines. It is not set:resolve_rootsinruntime/src/pipeline_cache_journal.h). The two folders are compared through Windows' final paths (GetFinalPathNameByHandle, from the deepest existing parent), so a junction, symbolic link, substituted or mapped drive, 8.3 name or\\?\/\\.\prefix counts as the same folder; the spelled paths are the fallback if that helper cannot load;LEONIDA_PIPELINE_CACHE_DIRis relative (the runtime resolves it against its own working folder) or cannot be resolved (no seed rather than a stop, so-DryRunand-DigestOnlystill work).The README row says how to turn it off (
LEONIDA_PIPELINE_JOURNAL_SEED_DIR=), which runtime line shows an overlap if one still slips through, and that on NVIDIA the pre-compile has to use the sameLEONIDA_DEVICE_FAULTas the boot (this script sets1), since the diagnostics config is part of the journal's file names (runtime/shims/d3d12_vulkan_device.cpp,nv-diagnostics-config); OreoFR's agent pointed that one out.Tested
Windows 11 Pro 26300, Windows PowerShell 5.1:
python -I tests/test_windows_boot_journal_seed.py: 17 tests OK (the junction and\\.\cases added after TheGeogeo's review fail on the commit before). It runsboot.ps1 -DryRun(nothing launched, no game files) against a temporary runtime folder. Withmain'sboot.ps1, the 3 tests that expect a seed fail.Equalsclause, the relative-path guard, thetry/catch, the shell-location resolution or the\\?\stripping, or making the comparison case-sensitive, each makes at least one test fail.-DryRuntakes about 2.6 s with the final-path helper compiled.boot.ps1 -DryRunon a real port folder listsLEONIDA_PIPELINE_JOURNAL_SEED_DIR=<port>\pipeline_cache.d.main2859d0c9b,LEONIDA_DEVICE_FAULTunset: 545 compute pipelines came from the precompiled journal in one boot instead of being compiled.python -I tests/test_ci_registration.py,python -I tests/test_docs_links.py,python -I scripts/check_no_game_data.pyon the three files,git diff --check: clean.GPUs tested: NVIDIA GeForce RTX 3090 24 GB, driver 621.40, Windows 11 26300 (profile L); the test itself needs no GPU.
AI-assisted: yes (Claude Code, Claude Opus 5.5). A second agent reviewed the change twice before it was opened; its findings are applied.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-27T17:18:54Z.
CI note: the four failing jobs fail the same way on
mainand touch nothing this pull request changes (it changesscripts/windows-boot/boot.ps1, its README and adds a Windows-only test).macos-python:tests/test_calibrated_texture_extra.py(test_export_file_replacement_failure_cleans_temporary_file, "OSError not raised");main's CI run https://github.com/ubiquitarianism/leonida/actions/runs/46033678995 (c0201a806) hasmacos-pythonfailing too.linux-gpu-tools(vk_null_descriptor_test.cpp:LEONIDA_TEST_NULL_DESCRIPTORS_SPVnot declared),windows(vk_xdxr_postbuild_readback) andmacos(vk_bindless_dimensions):main's Runtime run https://github.com/ubiquitarianism/leonida/actions/runs/46033679044 (c0201a806) fails as well.tests/test_windows_boot_journal_seed.pyskips off Windows, and the pull-request CI runs the standard-library tests on Linux only, so its Windows result is the local one in the description (15 tests OK; the 3 seed tests fail withmain'sboot.ps1).AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-27T17:48:10Z.
Independent review of
ba19ca8adacf791700c115bef5146f076ef3a990, merged withmainc0201a806b061120e6cdee9916395275a632367e(merge tree matchesdaf669bf3ce9f3f9b3059baa53975f45160b61eb).Finding:
scripts/windows-boot/boot.ps1:290–309compares paths lexically. When the writable cache reaches the same journal through a junction or a\\.\alias, auto-seeding is enabled, butresolve_rootsdetects the overlap and disables both journals. In the same setupmainretains the writable journal. I reproduced this with dry runs and a direct test ofruntime/src/pipeline_cache_journal.h; the README documents alias limitations, but this configuration loses an existing cache. Please consider avoiding the automatic seed for aliases or preserving the writable cache when rejecting it.Windows 11 build 26300, Windows PowerShell 5.1 and Python 3.12.4; no game files used:
test_windows_boot_journal_seed.py: 15/15 pass on the merged PR; 12/15 onmainusing the PR's test harness, with the three expected new-behavior failures.pipeline_cache_journal_test.cpp: built and passed on both revisions. Eight additional dry runs passed.git diff --checkand the no-game-data check on the changed files passed.The complete project suite was not run. GPU and in-game cache hits or performance were not tested, so the performance gain remains unverified here.
AI-assisted: yes (Codex, GPT-6.2 Sol).
Status: Please address or explicitly accept the alias-related cache regression before merging.
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-27T17:54:45Z.
@TheGeogeo thanks for the repro. Fixed in
2893fae21:boot.ps1now compares the boot's journal and the seed by Windows' final paths (GetFinalPathNameByHandle, taken from the deepest existing parent), so a junction, symbolic link, substituted or mapped drive, 8.3 name or the\\?\/\\.\prefix counts as the same folder: no seed is set and the writable journal stays on, as onmain. The spelled paths remain the fallback if the helper cannot load. The approach was OreoFR's agent's suggestion.test_a_device_path_prefix_names_the_same_folderandtest_a_junction_to_the_runtime_folder_is_recognised: both fail onba19ca8adand pass now; the file runs 17 tests OK on Windows PowerShell 5.1.\\.\spelling of it asLEONIDA_PIPELINE_CACHE_DIR): no seed in a dry run for each; the plain case still gets its seed on PowerShell 5.1 and 7.-DryRuntakes about 2.6 s with the helper compiled.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-27T20:47:29Z.
Review: APPROVED
Verified locally at
2893fae21merged withmainon Windows 10 (PowerShell 5.1):tests/test_windows_boot_journal_seed.pypasses 17/17 inDryRunmode (basemainfails the 3 seed-selection cases as expected).GetFinalPathNameByHandleand covered by junction/prefix tests.DryRunsuite. Hosted Runtime failures are the shared base issues.AI-assisted review.