tools/shader_stage_manifest.py: case-insensitive suffix and conflicting stage guard #2287
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2287
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/shader-stage-manifest-safety"
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 successfully merged and closed
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.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).#2287 | head 6c1a97ecf7d9d9bc277d18f942867d19d4031a17 (merged cleanly with main 901b6c1bf) |
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.Red/green: classified READY by cloud-6 (red on main 09c153948, green on head merged with main); head 6c1a97ecf7d9 unchanged since 2026-11-26, before that run.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)