ps_interp_modes: refuse a single named file without a readable PSV0 chunk (DRAFT-241) #936

Merged
fin-github merged 1 commit from upstream-pr/936 into main 2026-11-28 19:26:52 +00:00
fin-github commented 2026-11-24 15:17:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fin-github on 2026-11-24T15:17:22Z.


Claimed in the coordination issue as: DRAFT-241 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135362620)

Supersedes draft #241, carried over from the original repository. This is the same commit rebased onto current main, with the original author (Alex Arenas) kept and git cherry-pick -x recording where it came from. The change and its explanation are theirs; see #241 for the original description.

Tested

  • python -I tests/test_ps_interp_modes.py: OK
  • python -I scripts/check_no_game_data.py on the changed files: clean.

Windows 11 (10.0.26200), Python 3.14.4. No game files, nothing online.

AI-assisted (Claude Code): rebasing, conflict resolution and test runs.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5474959014 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/936). Originally posted by [fin-github](https://github.com/fin-github) on 2026-11-24T15:17:22Z. --- Claimed in the coordination issue as: `DRAFT-241` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135362620) Supersedes draft #241, carried over from the original repository. This is the same commit rebased onto current `main`, with the original author (Alex Arenas) kept and `git cherry-pick -x` recording where it came from. The change and its explanation are theirs; see #241 for the original description. ### Tested - `python -I tests/test_ps_interp_modes.py`: OK - `python -I scripts/check_no_game_data.py` on the changed files: clean. Windows 11 (10.0.26200), Python 3.14.4. No game files, nothing online. AI-assisted (Claude Code): rebasing, conflict resolution and test runs.
PierreEbele commented 2026-11-25 21:46:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T21:46:00Z.


Reviewed 9711b34: I ran tests/test_ps_interp_modes.py on the PR head (32/32) and on main (30/30); copied the new tests onto main, where the single-file test fails and the directory guard passes. A probe with the repo's synthetic containers reproduces the bug on main - a single garbage or truncated file exits 0 with an empty "0 shaders" census (JSON mode: files: []) - while the PR refuses with exit 2 and one error line; valid files and directory scans behave identically on both trees. One adjacent gap this PR does not touch: a single file the index marks as a non-ps stage also exits 0 with an empty census. AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7175511428 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/936#issuecomment-7175511428). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T21:46:00Z. --- Reviewed 9711b34: I ran tests/test_ps_interp_modes.py on the PR head (32/32) and on main (30/30); copied the new tests onto main, where the single-file test fails and the directory guard passes. A probe with the repo's synthetic containers reproduces the bug on main - a single garbage or truncated file exits 0 with an empty "0 shaders" census (JSON mode: `files: []`) - while the PR refuses with exit 2 and one error line; valid files and directory scans behave identically on both trees. One adjacent gap this PR does not touch: a single file the index marks as a non-ps stage also exits 0 with an empty census. AI-assisted review. **Recommendation:** Merge
MoonEyes commented 2026-11-28 19:26:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:26:50Z.


Red/green: tests/test_ps_interp_modes.py fails on main (single file without PSV0 exits 0 instead of 2) and passes with the PR merged, on GitHub Actions Linux and natively on Windows.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244550280 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/936#issuecomment-7244550280). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T19:26:50Z. --- Red/green: tests/test_ps_interp_modes.py fails on main (single file without PSV0 exits 0 instead of 2) and passes with the PR merged, on GitHub Actions Linux and natively on Windows. Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!936
No description provided.