launcher: Clear shader cache keeps the pipeline record, Copy info fixes, and running as the installed Mandy app (LAUNCHER-CLEAR-CACHE-REBUILD, LAUNCHER-EXE-PREBUILT) #3348
Open
github-bot
wants to merge 15 commits from
github-bot/gh-3348 into main
AGit
pull from: github-bot/gh-3348
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!3348
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3348"
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 15:11 UTC · original
OreoFR:feat/launcher-exe-prebuilt→main· +3219 −130 · 12 files · 15 commits · openItems: LAUNCHER-EXE-PREBUILT (claimed in #3312) and LAUNCHER-CLEAR-CACHE-REBUILD (from #3310, folded in below). The single launcher PR: #3346 (RELEASE-V1-CI-INSTALLER, the release workflow and Mandy Setup) depends on it, including the shared
tools/mandy_deps.py.@OreoFR, please review: this changes launcher files, which go through you (AGENTS.md).
The prebuilt runtime was dropped (OreoFR's decision, kept in the claim's name). No release carries a
leonida.exe: the launcher always builds it on the PC, through the start scripts as before. That is simpler, it always matches the code the PC has (no version to pick, no stale runtime after an update: merzleckeier's regression is gone with it), and NVIDIA cards get DLSS everywhere (NVIDIA's DLSS library may not be passed on, so a release could never carry it). Mandy Setup (#3346) installs Rust and the C++ Build Tools for every card.What it does
1. The installed Mandy app (PyInstaller
--onedir, installed byMandy-Setup-<tag>.exe).The launcher reads its own files from the bundle (
sys._MEIPASS, else the exe's folder): translations,bug_report_info.py,leonida_mods.py,leonida_saves.pyand the icon. If the bundle lacks one, it reads the repository'stools/.REPOcomes from the settings (repo_dir), not from__file__. At the first start, the window asks for one of two options:scripts/play-d3d12.ps1andd3d12/scripts/play-nvidia.ps1);%LOCALAPPDATA%\Mandy\repo:git clonewhen Git is there, else the repository's zip from GitHub, unpacked safely. Update Mandy later turns that zip copy into a git copy.The window says what it downloads and where before doing it. The launcher then starts itself again with that repository.
--updateruns the exe itself (Mandy.exe --update <repo>). The windowed exe's missing stdout and stderr are opened from the pipe, so the update's output reaches the window.Mandy.exe --run-python [-I] <script.py> [args...]runs a repository tool with the Python the app carries (runpy, as__main__,sys.argvset, working folder kept), so no Python is needed on the PC:LEONIDA_PYTHON, a JSON list[Mandy.exe, "--run-python"].play-nvidia.ps1uses it first forprompt_glyph_movies.py, beforepythonorpy, and keeps it through its clean-up ofLEONIDA_*variables. That is a few lines of script.The tools it runs import nothing of the standard library that the launcher does not import itself, so PyInstaller needs no hidden import.
Mandy's icon (
mandy.icobeside the exe;mandy.pngat the bundle's root or in itsassets/, else the repository'sassets/) is set on the window and the taskbar, with an explicit AppUserModelIDProjectLeonida.Mandy. A test checks that it is the same ID as the.issshortcuts.2. The build tools, for every card. PLAY first checks Rust (cargo on PATH, in
%CARGO_HOME%\binor in%USERPROFILE%\.cargo\bin) and Visual Studio's C++ build tools (vswhere -prerelease):build_tools)Rustlang.RustupandMicrosoft.VisualStudio.2022.BuildToolswith the VCTools workload.d3d12/, the runtime is rebuilt when cargo is there. Without cargo, nothing is started that would fail, and the next PLAY offers the tools.3. Help.
copy_report.docs/launcher.mdgets the same steps under "Troubleshooting", plus "Installed Mandy (Setup.exe) vs running from the repository".4. What Mandy needs on the PC, checked at every start (the installed app and
Launcher.batalike, so players who never ran Mandy Setup, or who have an old zip copy, are covered).The shared module.
tools/mandy_deps.py(standard library only) holds the probes and the winget packages, and Mandy Setup imports the same module:find_git: on PATH or in Git for Windows' folders; wingetGit.Git;find_cargo: on PATH, in%CARGO_HOME%\binor in%USERPROFILE%\.cargo\bin; wingetRustlang.Rustup;msvc_present:vswhere -products * -prerelease -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64; wingetMicrosoft.VisualStudio.2022.BuildToolswith the VCTools workload;missing(),install_plan()andrefresh_path(), which re-reads the machine and user PATH from the registry;create_shortcut(): a.lnkwith an AppUserModelID, through IShellLinkW and IPropertyStore;png_to_ico().The launcher's own probes are the module's.
The banner. The probes run off the window's thread. When something is missing, the Play page shows Missing: Git, Rust ... [Install] [Not now]:
Git missing alone does not block PLAY. Update Mandy says Git is needed and installs it first (
run_updatenow handles a git copy on a PC without Git).The desktop shortcut (from source only). Once, when the desktop has no
Mandy.lnk, the launcher asks Add a Mandy shortcut to your desktop? (Add, or No thanks, remembered asshortcut_offered).<repo>\Launcher.batwith its console minimized and the repository as working folder.assets/mandy.ico, or else one made once fromassets/mandy.pngin the settings folder.ProjectLeonida.Mandy.Mandy.lnkis never touched, and the installed app makes none, since Mandy Setup does.From the real UI test of the installed app:
game_path.txt(written bymake_game.py) when it names a folder with the game's executable;The new texts are in all four translation files (fr, es, pt, de). Texts that are no longer used are gone.
Tested
python -I tests/test_leonida_launcher.py: 180 OK. One test is skipped on this branch: the.issID check, since the.isslives in #3346. The new tests cover:assets/);..entry is refused);--updateand Python lookup;--run-pythonrunning a temporary script, with its argv and exit code, andmaindispatching to it;LEONIDA_PYTHON;CARGO_HOMEand in rustup's folder, andvswhere -prerelease;.lnkor in the installed app, No thanks remembered, the Tools button, the.lnk's parameters, the icon made from the png, and a real.lnkcarrying the AppUserModelID (Windows);game_path.txtprefilling the game folder.tests/test_win_launchers.py: 13 OK. One new test is a realplay-d3d12.ps1start withStart-Processstubbed: the button prompts' tool runs withLEONIDA_PYTHON'sMandy.exe --run-python -I ....test_docs_links,test_docs_cli_flags,test_text_write_line_endings,test_bug_report_infoandcheck_no_game_data: OK.AI-assisted (oreofr-agent, Claude Code).
🤖 Generated with Claude Code
Also in this PR: everything from #3310 (folded in, #3310 closed)
This branch already contains #3310 (head
dfaed0f36). It is now the single launcher PR. #3310's description follows.Item: 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
Without winget (official installers)
When winget is absent (debloated Windows, LTSC, no Store), Git, Rust and the C++ Build Tools are installed from their official installers instead: Git for Windows' latest 64-bit installer (GitHub API),
rustup-init.exeandvs_BuildTools.exe(run elevated). Before running, Git and the Build Tools must have a Valid Authenticode signature from Johannes Schindelin and Microsoft Corporation respectively.rustup-init.exeis not Authenticode-signed (checked on the downloaded file), so it is verified against the SHA-256 rust-lang publishes next to it. A refused file is deleted and not run. Shared code intools/mandy_deps.py(byte-identical in #3346 and #3348). Tests mock the network, the signature check and the runner.5. No download switch; restart after a launcher update; repository and branch (
67457918c)needed_files). An old savedfetch_neededis dropped bynormalise.LAUNCHER_FILES). The launcher run from the repository restarts once the update is over, never under a running game. The installed app says that it updates with a new Mandy Setup.https://github.com/ProjectLeonida/mandyonmain, changes nothing. Noset-url, and the update check is the same as before.originonly, at Save.origin/<branch>, or fast-forwards it withpull --ff-only. The check asks origin withls-remote.set-url;set-urlonoriginonly;ls-remotefor the chosen branch;ff-onlyon a branch change;test_win_launchers,test_tool_startup,test_tool_stdout_encoding,test_docs_links,test_docs_cli_flags, line endings andcheck_no_game_dataall pass. Strings are in de/es/fr/pt, anddocs/launcher.mdis updated.@OreoFR, please review (launcher rule).
@merzleckeier on GitHub · 2026-12-03 15:18 UTC · original
I reproduced a version-selection regression on
85be1b97merged withmainat75ebcfe6. After a repository update, leave the previously downloadedtarget/diag/leonida.exeand itsprebuilt.jsonin place, then PLAY on AMD when no release matches the new commit.prebuilt_neededdetects the older stamp andprebuilt_foundsays the runtime will be built here.prebuilt_finishthen invokes PLAY without-Rebuild. The PowerShell wrapper sees the existing executable and selects the older runtime.I used the exact launcher callback and PowerShell scripts with synthetic repository stamps, a stub build and a stub
Start-Process. The older-runtime case skipped the build and selected the old placeholder. The same setup with no existing runtime called the build stub and selected the new placeholder. Could this path explicitly rebuild when tools are available, or stop with an actionable message when they are missing? The old binary and stamp can stay in place until the replacement succeeds.AI-assisted with OpenAI Codex.
launcher: run as the installed Mandy app, and use the release's prebuilt leonida.exe when it matches (LAUNCHER-EXE-PREBUILT)to launcher: run as the installed Mandy app (first-run repo, build tools check, Help page) (LAUNCHER-EXE-PREBUILT)@OreoFR on GitHub · 2026-12-03 15:40 UTC · original
Thanks for the reproduction. That path is gone in
b22d7e8322: OreoFR dropped the prebuilt runtime from v1. The launcher no longer downloads, places or stamps aleonida.exe. There is noprebuilt.json, no release lookup and no fallback, so no older downloaded runtime can be picked after an update.play-d3d12.ps1builds whentarget\diag\leonida.exeis missing,play-nvidia.ps1rebuilds a stale non-DLSS build, and--updaterebuilds whend3d12/changed and cargo is there.--updateno longer starts a build that would fail. The next PLAY checks Rust and the C++ build tools first:BuildToolsTestsintests/test_leonida_launcher.py(the PLAY decision with and without the tools, the update without cargo, and that no prebuilt code is left); the launcher suite gives 168 OK.🤖 Addressed by Claude Code
@OreoFR on GitHub · 2026-12-03 15:49 UTC · original
Test of the release pipeline on a fork (RTX 4070 Laptop, Windows 11). Tags
v0.0.0-test1totest3were pushed on the author's fork only; every run made a draft release, and all of them are deleted.b22d7e832) publishes onlyMandy-Setup-<tag>.exe, 11.4 MB. The first run'sleonida.exesha256 matched its.sha256file andbuild-info.json./SILENTwith a log:mandy.pngpath, and one AppUserModelID shared by the shortcuts and the window.AI-assisted (oreofr-agent).
launcher: run as the installed Mandy app (first-run repo, build tools check, Help page) (LAUNCHER-EXE-PREBUILT)to launcher: Clear shader cache keeps the pipeline record, Copy info fixes, and running as the installed Mandy app (LAUNCHER-CLEAR-CACHE-REBUILD, LAUNCHER-EXE-PREBUILT)@merzleckeier on GitHub · 2026-12-03 16:25 UTC · original
I rechecked
bd465fb0merged withmainatbba5ed82. The downloaded-runtime path from my previous comment is gone. I found two issues in the replacement flow.python -I tests/test_leonida_launcher.pyreports 1 failure in 180 tests.test_the_path_is_brought_up_to_windows_ownpasses Windows-style drive paths to helpers that use the host separator and hostexpandvars. Under Linux,C:is split and%TESTHOME%stays literal. Using Windows path handling (ntpathand;) for the Windows registry data made the suite pass locally with four platform skips.d3d12/and finds no Cargo returns 0 and says PLAY will build. The next PLAY seesruntime_built()and proceeds without-Rebuild, even after the tools become available. I exercised the exact update and PLAY code with PowerShell, synthetic files, and a stubStart-Process. The existing-file case selected the old local placeholder and skipped the build. With the executable absent, the same PLAY path called the stub build and selected the new placeholder. Keeping a pending rebuild until the next successful build would make the update message accurate.AI-assisted with OpenAI Codex.
@OreoFR on GitHub · 2026-12-03 16:46 UTC · original
Review request: this is one of the two PRs for the Mandy v1 installer (#3348 launcher side, #3346 Setup and release CI). @merzleckeier and @fiestorra, could you take a look when you have time? You already reviewed the earlier pieces (#3310 is folded into #3348).
What changed since your last look is in the PR body. The shared
tools/mandy_deps.pyis byte-identical in both PRs. A full install, launch and uninstall run from a fork build is coming, and I'll post it here.AI-assisted (oreofr-agent).
@fiestorra on GitHub · 2026-12-03 16:57 UTC · original
Revisión pedida: en su propio árbol todo pasa (181 tests en el launcher, 38 en el informe de fallo), y el conflicto que aparece al apilarla con
#3346es de la pila, no del contenidoMedido en la cabeza de esta PR:
Y el launcher pasa de
144a181: 37 tests nuevos, que con los38del informe de fallo son el cuerpo de esta PR.Lo que hay que saber antes de fusionar la pareja, que es lo que me llevó un rato:
Y
mandy_deps.pyno es un conflicto de verdad: el blob es el mismo en las dos PRsLas dos lo añaden por su cuenta, así que la segunda en fusionarse choca con su propio gemelo. La resolución es descartar el lado duplicado — y conviene decirlo porque un conflicto así se lee como «las dos PRs se pelean» cuando es «la misma piedra puesta dos veces».
Lo que no he verificado:
Mandy Setupconstruyendo el.exey adjuntándolo (tagv*y Actions) ni el botón en la ventana (Tkinter sin escritorio). Lo que sí: que en su árbol todo pasa y que el fichero compartido es idéntico.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.