Repository navigation
Report missing required translator inputs and retire stale outputs - #6292
Conversation
|
Tested e27c422 on Windows, CPython 3.14.7, CPU only: pass. I ran the CLI with two synthetic listings, cs_dispatch and ps_fixture. Each contained s_endpgm. I omitted the compute dispatch sidecar and seeded the output with an old cs_dispatch.spv and index entry.
I ran tests/test_rdna2spirv_cli.py, tests/test_fssm_wave_size.py and tests/test_text_write_line_endings.py with py -3.14 -I. In total, 43 tests passed and one skipped. Both new regression tests failed against the merge-base implementation. AI-assisted. |
SirKingg
left a comment
There was a problem hiding this comment.
Requesting changes: two reproducible stale-index cases on the standalone shard CLI.
-
tools/rdna2spirv.py:17346-17352,17403-17406: seedindex.part0.jsonandshard0.jsonfor a completed shard, then retry--shard 0/1with a missing compute dispatch input followed by a pixel input whose.dxbcpath is a directory. On Windows the first shader's old module is deleted, but opening the directory raisesPermissionErrorbefore the end-of-loop part unlink. Both old markers remain, and--mergesucceeds and republishes an index referencing the deleted module. A resume with a matching make_game plan also considers that shard complete. Invalidate the completion part before mutation or on every unsuccessful exit, including unexpected read errors/interruption. -
tools/rdna2spirv.py:17351,17403-17406: even when the missing-input run reaches its normal exit 1 and removes its part, a pre-existingindex.jsonremains published while its referenced.spvhas been deleted. A direct shard invocation therefore leaves a stale complete index until a later merge is attempted. Please invalidate or update the published index when retiring a module in shard mode, while preserving unrelated outputs.
Independent Windows CPU validation at e27c422: python -I tests\test_rdna2spirv_cli.py -v 34 passed; python -I tests\test_rdna2spirv_merge.py 30 passed; python -I tests\test_make_game_resume.py 14 passed; python -I tests\test_fssm_wave_size.py 7 passed; python -I tests\test_text_write_line_endings.py 3 passed; git diff --check passed. Synthetic real-CLI controls: absent optional sidecar translates, missing dispatch removes the part and module, repair followed by retry and merge succeeds, and an isolated Windows directory-read PermissionError preserves its prior module/index. Directory-read denial is not an ACL-denial test. No game files or GPU were used; no corpus or GPU validation was run. AI-assisted.
|
Exercised the failure → repair cycle at I also repeated the test after a successful two-shard merge. With one compute sidecar withheld, its shard exited 1 and removed its part. The other part stayed byte-identical. A merge while incomplete exited 2. Restoring the input and rerunning just the affected shard allowed the merge to succeed and reproduced the original 16-entry index. CachyOS x86-64, Xbox 1.0.2.1, CPU only, AI-assisted. |
|
SHADER-1048 review follow-up at I reproduced the failure through the production CLI on Windows CPU at At the new head, each missing-tool retry returns 2 and withdraws the merged index immediately. A subsequent merge returns 2. The previously validated binaries and the healthy shard’s part and marker remain byte-identical. Restoring the tools and rerunning only the affected shard changes its binary, and the final output files match a fresh two-shard build byte-for-byte. The CLI regression also exercises the review’s missing compute input followed by a directory at the pixel container path. Both the ordinary missing-input exit and the interrupted retry retire the compute module, remove the part and merged index, and preserve the previous pixel binary. Windows, Python 3.13.15, Vulkan SDK 1.4.363.0. Passed 35 CLI, 30 merge, 14 resume, 7 wave-size, and 3 line-ending tests, plus compileall, isolated make_game help, and diff whitespace checks. Synthetic inputs, CPU only. AI-assisted. |
shayderrr
left a comment
There was a problem hiding this comment.
Summary: tools/rdna2spirv.py::main() now catches FileNotFoundError per listing, prints ERROR: <name>: missing translation input <path>, retires the stale .spv/index entry via drop_stale(), continues the batch, and returns 1 with a missing-input count. An incomplete shard deletes its index.partN.json so resume retries it. tests/test_rdna2spirv_cli.py adds tests for named failures, stale output removal, valid later listings, and shard invalidation.
Why merge: A batch with a missing native or sidecar input now reports every affected shader and leaves no publishable stale module instead of aborting at the first error.
Verdict: Approve
|
Summary: Why merge: A batch with a missing native or sidecar input now reports every affected shader and leaves no publishable stale module instead of aborting at the first error. Verdict: Approve |
Coordination claim 7102982730 on #6214. Independent of #3018, #5586, #5688 and #6161. No PR dependencies.
On main at 561b65a, the standalone CLI stopped at the first missing required input. A private CPU batch selected the same 32 listings as the #3018 validation run. Main wrote 16 modules before the traceback and left the fresh directory without an index. Running each separately identified two missing compute dispatch reads and three missing native-code reads for instruction re-anchoring.
The CLI now names each failed input, drops its old module and index entry, continues through the selection, and returns 1 after reporting the counts. An incomplete shard removes its part so resume retries it. The translation rules and optional sidecar fallbacks stay in place.
On the same private batch the CLI translated 27/32, validated all 27, indexed 27 and reported five missing inputs with exit 1. Synthetic tests cover stale entries, a later valid listing with no native sidecar, and incomplete shard retry. Windows CPU only, Vulkan SDK 1.4.363.0. No raw game package, GPU or GPU driver used.
Passed 34 translator CLI tests, seven wave-size tests, three text line-ending tests, compileall, isolated make_game.py --help and git diff --check. AI-assisted with Codex.