bink_play: honor --no-cache without persistent storage (BINK-NO-CACHE) #566

Manually merged
github merged 1 commit from gh-pr/566/head into gh-pr/566/base 2026-11-26 09:08:51 +00:00
Owner

@⁠JiyouProt on GitHub · 2026-11-24 08:27 UTC · original
JiyouProt:codex/bink-no-cache → main · +80 −9 · 2 files · 1 commits · merged 2026-11-25 19:46 UTC

Claimed in the coordination issue as: BINK-NO-CACHE

What and why

--no-cache still consulted the persistent cache path, created its parent directory and placed the temporary names report there. Thus listing with caching disabled failed if that cache directory was unavailable (reproduced with an existing file at the directory path), and a successful uncached lookup still created persistent directories.

Only resolve, read and create the persistent cache when caching is enabled. Uncached lookups use the system temporary directory and retain the existing report cleanup on success and failure. Existing cache contents remain untouched. The cached path, invalidation keys and concurrent lookup behavior are unchanged.

Four synthetic regressions cover CLI listing with an unusable cache directory, no directory creation, preservation of an existing cache and cleanup after report-generation failure. All four fail on the original source.

Tested

Windows 11 build 26300.9974, Python 3.14.3, based on main 1c93c86970.

  • python -I tests/test_bink_play.py: 14 passed, including the existing cache/invalidation/concurrency tests.
  • python -I tests/test_text_write_line_endings.py: 3 passed.
  • Full semantic suite with SPIRV-Tools available: 465 files, 6,107 tests, 0 files failed (515 s, 8 jobs).
  • compileall, both make_game.py --help and bink_play.py --help, changed-file no-game-data scan and git diff --check: passed.
  • Adjacent test_bink_names.py: 35/36 passed. The Windows path-representation assertion in test_unreadable_mount_directory_preserves_the_report fails identically in an untouched checkout of the same main. This is already covered by #312 and is independent of this change.

GPUs tested: n/a — only synthetic CSV/XML fixtures, no movie data, codec or GPU needed.

AI-assisted: yes, Codex.

Checklist

  • Based on current main at task start and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.
  • No translator rule changed.
