OLD-10033: wave32_pixel_scan: use shared same_report_path and catch --out write OSError #898

Merged
klikso merged 1 commit from upstream-pr/898 into main 2026-11-28 11:51:55 +00:00
klikso commented 2026-11-24 15:02:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T15:02:56Z.


Claimed in the coordination issue as: OLD-10033

What and why

Carries forward old-pr/10033 (draft #301) rebased onto current main:

  • Replaces os.path.samefile with shared report_paths.same_report_path in tools/wave32_pixel_scan.py to prevent output from colliding with or overwriting scanned listings, honoring volume case rules and canonicalization.
  • Catches OSError during output JSON writing and exits with code 2 and a clean error message rather than an unhandled traceback.
  • Adds regression unit tests in tests/test_wave32_pixel_scan.py covering path aliasing, folded names, and output write failures.

Original commit preserved: EspadaHD <[email protected]>.

Tested

  • python -I tests/test_wave32_pixel_scan.py: 15/15 passed
  • python -I scripts/check_no_game_data.py tools/wave32_pixel_scan.py tests/test_wave32_pixel_scan.py: passed (no game data)
  • python -I tests/test_text_write_line_endings.py: passed
  • python -I tests/test_report_paths.py: 22/22 passed
  • python -m compileall -q make_game.py tools tests: clean

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5474700145 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/898). Originally posted by [klikso](https://github.com/klikso) on 2026-11-24T15:02:56Z. --- Claimed in the coordination issue as: OLD-10033 ### What and why Carries forward `old-pr/10033` (draft #301) rebased onto current `main`: - Replaces `os.path.samefile` with shared `report_paths.same_report_path` in `tools/wave32_pixel_scan.py` to prevent output from colliding with or overwriting scanned listings, honoring volume case rules and canonicalization. - Catches `OSError` during output JSON writing and exits with code 2 and a clean error message rather than an unhandled traceback. - Adds regression unit tests in `tests/test_wave32_pixel_scan.py` covering path aliasing, folded names, and output write failures. Original commit preserved: `EspadaHD <[email protected]>`. ### Tested - `python -I tests/test_wave32_pixel_scan.py`: 15/15 passed - `python -I scripts/check_no_game_data.py tools/wave32_pixel_scan.py tests/test_wave32_pixel_scan.py`: passed (no game data) - `python -I tests/test_text_write_line_endings.py`: passed - `python -I tests/test_report_paths.py`: 22/22 passed - `python -m compileall -q make_game.py tools tests`: clean GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
LewisStephens99 commented 2026-11-24 15:09:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by LewisStephens99 on 2026-11-24T15:09:37Z.


Independent verification on Windows 11, Python 3.14:n- python -I tests/test_wave32_pixel_scan.py: 15/15 passed.n- No game data or GPU used. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7135556269 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/898#issuecomment-7135556269). Originally posted by [LewisStephens99](https://github.com/LewisStephens99) on 2026-11-24T15:09:37Z. --- Independent verification on Windows 11, Python 3.14:`n- `python -I tests/test_wave32_pixel_scan.py`: 15/15 passed.`n- No game data or GPU used. AI-assisted.
sodove commented 2026-11-28 10:45:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:45:59Z.


#898 | head 881377b4923a590623a1e1a16731ca171e6d1986 | python3 -I tests/test_wave32_pixel_scan.py -v | red: 15 run, 2 errors | green: 15 passed | Red → green

The baseline errored on output-path alias checking and the simulated output-write failure. The merged CLI handled both.

Base 3bd936ecd98995bca3e1da83d5e28d2343001aef was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238107816 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/898#issuecomment-7238107816). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:45:59Z. --- #898 | head `881377b4923a590623a1e1a16731ca171e6d1986` | `python3 -I tests/test_wave32_pixel_scan.py -v` | red: 15 run, 2 errors | green: 15 passed | **Red → green** The baseline errored on output-path alias checking and the simulated output-write failure. The merged CLI handled both. Base `3bd936ecd98995bca3e1da83d5e28d2343001aef` was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7237873883).
DadaCap commented 2026-11-28 11:51:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:51:57Z.


Merged, thank you @klikso! This translator PR (OLD-10033: wave32_pixel_scan: use shared same_report_path and catch --out write OSError) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238833449 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/898#issuecomment-7238833449). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T11:51:57Z. --- Merged, thank you @klikso! This translator PR (OLD-10033: wave32_pixel_scan: use shared same_report_path and catch --out write OSError) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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!898
No description provided.