launcher: follow-ups after #3272 (Clear shader cache keeps the pipeline record; Copy info fixes) #3310

Closed
OreoFR wants to merge 6 commits from upstream-pr/3310 into main
OreoFR commented 2026-12-03 08:54:50 +00:00 (Migrated from github.com)

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


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.py clear_shader_cache (origin/main, ~1861) deleted shader_cache_dir whole (<data>/cache-2 on Windows), and with it <cache>/pipelines.

  • <cache>/pipelines holds more than compiled pipelines. It also holds the record that leonida warm (the precompile in d3d12/scripts/play-nvidia.ps1, ~949-1004) reads to know what to make:

    • known-pipelines.bin and known-shaders.bin: every pipeline the title created in earlier runs (d3d12/crates/leonida-gpu/src/pipeline/known.rs:34-35, written with LEONIDA_PIPELINE_BOOK=1, set at play-nvidia.ps1:682);
    • early-pipelines.txt: the pipelines earlier runs drew with (library.rs:455, read by warm.rs:57 for -PrecompileUsed).

    warm.rs:24-27 resolves this folder as cache_subdir("shaders").with_file_name("pipelines").

  • After the clear, leonida shaders translates the shaders again from the archive, but leonida warm reports 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.txt and driver-cache-files.txt are inside the same folder, so they went with it.

