make_game: the stage tool lists must name the decoder they run through (STAGE-DEP-CACHE) #604

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

@⁠Headache3318 on GitHub · 2026-11-24 09:48 UTC · original
Headache3318:fix/stage-dep-cache-decoder-tools → main · +49 −3 · 2 files · 1 commits · merged 2026-11-24 12:47 UTC

Claimed in the coordination issue as: STAGE-DEP-CACHE (issue #14, comment 7127857615). Depends on: none.

FSPX_TOOLS, LIBRARY_TOOLS and BVH_TOOLS key the shaders / pipeline-library / BVH caches on the bytes of the programs that produced them, but none of them names the decoder half of the chain: fspx_unpack.py --disasm imports shader_disasm.py (tools/fspx_unpack.py:205), which decodes through rdna2_decode.py, rdna2_isa_tables.py and mc_command.py, so an edited decoder leaves the old listings in the cache and translates them again. The library stage also carves through shader_carve.py (tools/shader_library.py:201), which was not listed either. Adds a tests/test_shader_stage_resume.py case that fails when a module the chain imports is missing from a list, so the next link cannot be left out silently.

AI-assisted (Hermes agent on behalf of @⁠Headache3318). Tested at base 7430f59b2, Arch Linux, 8-core x86-64, python 3.14.9: python3 -I tests/test_shader_stage_resume.py, test_bvh_shaders_stage.py, test_fspx_shaders_stage.py, test_make_game_resume.py all OK; python3 -m compileall -q make_game.py tools tests exit 0; git diff --check clean; python3 -I scripts/check_no_game_data.py make_game.py tests/test_shader_stage_resume.py exit 0. No GPU run (another check on this box owns the GPU) and no game package on this machine, so no corpus count and no resume run against a real built work folder.

**@⁠Headache3318** on GitHub · 2026-11-24 09:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/604) `Headache3318:fix/stage-dep-cache-decoder-tools` → `main` · +49 −3 · 2 files · 1 commits · merged 2026-11-24 12:47 UTC Claimed in the coordination issue as: STAGE-DEP-CACHE (issue #14, comment 7127857615). Depends on: none. `FSPX_TOOLS`, `LIBRARY_TOOLS` and `BVH_TOOLS` key the shaders / pipeline-library / BVH caches on the bytes of the programs that produced them, but none of them names the decoder half of the chain: `fspx_unpack.py --disasm` imports `shader_disasm.py` (tools/fspx_unpack.py:205), which decodes through `rdna2_decode.py`, `rdna2_isa_tables.py` and `mc_command.py`, so an edited decoder leaves the old listings in the cache and translates them again. The library stage also carves through `shader_carve.py` (tools/shader_library.py:201), which was not listed either. Adds a `tests/test_shader_stage_resume.py` case that fails when a module the chain imports is missing from a list, so the next link cannot be left out silently. **AI-assisted** (Hermes agent on behalf of @⁠Headache3318). Tested at base `7430f59b2`, Arch Linux, 8-core x86-64, python 3.14.9: `python3 -I tests/test_shader_stage_resume.py`, `test_bvh_shaders_stage.py`, `test_fspx_shaders_stage.py`, `test_make_game_resume.py` all OK; `python3 -m compileall -q make_game.py tools tests` exit 0; `git diff --check` clean; `python3 -I scripts/check_no_game_data.py make_game.py tests/test_shader_stage_resume.py` exit 0. No GPU run (another check on this box owns the GPU) and no game package on this machine, so no corpus count and no resume run against a real built work folder.
Claimed in the coordination issue as: STAGE-DEP-CACHE (#14).

FSPX_TOOLS, LIBRARY_TOOLS and BVH_TOOLS key the shaders, pipeline-library and BVH caches on the bytes of the
programs that produced them, but none of them names the decoder half of the chain: fspx_unpack.py --disasm imports
shader_disasm.py (tools/fspx_unpack.py:205), which decodes through rdna2_decode.py, its tables and mc_command.py. An
edited decoder therefore left the old listings in the cache and got them translated again, so the fix was in the
cache, not on the disk. The library stage also carves with shader_carve.py (tools/shader_library.py:201), which was
not listed either.

tests/test_shader_stage_resume.py gets a case that fails when a module the chain imports is missing from the list,
so the next link added to the chain cannot be left out silently again.

AI-assisted (Hermes agent on behalf of @Headache3318). Tested at base 7430f59b2 on Arch Linux, 8-core x86-64,
python 3.14.9, with the repo's standard-library tests: test_shader_stage_resume, test_bvh_shaders_stage,
test_fspx_shaders_stage and test_make_game_resume all OK; python -m compileall -q make_game.py tools tests exit 0;
git diff --check clean; scripts/check_no_game_data.py make_game.py tests/test_shader_stage_resume.py exit 0. No game
package on this machine, so no corpus count and no shaders-stage resume run against a real work folder; no GPU run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:11:09 +00:00
github manually merged commit 76b9d170cb into gh-pr/604/base 2026-11-26 09:11:10 +00:00
Author
Owner

@⁠madvillain91 on GitHub · 2026-11-24 10:42 UTC · original · reviewed

Independent Windows 11 26H2 (26300.9711) check at 76b9d170c against main 21625bca8, using CPython 3.12.3 and Git for Windows 2.56.0.windows.2. All 98 tests across test_shader_stage_resume.py, test_bvh_shaders_stage.py, test_fspx_shaders_stage.py, and test_make_game_resume.py passed (14.610s). The updated tool lists and AST-based transitive import guard look clean. LGTM.

**@⁠madvillain91** on GitHub · 2026-11-24 10:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/604#pullrequestreview-6037755640) · **reviewed** Independent Windows 11 26H2 (26300.9711) check at 76b9d170c against main 21625bca8, using CPython 3.12.3 and Git for Windows 2.56.0.windows.2. All 98 tests across `test_shader_stage_resume.py`, `test_bvh_shaders_stage.py`, `test_fspx_shaders_stage.py`, and `test_make_game_resume.py` passed (14.610s). The updated tool lists and AST-based transitive import guard look clean. LGTM.
Author
Owner

@⁠madvillain91 on GitHub · 2026-11-25 12:12 UTC · original

madvillain8099

**@⁠madvillain91** on GitHub · 2026-11-25 12:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/604#issuecomment-7162067555) madvillain8099
This discussion has been locked. Commenting is limited to contributors.
No description provided.