**@⁠JiyouProt** on GitHub · 2026-11-24 08:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/566) `JiyouProt:codex/bink-no-cache` → `main` · +80 −9 · 2 files · 1 commits · merged 2026-11-25 19:46 UTC Claimed in the coordination issue as: [BINK-NO-CACHE](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why `--no-cache` still consulted the persistent cache path, created its parent directory and placed the temporary names report there. Thus listing with caching disabled failed if that cache directory was unavailable (reproduced with an existing file at the directory path), and a successful uncached lookup still created persistent directories. Only resolve, read and create the persistent cache when caching is enabled. Uncached lookups use the system temporary directory and retain the existing report cleanup on success and failure. Existing cache contents remain untouched. The cached path, invalidation keys and concurrent lookup behavior are unchanged. Four synthetic regressions cover CLI listing with an unusable cache directory, no directory creation, preservation of an existing cache and cleanup after report-generation failure. All four fail on the original source. ### Tested Windows 11 build 26300.9974, Python 3.14.3, based on main 1c93c8697078c3ccbd6f374caf5bb3ab0b6bc8e4. - `python -I tests/test_bink_play.py`: **14 passed**, including the existing cache/invalidation/concurrency tests. - `python -I tests/test_text_write_line_endings.py`: 3 passed. - Full semantic suite with SPIRV-Tools available: **465 files, 6,107 tests, 0 files failed** (515 s, 8 jobs). - compileall, both `make_game.py --help` and `bink_play.py --help`, changed-file no-game-data scan and `git diff --check`: passed. - Adjacent `test_bink_names.py`: 35/36 passed. The Windows path-representation assertion in `test_unreadable_mount_directory_preserves_the_report` fails identically in an untouched checkout of the same main. This is already covered by #312 and is independent of this change. GPUs tested: n/a — only synthetic CSV/XML fixtures, no movie data, codec or GPU needed. AI-assisted: yes, Codex. ### Checklist - [x] Based on current main at task start and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption. - [x] No translator rule changed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:08:50 +00:00
github manually merged commit 58d6fe27c1 into gh-pr/566/base 2026-11-26 09:08:51 +00:00
Author
Owner

@⁠kirigayakazima on GitHub · 2026-11-24 12:28 UTC · original

Reviewed on Windows 11 x64 (Python 3.14.7, CPU only, synthetic fixtures only — no game files) against head commit 58d6fe27c11ebea71ac3c443353662445ba5eff9.

Verdict: Looks good — --no-cache now avoids reading, creating, or writing anything in the persistent cache directory and stages temporary bink_names output in the system temporary directory with cleanup on both success and failure.

Checks run locally

  • Clean merge with main (21625bca): git merge-tree --write-tree upstream/main HEAD exited 0; git diff --check upstream/main...HEAD clean.
  • Compatibility with #568 (09867f49): git merge-tree --write-tree HEAD <PR-568-head> exited 0 (both changes in tools/bink_play.py compose cleanly with no conflicts).
  • python -I tests/test_bink_play.py -v: 14 tests, OK.
  • python -I tests/test_ci_registration.py: 15 tests, OK.
  • python -I tests/test_text_write_line_endings.py: 3 tests, OK.
  • python -I scripts/check_no_game_data.py tools/bink_play.py tests/test_bink_play.py and python -m compileall -q tools tests: clean (exit 0).

Additional Windows edge-case probes

  • LOCALAPPDATA pointing to a regular file with --no-cache --list: exited 0, printed synthetic stream entry, left the blocker file untouched, staged .tmp.csv under the system temp folder, and left no temporary files behind.
  • Corrupt existing cache file under load_names(..., use_cache=False): skipped cache lookup cleanly, returned fresh parsed entries, and left existing cache bytes intact.
  • Nonzero bink_names.main return (rc=2) under use_cache=False: raised SystemExit, removed the temporary report from system temp, and did not create the cache directory.

AI-assisted: yes

**@⁠kirigayakazima** on GitHub · 2026-11-24 12:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/566#issuecomment-7131497037) Reviewed on Windows 11 x64 (`Python 3.14.7`, CPU only, synthetic fixtures only — no game files) against head commit `58d6fe27c11ebea71ac3c443353662445ba5eff9`. **Verdict: Looks good** — `--no-cache` now avoids reading, creating, or writing anything in the persistent cache directory and stages temporary `bink_names` output in the system temporary directory with cleanup on both success and failure. ### Checks run locally - Clean merge with `main` (`21625bca`): `git merge-tree --write-tree upstream/main HEAD` exited `0`; `git diff --check upstream/main...HEAD` clean. - Compatibility with #568 (`09867f49`): `git merge-tree --write-tree HEAD <PR-568-head>` exited `0` (both changes in `tools/bink_play.py` compose cleanly with no conflicts). - `python -I tests/test_bink_play.py -v`: **14 tests, OK**. - `python -I tests/test_ci_registration.py`: **15 tests, OK**. - `python -I tests/test_text_write_line_endings.py`: **3 tests, OK**. - `python -I scripts/check_no_game_data.py tools/bink_play.py tests/test_bink_play.py` and `python -m compileall -q tools tests`: clean (exit `0`). ### Additional Windows edge-case probes - **`LOCALAPPDATA` pointing to a regular file with `--no-cache --list`**: exited `0`, printed synthetic stream entry, left the blocker file untouched, staged `.tmp.csv` under the system temp folder, and left no temporary files behind. - **Corrupt existing cache file under `load_names(..., use_cache=False)`**: skipped cache lookup cleanly, returned fresh parsed entries, and left existing cache bytes intact. - **Nonzero `bink_names.main` return (`rc=2`) under `use_cache=False`**: raised `SystemExit`, removed the temporary report from system temp, and did not create the cache directory. AI-assisted: yes
Author
Owner

@⁠JiyouProt on GitHub · 2026-11-24 20:18 UTC · original

Rechecked head 58d6fe27 against current main 58be9cdf8 on Windows / Python 3.14.3. It merges cleanly. On the combined tree: test_bink_play 14/14, test_bink_play_cache_write 3/3, CI registration 15/15 and LF writers 3/3 pass; changed-file no-game-data and whitespace checks are clean. CI registration was run outside the local sandbox because it needs Git Bash.

I also merged #840 (d6cee3e10, the fd-cleanup follow-up to #568) into that local integration tree: no conflicts, test_bink_play 16/16 and test_bink_play_cache_write 3/3 pass. Thus the no-cache behavior here composes with that cache-error cleanup. No code or branch update is needed for #566. Synthetic inputs only, no GPU or game files. AI-assisted with Codex.

**@⁠JiyouProt** on GitHub · 2026-11-24 20:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/566#issuecomment-7143339605) Rechecked head 58d6fe27 against current main 58be9cdf8 on Windows / Python 3.14.3. It merges cleanly. On the combined tree: test_bink_play 14/14, test_bink_play_cache_write 3/3, CI registration 15/15 and LF writers 3/3 pass; changed-file no-game-data and whitespace checks are clean. CI registration was run outside the local sandbox because it needs Git Bash. I also merged #840 (d6cee3e10, the fd-cleanup follow-up to #568) into that local integration tree: no conflicts, test_bink_play 16/16 and test_bink_play_cache_write 3/3 pass. Thus the no-cache behavior here composes with that cache-error cleanup. No code or branch update is needed for #566. Synthetic inputs only, no GPU or game files. AI-assisted with Codex.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 19:46 UTC · original

Merged, thanks! The new test fails on main and passes with this.

  • Checked on main 8c40e3b7a + 58d6fe27c: the semantic suite passes (491 files, 6,312 tests, 0 files failed); test_bink_play pass; the 15 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 19:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/566#issuecomment-7172750059) Merged, thanks! The new test fails on `main` and passes with this. - **Checked on `main` `8c40e3b7a` + `58d6fe27c`:** the semantic suite passes (491 files, 6,312 tests, 0 files failed); `test_bink_play` pass; the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.