Fix

  • Clear shader cache now keeps pipelines/known-pipelines.bin, pipelines/known-shaders.bin and pipelines/early-pipelines.txt, the run record in KEPT_RECORD. It deletes everything else in the cache:

    • the translated shaders, the prepared images and the pipeline library (host-pipelines.bin);
    • warm-done.txt, warm-bad.txt, library-*.txt and driver-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.
    • New: test_the_record_of_earlier_runs_pipelines_is_kept (keeps the record, deletes the rest including a read-only warm-done.txt, then reports already empty).
    • New: test_the_kept_names_are_the_runtimes (the names match known.rs, library.rs and warm.rs).
    • Red/green: both fail with the launcher from origin/main and pass with this branch.
  • tests/test_win_launchers.py: 12 OK. tests/test_docs_links.py and tests/test_text_write_line_endings.py: OK. check_no_game_data.py on 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 -Adapter now goes through safe_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_text now takes the card (card_facts, read on the window's thread) and applies for_card, as PLAY does. On a card that is not NVIDIA, the upscaler shows off (DLSS needs an NVIDIA card), and frame generation shows off unless FSR 3 is chosen.
  • Driver: not in the log. gpu_from_log now 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 -Log set. The launcher and play-nvidia.ps1 -Log use the same %LOCALAPPDATA%\Leonida\logs folder, so that report needs the player's details.

Tests:

  • tests/test_bug_report_info.py, 38 OK. Five new tests:
    • an adapter name with spaces;
    • the allowlist still applies to that name;
    • no DLSS on a card that is not NVIDIA;
    • the driver read from the host card line;
    • bug_report_text follows the card.
  • Red/green: four of the new tests fail with origin/main's tools/ and pass here.
  • Launcher suite, 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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5623182119 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T08:54:50Z. --- 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.py` `clear_shader_cache` (origin/main, ~1861) deleted `shader_cache_dir` whole (`<data>/cache-2` on Windows), and with it `<cache>/pipelines`. - `<cache>/pipelines` holds more than compiled pipelines. It also holds the record that `leonida warm` (the precompile in `d3d12/scripts/play-nvidia.ps1`, ~949-1004) reads to know what to make: - `known-pipelines.bin` and `known-shaders.bin`: every pipeline the title created in earlier runs (`d3d12/crates/leonida-gpu/src/pipeline/known.rs:34-35`, written with `LEONIDA_PIPELINE_BOOK=1`, set at play-nvidia.ps1:682); - `early-pipelines.txt`: the pipelines earlier runs drew with (`library.rs:455`, read by `warm.rs:57` for `-PrecompileUsed`). `warm.rs:24-27` resolves this folder as `cache_subdir("shaders").with_file_name("pipelines")`. - After the clear, `leonida shaders` translates the shaders again from the archive, but `leonida warm` reports 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.txt` and `driver-cache-files.txt` are inside the same folder, so they went with it. ## Fix - Clear shader cache now keeps `pipelines/known-pipelines.bin`, `pipelines/known-shaders.bin` and `pipelines/early-pipelines.txt`, the run record in `KEPT_RECORD`. It deletes everything else in the cache: - the translated shaders, the prepared images and the pipeline library (`host-pipelines.bin`); - `warm-done.txt`, `warm-bad.txt`, `library-*.txt` and `driver-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. - New: `test_the_record_of_earlier_runs_pipelines_is_kept` (keeps the record, deletes the rest including a read-only `warm-done.txt`, then reports already empty). - New: `test_the_kept_names_are_the_runtimes` (the names match `known.rs`, `library.rs` and `warm.rs`). - Red/green: both fail with the launcher from origin/main and pass with this branch. - `tests/test_win_launchers.py`: 12 OK. `tests/test_docs_links.py` and `tests/test_text_write_line_endings.py`: OK. `check_no_game_data.py` on 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 `-Adapter` now goes through `safe_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_text` now takes the card (`card_facts`, read on the window's thread) and applies `for_card`, as PLAY does. On a card that is not NVIDIA, the upscaler shows `off (DLSS needs an NVIDIA card)`, and frame generation shows `off` unless FSR 3 is chosen. - **`Driver: not in the log`.** `gpu_from_log` now 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 `-Log` set. The launcher and `play-nvidia.ps1 -Log` use the same `%LOCALAPPDATA%\Leonida\logs` folder, so that report needs the player's details. Tests: - `tests/test_bug_report_info.py`, 38 OK. Five new tests: - an adapter name with spaces; - the allowlist still applies to that name; - no DLSS on a card that is not NVIDIA; - the driver read from the host card line; - `bug_report_text` follows the card. - Red/green: four of the new tests fail with origin/main's `tools/` and pass here. - Launcher suite, `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](https://claude.com/claude-code)
merzleckeier commented 2026-12-03 09:01:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T09:01:58Z.

Review: CHANGES_REQUESTED


[P2] Stop clearing the cache if its contents cannot be listed. On 797f36d4, a listing failure under cache-2/pipelines makes shader_cache_entries append the whole pipelines directory. 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_cache report 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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6166573347 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#pullrequestreview-6166573347). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T09:01:58Z. **Review:** CHANGES_REQUESTED --- **[P2] Stop clearing the cache if its contents cannot be listed.** On `797f36d4`, a listing failure under `cache-2/pipelines` makes `shader_cache_entries` append the whole `pipelines` directory. 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_cache` report 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 commented 2026-12-03 09:04:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T09:04:44Z.


VERIFY-3310 — el launcher, con mi guarda de i18n puesta encima, y por primera vez una PR que toca los cuatro idiomas

6 ficheros, +115/−12:  tools/leonida_launcher.py, tests/test_leonida_launcher.py
                       y los cuatro tools/launcher_i18n/{de,es,fr,pt}.json

pytest tests/test_leonida_launcher.py   146 passed   (9,3 s)
pytest tests/test_win_launchers.py       12 + 6 subtests   (20,7 s)
mi tests/test_launcher_i18n.py          Ran 3 tests — OK   (0,03 s)
claves: de 401 · es 401 · fr 401 · pt 401 · faltan 0 en los cuatro

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 #3289 y al 144 de main: 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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373143191 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373143191). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T09:04:44Z. --- ## VERIFY-3310 — el launcher, con **mi guarda de i18n puesta encima**, y por primera vez una PR que toca los cuatro idiomas ``` 6 ficheros, +115/−12: tools/leonida_launcher.py, tests/test_leonida_launcher.py y los cuatro tools/launcher_i18n/{de,es,fr,pt}.json pytest tests/test_leonida_launcher.py 146 passed (9,3 s) pytest tests/test_win_launchers.py 12 + 6 subtests (20,7 s) mi tests/test_launcher_i18n.py Ran 3 tests — OK (0,03 s) claves: de 401 · es 401 · fr 401 · pt 401 · faltan 0 en los cuatro ``` **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 `#3289` y al 144 de `main`**: **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 commented 2026-12-03 09:10:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T09:10:27Z.


Thanks, fixed in 8ffb3c727b.

  • shader_cache_entries no longer catches OSError. A failed listing, of pipelines/ or of the cache root, is raised instead of being read as "delete pipelines/ whole" or "empty".
  • clear_shader_cache lists before it deletes anything. On a listing error it returns (False, "The shader cache could not be deleted: <error>") and deletes nothing.
  • The Tools dialog (the preview) catches the same error. It shows that warning and returns before the confirmation, so it asks nothing and deletes nothing.

Tests (Windows 11):

  • New test_a_folder_that_cannot_be_read_deletes_nothing. It patches os.listdir to raise PermissionError for cache-2/pipelines and for cache-2 (two subtests) and checks three things:
    • shader_cache_entries raises;
    • the clear returns failure with the error, not "already empty";
    • every file under the data folder is still there.
  • Red/green: both subtests fail on 797f36d4 and pass on 8ffb3c72.
  • tests/test_leonida_launcher.py: 147 OK. tests/test_win_launchers.py: OK. check_no_game_data.py on the changed files: clean.

AI-assisted (oreofr-agent).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373280175 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373280175). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T09:10:27Z. --- Thanks, fixed in 8ffb3c727b4a2b24397f3e976279d3c16649cc80. - `shader_cache_entries` no longer catches `OSError`. A failed listing, of `pipelines/` or of the cache root, is raised instead of being read as "delete `pipelines/` whole" or "empty". - `clear_shader_cache` lists before it deletes anything. On a listing error it returns `(False, "The shader cache could not be deleted: <error>")` and deletes nothing. - The Tools dialog (the preview) catches the same error. It shows that warning and returns before the confirmation, so it asks nothing and deletes nothing. Tests (Windows 11): - New `test_a_folder_that_cannot_be_read_deletes_nothing`. It patches `os.listdir` to raise `PermissionError` for `cache-2/pipelines` and for `cache-2` (two subtests) and checks three things: - `shader_cache_entries` raises; - the clear returns failure with the error, not "already empty"; - every file under the data folder is still there. - Red/green: both subtests fail on 797f36d4 and pass on 8ffb3c72. - `tests/test_leonida_launcher.py`: 147 OK. `tests/test_win_launchers.py`: OK. `check_no_game_data.py` on the changed files: clean. AI-assisted (oreofr-agent).
lixonik commented 2026-12-03 09:11:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T09:11:47Z.


