tools/shader_stage_manifest.py: case-insensitive suffix and conflicting stage guard #2287
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2287"
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?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-26T12:46:44Z.
Claimed in the coordination issue as: SHADER-STAGE-MANIFEST-CASE-SUFFIX-AND-CONFLICT-GUARD (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7192416492)
What and why
suffixcase-insensitively in_stem_rows()(tools/shader_stage_manifest.py) so uppercase/mixed-case extensions such as.DXBCresolve to the same stems instead of failing suffix validation.shader_stages(): when two rows for the same stem specify conflicting non-empty stages (e.g."ps"and"vs"), recordNone(unknown) instead of silently letting the last row overwrite earlier entries, while preserving agreeing duplicates andNone/empty + known pairs.tests/test_shader_stage_manifest.pycovering case-insensitive suffix matching and duplicate stage conflict resolution.Tested
python -I tests/test_shader_stage_manifest.py -v: 19 passed, 0 failed (detachedupstream/mainbaseline with only the updated test file fails with 1 failure and 1 error).python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q tools/shader_stage_manifest.py tests/test_shader_stage_manifest.py, andgit diff --cached --check: passed.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-27T04:39:46Z.
Review: APPROVED
Approving
6c1a97ecf.The suffix is matched case-insensitively and the stem cut by length, and duplicate index entries for one stem that name different stages now make it unknown (None) instead of the last one winning; a duplicate without a stage no longer erases a known one.
Merged onto
maind1dff7949in one batch with 15 other tool PRs of this series (no conflicts), on Linux with Python 3.13.tests/test_shader_stage_manifest.py: 19 passed (main: 17). AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:29:33Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_shader_stage_manifest -> 19 tests OK and tests.test_shader_stage_resume -> 47 tests OK, including the new case-insensitive suffix/conflicting-stage cases. Not approving yet: the branch is 446 commits behind current main, so a rebase is needed before the final diff can be reviewed.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:23:53Z.
#2287 | head
6c1a97ecf7(merged cleanly with main901b6c1bf) |python -I tests/test_shader_stage_manifest.py| red on main:FAILED (failures=1, errors=1)(ValueErroron mixed-case.DXBC/.DxBcsuffixes and conflicting duplicate shader stage entries silently retaining the last stage instead ofNone) | green on PR+main:19 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_stem_rows(value.lower().endswith(suffix.lower())withvalue[:-len(suffix)]preserving stem case and./..traversal guards) andshader_stages(conflictedset marking disagreeing duplicate non-empty stagesNonewhile allowing agreeing orNone/empty duplicates to resolve cleanly) intools/shader_stage_manifest.py. Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.pyon the merged tree.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T15:10:01Z.
Red/green: classified READY by cloud-6 (red on main
09c153948, green on head merged with main); head6c1a97ecf7unchanged since 2026-11-26, before that run.Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)