shader_library: reject --save paths that overlap extraction outputs #465
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!465
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/465/head"
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?
@EdenBendheim on GitHub · 2026-11-24 05:50 UTC · original
EdenBendheim:ubiq/shader-library-save-overlap→main· +187 −24 · 2 files · 1 commits · merged 2026-11-24 08:53 UTCClaim: #14
What changed
tools/shader_library.py: Validate--savewithsame_report_pathagainst all requested--outoutputs (index.json,library.json, selectedfspx/.code/.json/.stateincluding stale-state cleanup paths, matched.dxbc, eligibledisasm/.s, output directories, and ancestors of--out) before creating directories or writing either output. Overlapping paths exit2leaving existing files untouched; non-overlapping--saveinside a fresh--outtree succeeds because extraction directories are created before opening--save.tests/test_shader_library.py: Synthetic tests covering fresh/existing outputs, path aliases (relative, case-only, symlink, hardlink), ancestor-directory collisions, nested fresh-tree saves, and separate destinations.Testing & Disclosure
gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).ubiquitarianism/leonidamain(8f481cf16): alltest_shader_library*.pyandtest_*report_paths.pysuites (76/76),compileall,check_no_game_data.py, LF check — all passed.@QemmHD on GitHub · 2026-11-24 08:53 UTC · original
Merging. Why merged: a --save path that would overwrite extraction outputs is refused before anything is written.
Why it's good: security-reviewed; on main
1c93c86: shader_library tests 31 -> 37 (19 fail without the fix); it uses report_paths, which is already a listed translator input; repo-consistency set 563/563.AI-assisted (Claude Code, Claude Opus 5.5).