Repository navigation
rdna2spirv: refuse a shader named by two --merge parts - #3306
bobcatchris wants to merge 1 commit into
Conversation
Flyander
left a comment
There was a problem hiding this comment.
Reviewed at 56019d7d6f17cca5c1fbf5612399aa0da83ab9e5.
python -I tests/test_rdna2spirv_merge.py— 25 tests passed.python -I tests/test_rdna2spirv_cli.py— 18 tests passed.- Synthetic shard parts only; no game files or GPU used.
The duplicate-name check reports both source parts and refuses to publish a merged index before the conflicting data can be mislabeled. I found no correctness issue in this change.
56019d7 to
e64d058
Compare
|
Independent CPU verification of I used a lightweight snapshot instead of a full worktree:
This confirms the duplicate-shader check lands exactly where intended and leaves the other 25 merge cases intact. |
|
Tested
Heads-up: this and #3196 (also yours) both add tests at the same place in |
e64d058 to
b943a29
Compare
|
Rebased onto #3196's head at |
|
Tested Setup: the PR diff applied to
No game files. AI-assisted (Claude Code); I ran the commands above and checked the numbers against the logs. |
|
Tested b943a29 merged with main 98fa503 (merged tree 7997391277) on Windows 11, RTX 4080 SUPER + Intel UHD 770 (MSVC 14.51), Python 3.13.1: pass.
|
|
Tested
No game files. AI-assisted (Claude Code). |
|
Verified against main 3faac55: the branch merges cleanly and tests/test_rdna2spirv_merge.py runs 30/30 green under python -I (re-run on the merged tree), including the four new cases for a part that is not JSON and a shader named by two parts, at both API and CLI level. Main today has neither check (merge_shard_parts only names the plan/marker files on error), so this is not superseded. Nice touch that the refusals exit 2 with delete-this-part guidance and never write index.json. CI pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
b943a29 to
9320312
Compare
|
Tested
AI-assisted. |
|
Independent macOS code read and test run at head 9320312 (Apple M2, Python 3.13.18, llvm-mc 21.1.8). The translator now refuses a
No issue found; synthetic listings only. AI-assisted. |
|
Tested
|
merge_shard_parts()combined the part documents withmerged.update(doc). A shader listed by twoindex.part<i>.jsonfiles was silently last-wins: the later part's metadata and module were published under the name, the other part's.spvstayed behind under the same name, and the index said the corpus was complete. That only happens when the parts come from different runs, e.g. a re-carve that keeps the shard count and leaves older parts in place.A name in two parts is now a
ShardSetErrornaming the shader and both part files, with the fix (delete the parts and run every shard again): exit 2, noindex.json. Independent of #2964 (a complete but empty set) and #3196 (an unreadable part); each touches different code in the same function.python -I tests/test_rdna2spirv_merge.py— 25 tests OK (unit case for both differing and identical duplicates);python -I tests/test_rdna2spirv_cli.py— 18 OK. Synthetic parts only, no game files or GPU.AI-assisted.