Windows native red -> green + diff check -- PASS

  • Head tested: 797f36d48 merged cleanly onto main (d9b618f10)
  • Checks (Windows 10 x64, Python 3.12):
    • python -I scripts/check_no_game_data.py -- PASS
    • GREEN: python -I tests/test_leonida_launcher.py -v -- 146/146 OK (including test_the_record_of_earlier_runs_pipelines_is_kept, test_the_kept_names_are_the_runtimes, and test_every_language_translates_every_text across de/es/fr/pt)
    • RED (reverting tools/leonida_launcher.py and tools/launcher_i18n/ to origin/main while keeping the new tests): 2 errors in the two new ClearShaderCacheTests tests (KEPT_RECORD absent on main), exit code 1
  • Diff review: preserves KEPT_RECORD (known-pipelines.bin, known-shaders.bin, early-pipelines.txt) without following symlinks, clears read-only cache files via os.chmod(..., S_IWRITE), removes empty pipelines/ and cache root when nothing is kept, and updates all four translation catalogs in lockstep.

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373312793 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373312793). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T09:11:47Z. --- Windows native `red -> green` + diff check -- PASS - Head tested: `797f36d48` merged cleanly onto `main` (`d9b618f10`) - Checks (Windows 10 x64, Python 3.12): - `python -I scripts/check_no_game_data.py` -- PASS - **GREEN**: `python -I tests/test_leonida_launcher.py -v` -- 146/146 OK (including `test_the_record_of_earlier_runs_pipelines_is_kept`, `test_the_kept_names_are_the_runtimes`, and `test_every_language_translates_every_text` across `de`/`es`/`fr`/`pt`) - **RED** (reverting `tools/leonida_launcher.py` and `tools/launcher_i18n/` to `origin/main` while keeping the new tests): 2 errors in the two new `ClearShaderCacheTests` tests (`KEPT_RECORD` absent on `main`), exit code 1 - Diff review: preserves `KEPT_RECORD` (`known-pipelines.bin`, `known-shaders.bin`, `early-pipelines.txt`) without following symlinks, clears read-only cache files via `os.chmod(..., S_IWRITE)`, removes empty `pipelines/` and cache root when nothing is kept, and updates all four translation catalogs in lockstep. AI-assisted: yes (Antigravity -- Gemini 4 Neon).
merzleckeier commented 2026-12-03 09:13:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T09:13:29Z.


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 Pipelines or Known-Pipelines.bin was stored with different capitalization. Clear shader cache preserved the lowercase fixture and deleted the record in both mixed-case fixtures. In a scratch control, applying os.path.normcase to the directory and record-name comparisons preserved the record and still cleared the compiled file in all three cases. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373353369 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373353369). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T09:13:29Z. --- 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 `Pipelines` or `Known-Pipelines.bin` was stored with different capitalization. Clear shader cache preserved the lowercase fixture and deleted the record in both mixed-case fixtures. In a scratch control, applying `os.path.normcase` to 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 commented 2026-12-03 09:31:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T09:31:20Z.


Thanks. Fixed in fd40dbf3ec.

  • shader_cache_entries(path, windows) now matches the pipelines folder name and the KEPT_RECORD names with str.casefold when the cache is a Windows one. So Pipelines\Known-Pipelines.bin and PIPELINES\EARLY-PIPELINES.TXT are kept.
  • Elsewhere the match stays exact. On a case-sensitive filesystem the runtime's lowercase path names one file only, and a differently-cased file is not the record.
  • clear_shader_cache passes its windows flag through. The cleanup of empty folders afterwards also finds pipelines/ in any case.

