launcher: follow-ups after #3272 (Clear shader cache keeps the pipeline record; Copy info fixes) #3310
Closed
github-bot
wants to merge 6 commits from
github-bot/gh-3310 into main
AGit
pull from: github-bot/gh-3310
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3310
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3310"
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?
@OreoFR on GitHub · 2026-12-03 08:54 UTC · original
OreoFR:fix/launcher-clear-cache-rebuild→main· +310 −41 · 8 files · 6 commits · closed without mergingItem: LAUNCHER-CLEAR-CACHE-REBUILD (claimed in #2570). Follow-up of #3272, which is merged; this is the new single launcher PR.
Report
One player, relayed by mooneyes-agent, with no log: after Tools > Clear shader cache, the game no longer rebuilds the shaders and pipelines before it starts.
Cause
tools/leonida_launcher.pyclear_shader_cache(origin/main, ~1861) deletedshader_cache_dirwhole (<data>/cache-2on Windows), and with it<cache>/pipelines.<cache>/pipelinesholds more than compiled pipelines. It also holds the record thatleonida warm(the precompile ind3d12/scripts/play-nvidia.ps1, ~949-1004) reads to know what to make:known-pipelines.binandknown-shaders.bin: every pipeline the title created in earlier runs (d3d12/crates/leonida-gpu/src/pipeline/known.rs:34-35, written withLEONIDA_PIPELINE_BOOK=1, set at play-nvidia.ps1:682);early-pipelines.txt: the pipelines earlier runs drew with (library.rs:455, read bywarm.rs:57for-PrecompileUsed).warm.rs:24-27resolves this folder ascache_subdir("shaders").with_file_name("pipelines").After the clear,
leonida shaderstranslates the shaders again from the archive, butleonida warmreports 0 pipelines known and makes none. Every pipeline is then compiled in the game as the title meets it. The list grows back only over later runs.No stamp outside the cache skips the precompile.
warm-done.txtanddriver-cache-files.txtare inside the same folder, so they went with it.Fix
Clear shader cache now keeps
pipelines/known-pipelines.bin,pipelines/known-shaders.binandpipelines/early-pipelines.txt, the run record inKEPT_RECORD. It deletes everything else in the cache:host-pipelines.bin);warm-done.txt,warm-bad.txt,library-*.txtanddriver-cache-files.txt.The next precompile therefore makes every recorded pipeline again.
Read-only files are deleted, as before. When there was no record, the folder goes as before.
The confirmation dialog says that the list is kept, and shows the size of what is deleted (
shader_cache_entries,entries_size). Its text is updated in de, es, fr and pt.A cache holding only the record counts as already empty.
No script change. Saves and the guards from #3272 are untouched.
Tested
Windows 11, no game run (code reading only):
python -I tests/test_leonida_launcher.py: 146 OK.test_the_record_of_earlier_runs_pipelines_is_kept(keeps the record, deletes the rest including a read-onlywarm-done.txt, then reports already empty).test_the_kept_names_are_the_runtimes(the names matchknown.rs,library.rsandwarm.rs).tests/test_win_launchers.py: 12 OK.tests/test_docs_links.pyandtests/test_text_write_line_endings.py: OK.check_no_game_data.pyon the changed files: clean.Copy info for a bug report (#3336)
Fixes #3336. The block (from #3320) showed three things wrong in player reports:
-Adapter <5 entries>. Adapter names have spaces, and the value filter read the name as a list. The value after-Adapternow goes throughsafe_text, the allowlist used for the GPU line, which keeps model names (tools/bug_report_info.py,shown_args).Upscaler: DLSS (auto)on an AMD card. The block used the saved settings, not the ones PLAY passes on the chosen card.bug_report_textnow takes the card (card_facts, read on the window's thread) and appliesfor_card, as PLAY does. On a card that is not NVIDIA, the upscaler showsoff (DLSS needs an NVIDIA card), and frame generation showsoffunless FSR 3 is chosen.Driver: not in the log.gpu_from_lognow reads the runtime's host card line from #3325 (adapter="...",driver=,umd=,memory_mb=). That line names the device's own card, so it takes priority. Until #3325 lands the line is absent, nothing changes, and the driver stays "not in the log".Not done here: the later comment on #3336 about "no play log found" with
-Logset. The launcher andplay-nvidia.ps1 -Loguse the same%LOCALAPPDATA%\Leonida\logsfolder, so that report needs the player's details.Tests:
tests/test_bug_report_info.py, 38 OK. Five new tests:bug_report_textfollows the card.tools/and pass here.test_win_launchers,test_docs_links,test_text_write_line_endings: OK.check_no_game_data.py: clean.AI-assisted (oreofr-agent).
🤖 Generated with Claude Code
@merzleckeier on GitHub · 2026-12-03 09:01 UTC · original · requested changes
[P2] Stop clearing the cache if its contents cannot be listed. On
797f36d4, a listing failure undercache-2/pipelinesmakesshader_cache_entriesappend the wholepipelinesdirectory. I injected one directory-read error in a temporary cache fixture. The command returned success and deleted all three pipeline records along with the compiled cache. When I injected the error at the cache root, it reported “already empty” and left the compiled cache in place.Please make both the GUI preview and
clear_shader_cachereport the listing error without deleting anything. A scratch control that propagated the listing error into the clear operation’s error handler preserved all three records and the compiled file in both error cases. The normal case still removed the compiled file and kept the records. The PR’s launcher suite ran 146 tests, with 144 passing and two platform skips. AI-assisted with OpenAI Codex.@fiestorra on GitHub · 2026-12-03 09:04 UTC · original
VERIFY-3310 — el launcher, con mi guarda de i18n puesta encima, y por primera vez una PR que toca los cuatro idiomas
Y esto es lo que quería comprobar desde que escribí esa guarda: es la primera PR de la noche que toca los cuatro ficheros de idioma a la vez, y las cuatro listas siguen cuadradas con 401 claves.
Lo que eso dice de la PR: el autor no ha añadido una cadena a un idioma y olvidado los otros tres — que es exactamente lo que la guarda busca, y no lo ha encontrado.
Lo que dice de la guarda: pasa en verde sobre una PR real que mueve esos ficheros, no sólo sobre
main. Un test que nunca ha visto un cambio del fichero que vigila no ha demostrado nada — ahora sí lo ha visto, y sigue en verde.Y el 146 frente al 145 de
#3289y al 144 demain: cada PR de la serie añade un test al launcher, y los tres números son consistentes con el orden en que se escribieron.Lo que no verifiqué: el comportamiento en la ventana ("Clear shader cache keeps the record of each…") — eso es Tkinter y necesita escritorio.
@OreoFR on GitHub · 2026-12-03 09:10 UTC · original
Thanks, fixed in
8ffb3c727b.shader_cache_entriesno longer catchesOSError. A failed listing, ofpipelines/or of the cache root, is raised instead of being read as "deletepipelines/whole" or "empty".clear_shader_cachelists before it deletes anything. On a listing error it returns(False, "The shader cache could not be deleted: <error>")and deletes nothing.Tests (Windows 11):
test_a_folder_that_cannot_be_read_deletes_nothing. It patchesos.listdirto raisePermissionErrorforcache-2/pipelinesand forcache-2(two subtests) and checks three things:shader_cache_entriesraises;797f36d4and pass on8ffb3c72.tests/test_leonida_launcher.py: 147 OK.tests/test_win_launchers.py: OK.check_no_game_data.pyon the changed files: clean.AI-assisted (oreofr-agent).
@lixonik on GitHub · 2026-12-03 09:11 UTC · original
Windows native
red -> green+ diff check -- PASS797f36d48merged cleanly ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tests/test_leonida_launcher.py -v-- 146/146 OK (includingtest_the_record_of_earlier_runs_pipelines_is_kept,test_the_kept_names_are_the_runtimes, andtest_every_language_translates_every_textacrossde/es/fr/pt)tools/leonida_launcher.pyandtools/launcher_i18n/toorigin/mainwhile keeping the new tests): 2 errors in the two newClearShaderCacheTeststests (KEPT_RECORDabsent onmain), exit code 1KEPT_RECORD(known-pipelines.bin,known-shaders.bin,early-pipelines.txt) without following symlinks, clears read-only cache files viaos.chmod(..., S_IWRITE), removes emptypipelines/and cache root when nothing is kept, and updates all four translation catalogs in lockstep.AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@merzleckeier on GitHub · 2026-12-03 09:13 UTC · original
Rechecked
8ffb3c72. Both directory-listing failures from the earlier review now report the error and preserve the cache. The launcher suite ran 147 tests with 145 passing and two platform skips.One Windows path case still loses the record. With Windows Python 3.12 under Wine, the runtime’s lowercase path opened the same file when either
PipelinesorKnown-Pipelines.binwas stored with different capitalization. Clear shader cache preserved the lowercase fixture and deleted the record in both mixed-case fixtures. In a scratch control, applyingos.path.normcaseto the directory and record-name comparisons preserved the record and still cleared the compiled file in all three cases. AI-assisted with OpenAI Codex.@OreoFR on GitHub · 2026-12-03 09:31 UTC · original
Thanks. Fixed in
fd40dbf3ec.shader_cache_entries(path, windows)now matches thepipelinesfolder name and theKEPT_RECORDnames withstr.casefoldwhen the cache is a Windows one. SoPipelines\Known-Pipelines.binandPIPELINES\EARLY-PIPELINES.TXTare kept.clear_shader_cachepasses itswindowsflag through. The cleanup of empty folders afterwards also findspipelines/in any case.Tests (Windows 11):
test_the_record_is_kept_whatever_its_case_on_windows. It has four subtests:pipelines/known-pipelines.bin,Pipelines/known-pipelines.bin,pipelines/Known-Pipelines.binandPIPELINES/EARLY-PIPELINES.TXT. In each, the compiled file is deleted and the record is kept.windows=Falsecounter-check: a differently-cased folder is listed for deletion.8ffb3c72the three mixed-case subtests lose the record (cache-2is deleted whole) and the counter-check fails with aTypeError. All pass onfd40dbf3.tests/test_leonida_launcher.py: 148 OK.check_no_game_data.pyon the changed files: clean.AI-assisted (oreofr-agent).
@merzleckeier on GitHub · 2026-12-03 09:35 UTC · original
Confirmed the case fix on
fd40dbf3with Windows Python 3.12 under Wine. In all four fixtures the runtime’s lowercase spelling opened the preserved record after clearing, and the compiled file was deleted. All nine cache-clear tests passed there. On Linux the launcher suite had 146 passes and two platform skips.One small cleanup: the example in
shader_cache_entriescontains an unescaped backslash.python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.pynow fails at that docstring with invalid escape\K. Doubling the backslash in the Python source made the strict compile pass locally. AI-assisted with OpenAI Codex.@lixonik on GitHub · 2026-12-03 09:42 UTC · original
Re-verified updated head
fd40dbf3eon native Windows 10 x64 (red -> green) -- PASSfd40dbf3emerged cleanly ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tests/test_leonida_launcher.py -v-- 148/148 OK (0 skipped), including all four Windows case-insensitivity fixtures intest_the_record_is_kept_whatever_its_case_on_windowsand both directory-listing failure cases intest_a_folder_that_cannot_be_read_deletes_nothingtools/leonida_launcher.pyandtools/launcher_i18n/toorigin/mainwhile keeping the tests): 9 errors across the newClearShaderCacheTestscases, exit code 1AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@OreoFR on GitHub · 2026-12-03 09:51 UTC · original
Thanks, the docstring now spells the path with a forward slash, so
python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.pypasses; launcher suite OK. Commit6be4fb080d.launcher: follow-ups after #3272 (Clear shader cache keeps the record of earlier runs' pipelines)to launcher: follow-ups after #3272 (Clear shader cache keeps the pipeline record; Copy info fixes)@OreoFR on GitHub · 2026-12-03 16:13 UTC · original
Folded into #3348, which already contains this branch (head
dfaed0f36) and is now the single launcher PR; its description carries this one's in full. Reviews and runs on this head (merzleckeier, lixonik, fiestorra) apply to that part of #3348. Closing this one so there is one launcher PR and one Setup PR (#3346).Pull request closed