mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #1372] make_game: a saved translated index that names a shader not carved here is translated again (BUILD-SHADER-RESUME-IDENTITY) #1402
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1402
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1372
Author: @Mykolas009
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:build/shader-resume-identity📝 Commits (1)
318e76bmake_game: a saved translated index that names a shader not carved here is translated again (BUILD-SHADER-RESUME-IDENTITY)📊 Changes
3 files changed (+95 additions, -3 deletions)
View changed files
📝
make_game.py(+36 -0)📝
tests/test_make_game_empty_translation.py(+3 -3)📝
tests/test_shader_stage_resume.py(+56 -0)📄 Description
Claimed in the coordination issue as: BUILD-SHADER-RESUME-IDENTITY (claim, from sxnistxr's finding).
What and why
On a resumed shader stage,
make_game.shaderskept a savedshaders/spirv/index.jsonthat names other shaders than this work folder's, as long as it had the right number of entries:verify_translation_completenesscompares only the counts. The build then reports the stage done while the shaders the runtime will ask for were never translated.Reproduced on
mainwithShaderStageResumeTest's fixture: after one run, replace the index's only key with an unrelated name; the second run executes no step.A shader keeps its carved file's stem through unpacking, disassembly and translation (
fssm_unpack.pyandshader_disasm.pykeep the stem,rdna2spirv.pynames each entry after its listing), so the stage now compares names:translated_index_strangers(index, carved)returns the names in the translated index that are no carved shader of this folder (nothing when a file is missing, unreadable or malformed: other checks own those cases).tests/test_make_game_empty_translation.py: its fixture carvedshaderbut translatedshader_0; it now uses one name, as the real tools do.Tested
Windows 11, Python 3.14.3, standard library only, no game files, no GPU:
python -I tests/test_shader_stage_resume.py: 50 tests, OK. The three new tests fail withmake_game.pyfrommain(2 failures, 1 error) and pass with this change.python -Ion everytests/test_make_game*.py,tests/test_*shaders_stage*.pyandtests/test_text_write_line_endings.py: all OK.python -I scripts/check_no_game_data.pyon the three changed files: clean.Not covered
<name>.spvis gone is not detected here: the stage fixtures in six test files publish an index without modules, so that check needs them changed first and is left for a separate pull request.GPUs tested: n/a
AI-assisted: yes (Claude Code, Claude Fable 5.2, wrote the change and the tests and ran them; I reviewed it)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.