Tests (Windows 11):

  • New 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.bin and PIPELINES/EARLY-PIPELINES.TXT. In each, the compiled file is deleted and the record is kept.
  • A windows=False counter-check: a differently-cased folder is listed for deletion.
  • Red/green: on 8ffb3c72 the three mixed-case subtests lose the record (cache-2 is deleted whole) and the counter-check fails with a TypeError. All pass on fd40dbf3.
  • tests/test_leonida_launcher.py: 148 OK. check_no_game_data.py on the changed files: clean.

AI-assisted (oreofr-agent).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373792610 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373792610). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T09:31:20Z. --- Thanks. Fixed in fd40dbf3ec9f8466f57acf03dc64981184b81d62. - `shader_cache_entries(path, windows)` now matches the `pipelines` folder name and the `KEPT_RECORD` names with `str.casefold` when the cache is a Windows one. So `Pipelines\Known-Pipelines.bin` and `PIPELINES\EARLY-PIPELINES.TXT` are kept. - Elsewhere the match stays exact. On a case-sensitive filesystem the runtime's lowercase path names one file only, and a differently-cased file is not the record. - `clear_shader_cache` passes its `windows` flag through. The cleanup of empty folders afterwards also finds `pipelines/` in any case. Tests (Windows 11): - New `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.bin` and `PIPELINES/EARLY-PIPELINES.TXT`. In each, the compiled file is deleted and the record is kept. - A `windows=False` counter-check: a differently-cased folder is listed for deletion. - Red/green: on 8ffb3c72 the three mixed-case subtests lose the record (`cache-2` is deleted whole) and the counter-check fails with a `TypeError`. All pass on fd40dbf3. - `tests/test_leonida_launcher.py`: 148 OK. `check_no_game_data.py` on the changed files: clean. AI-assisted (oreofr-agent).
merzleckeier commented 2026-12-03 09:35:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T09:35:12Z.


Confirmed the case fix on fd40dbf3 with 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_entries contains an unescaped backslash. python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.py now 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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7373898435 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7373898435). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T09:35:12Z. --- Confirmed the case fix on `fd40dbf3` with 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_entries` contains an unescaped backslash. `python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.py` now 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 commented 2026-12-03 09:42:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T09:42:15Z.


Re-verified updated head fd40dbf3e on native Windows 10 x64 (red -> green) -- PASS

  • Head tested: fd40dbf3e merged cleanly onto main (d9b618f10)
  • Checks (Windows 10 x64, Python 3.12):
    • python -I scripts/check_no_game_data.py -- PASS
    • GREEN: python -I tests/test_leonida_launcher.py -v -- 148/148 OK (0 skipped), including all four Windows case-insensitivity fixtures in test_the_record_is_kept_whatever_its_case_on_windows and both directory-listing failure cases in test_a_folder_that_cannot_be_read_deletes_nothing
    • RED (reverting tools/leonida_launcher.py and tools/launcher_i18n/ to origin/main while keeping the tests): 9 errors across the new ClearShaderCacheTests cases, exit code 1

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7374090763 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7374090763). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T09:42:15Z. --- Re-verified updated head `fd40dbf3e` on native Windows 10 x64 (`red -> green`) -- PASS - Head tested: `fd40dbf3e` merged cleanly onto `main` (`d9b618f10`) - Checks (Windows 10 x64, Python 3.12): - `python -I scripts/check_no_game_data.py` -- PASS - **GREEN**: `python -I tests/test_leonida_launcher.py -v` -- 148/148 OK (0 skipped), including all four Windows case-insensitivity fixtures in `test_the_record_is_kept_whatever_its_case_on_windows` and both directory-listing failure cases in `test_a_folder_that_cannot_be_read_deletes_nothing` - **RED** (reverting `tools/leonida_launcher.py` and `tools/launcher_i18n/` to `origin/main` while keeping the tests): 9 errors across the new `ClearShaderCacheTests` cases, exit code 1 AI-assisted: yes (Antigravity -- Gemini 4 Neon).
OreoFR commented 2026-12-03 09:51:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T09:51:21Z.


Thanks, the docstring now spells the path with a forward slash, so python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.py passes; launcher suite OK. Commit 6be4fb080d.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7374369327 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7374369327). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T09:51:21Z. --- Thanks, the docstring now spells the path with a forward slash, so `python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.py` passes; launcher suite OK. Commit 6be4fb080d5f11a3d17a901bbb45c0bfe0a9c65d.
OreoFR commented 2026-12-03 16:13:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T16:13:06Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7384466274 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3310#issuecomment-7384466274). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T16:13:06Z. --- 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

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