wave32_pixel_scan: use shared same_report_path and catch --out write OSError (DRAFT-301) #932

Closed
leonida/mandy
fin-github wants to merge 0 commits from draft/301 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

fin-github commented 2026-11-24 15:17:14 +00:00

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

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

Tested

  • python -I tests/test_wave32_pixel_scan.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.

Claimed in the coordination issue as: `DRAFT-301` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135362620) Supersedes draft #301, carried over from the original repository. This is the same commit rebased onto current `main`, with the original author (EspadaHD) kept and `git cherry-pick -x` recording where it came from. The change and its explanation are theirs; see #301 for the original description. ### Tested - `python -I tests/test_wave32_pixel_scan.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:37:57 +00:00

Reviewed d1dc202: wave32_pixel_scan refuses a --out that names a scanned listing through any spelling and reports a failed report write with exit 2 instead of a traceback; two tests added. I ran tests/test_wave32_pixel_scan.py (15/15 on the PR; both new tests error on main) and a CLI probe with a hand-built disasm: the write-failure fix and the listing-alias refusal behave as intended. Finding: the scan also reads the carve index.json (stage_of) and fssm/<name>.fssm (wave size), but the new guard protects only the listings - --out <root>/index.json and --out <root>/fssm/ps_lane.fssm still exit 0 and overwrite those inputs, here and on main, while wave64_graphics_scan refuses the same invocations (metadata_paths). Suggest extending the guard to those inputs in this PR. Measured guard cost: ~0.75s over 20k listings, same profile as the merged wave64 guard. AI-assisted review.

Recommendation: Fix first

Reviewed d1dc202: wave32_pixel_scan refuses a `--out` that names a scanned listing through any spelling and reports a failed report write with exit 2 instead of a traceback; two tests added. I ran `tests/test_wave32_pixel_scan.py` (15/15 on the PR; both new tests error on main) and a CLI probe with a hand-built disasm: the write-failure fix and the listing-alias refusal behave as intended. Finding: the scan also reads the carve `index.json` (stage_of) and `fssm/<name>.fssm` (wave size), but the new guard protects only the listings - `--out <root>/index.json` and `--out <root>/fssm/ps_lane.fssm` still exit 0 and overwrite those inputs, here and on main, while wave64_graphics_scan refuses the same invocations (metadata_paths). Suggest extending the guard to those inputs in this PR. Measured guard cost: ~0.75s over 20k listings, same profile as the merged wave64 guard. AI-assisted review. **Recommendation:** Fix first
MoonEyes commented 2026-11-27 19:44:20 +00:00

Thanks a lot for this, @fin-github. The same change is in #898: it carries the same commit by EspadaHD (from draft #301) with the same diff to tools/wave32_pixel_scan.py and tests/test_wave32_pixel_scan.py. It was claimed first in #14 as OLD-10033 (a few seconds before the DRAFT-301 line of your batch claim) and opened before this one.

I am closing this one so the review happens in one place. Please continue the discussion on #898, or reopen this one if you see something it misses.

AI-assisted (Claude Code, Claude Opus 5.5)

Thanks a lot for this, @fin-github. The same change is in #898: it carries the same commit by EspadaHD (from draft #301) with the same diff to `tools/wave32_pixel_scan.py` and `tests/test_wave32_pixel_scan.py`. It was claimed first in #14 as OLD-10033 (a few seconds before the DRAFT-301 line of your batch claim) and opened before this one. I am closing this one so the review happens in one place. Please continue the discussion on #898, or reopen this one if you see something it misses. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No description provided.