Commit Graph

6 Commits

Author SHA1 Message Date
98b219eb28 make_game: a saved translated index that names a shader not carved here is translated again (BUILD-SHADER-RESUME-IDENTITY)
verify_translation_completeness compares only the number of entries, so on a
resumed shader stage an index left by other inputs with as many entries as the
carve passed for this folder's finished translation and no step ran.

A shader keeps its carved file's stem through unpacking, disassembly and
translation, so the stage now compares the index's names with the carve's: on
resume a stranger drops the index and its shard plan and translates again, and
after a translation a stranger fails the stage and removes the index and its
shard plan, so that a later run of the pipelines stage alone does not take the
index as finished and the next run of this stage does not merge the same parts
again. The names are checked before the counts. The disk-space check no longer
counts such a folder as reusable.

The index is read with read_translation_index and the carve with shader_stems,
as the other steps read them (a UTF-8 BOM included).

The fixture in test_make_game_empty_translation.py named its carved shader
"shader" and its translated one "shader_0"; it now uses one name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 20:21:29 +02:00
8a5be5ce77 make_game: rebuild damaged translation indexes from shards
A truncated or malformed shaders/spirv/index.json could let the shaders stage report success and then leave the pipeline stage asking for another full translation. Treat a readable but malformed index as recoverable from completed shards, keep accepting a UTF-8 BOM index, and still reject a real empty merge. Also account for shaders/assets overlap in preflight free-space checks when both stages run.

Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (recovering-a-damaged-shader-index)

AI-assisted.
2026-11-24 17:37:41 -06:00
d083a2cc37 Make main's tests green: 12 test files that drifted from the code (#9896)
Twelve test files failed on main at 2d53a8055 (CI's check and semantic-tests steps, run locally): most are a test
and the code it checks changed by different pull requests in the same merge round. Each fix below is either taken
from a closed pull request that already had it, or restores what an earlier merged change intended.

From closed pull requests:
- test_make_game_resume: FakeProc gets poll(), which translate() now calls (#7018)
- test_make_game_empty_translation: the Exited stub gets poll() and the failed-shard path is checked (#7214)
- test_shader_checks: stub table_fetch_test in the Wave64Checks harness and count it (#7433)
- test_runtime_paths: runtime.yml's path filter lists tools/replace_retry.py, which rdna2spirv.py imports (#7029)
- test_psin_names: patch the same_report_path helpers that report_paths now calls (#8719)
- test_report_source_collision: the fixture is a real Bink 2 header; bink_index refuses other files (#7408)
- test_missing_input_exit_codes: tile_probe checks its inputs before it asks for numpy (#4771)

Restored:
- merge_check: a failed `git show` is an error again (5b88d58); 21016cf brought back the lenient read that
  treated it as a new file, while new files are already left out when the diff is read
- rpf_probe: a symlinked --out updates its target again (44d3595); 55d21cc's staged write replaced the link

Updated to the code:
- test_shader_stage_resume: TRANSLATION_SOURCES lists fssm_unpack.py and shader_stage_manifest.py, which the
  translator imports; existing work folders translate once more after this
- test_tool_stdout_encoding: the 15 programs merged without the stdout guard get the same block as the others
- test_rdna2spirv_decode: drop the test of decode_any_format, which SHADER-849 replaced with the table decode
  that tests/semantic/test_format_decode_table.py checks

Co-authored-by: jewmaster1337 <102986566+jewmaster1337@users.noreply.github.com>
Co-authored-by: TanmaySatyam <248538550+TanmaySatyam@users.noreply.github.com>
Co-authored-by: evilclanker9000 <45567075+evilclanker9000@users.noreply.github.com>
Co-authored-by: slint6614-dev <359954236+slint6614-dev@users.noreply.github.com>
Co-authored-by: BlackNife <108077267+Poussistar@users.noreply.github.com>
Co-authored-by: fiestorra <65175643+fiestorra@users.noreply.github.com>
Co-authored-by: fearkov <289226582+fearkov@users.noreply.github.com>
Co-authored-by: DoubleD17 <48109637+DoubleD17@users.noreply.github.com>
2026-11-24 00:21:26 +01:00
d2c2ab778f make_game: a translated index that cannot be removed fails the stage with its message, not a traceback (#6740)
Squash-merged after diff review of PR #6740 - make_game: a translated index that cannot be removed fails the stage with its message, not a traceback
2026-11-23 09:59:27 -06:00
618c0f31f4 make_game: narrow the empty-index guard to what a merge actually publishes
Main's suites model two neighbouring cases differently: an FSPX build that translates no programs is a
finished step, and the resume fixtures save an unreadable stand-in index. Keep the `{}` that --merge
publishes when it produced nothing (drop it, and translate again next run) and the pipeline preflight
that refuses an empty or unreadable index; drop the wider "0 programs" and "unreadable saved index"
premises, which broke tests/test_fspx_shaders_stage.py and tests/test_shader_stage_resume.py.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 21:49:01 -06:00
b616525c28 Pipelines: refuse an empty or unreadable translated shader index 2026-11-22 14:07:47 -06:00