mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #494] SHADER-INDEX-RECOVERY: rebuild damaged translation indexes from shards #543
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#543
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/494
Author: @bobcatchris
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:shader-index-recovery📝 Commits (1)
8a5be5cmake_game: rebuild damaged translation indexes from shards📊 Changes
6 files changed (+159 additions, -53 deletions)
View changed files
📝
make_game.py(+73 -49)📝
tests/test_make_game_argparse.py(+1 -1)📝
tests/test_make_game_empty_translation.py(+74 -1)📝
tests/test_make_game_preflight.py(+2 -1)📝
tests/test_native_pso_hashes.py(+8 -0)📝
tools/native_pso_hashes.py(+1 -1)📄 Description
Claimed in the coordination issue as: SHADER-INDEX-RECOVERY
What and why
A truncated or malformed
shaders/spirv/index.jsoncould let the shaders stage report success while the pipeline stage later rejected the same file and asked for another full translation. This treats a readable but malformed index as recoverable from the already completed shards, keeps a UTF-8 BOM index reusable, and still rejects a genuine empty merge. It also halves jobs correctly when shaders and assets overlap during free-space preflight.Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches@33ab48d3ea/README.md (recovering-a-damaged-shader-index)No game data, keys, or decryption are included.
Tested
python -I tests/test_make_game_argparse.py— 38 tests OKpython -I tests/test_make_game_empty_translation.py— 20 tests OKpython -I tests/test_make_game_preflight.py— 98 tests OK, 1 skippedpython -I tests/test_make_game_translator_flags.py— 33 tests OKpython -I tests/test_shader_stage_resume.py— 46 tests OKpython -I tests/test_docs_links.py— 16 tests OKpython -I tests/test_docs_cli_flags.py— 4 tests OKpython -I tests/test_ci_registration.py— 15 tests OKpython -m compileall -q make_game.py tools tests— OKgit diff --checkcleanThe source report rebuilt a truncated merged index from two synthetic pixel shards with matching original bytes. I reproduced the regression locally with the new tests; no game files were involved.
GPUs tested: n/a (CPU-only pipeline/tooling change)
AI-assisted: yes
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.