Skip to content

wave32_pixel_scan: stage --out so a write failure keeps the previous report - #9123

Open
Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/wave32-pixel-scan-preserve-json
Open

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/wave32-pixel-scan-preserve-json

Conversation

@Grimkeh

@Grimkeh Grimkeh commented Nov 23, 2026

Copy link
Copy Markdown

Summary

Coordination: claimed on #8504. Synthetic; no game files. AI-assisted (Cursor / Composer).

Test plan

  • python3 -I -m pytest tests/test_wave32_pixel_scan.py -q (10 passed)

Made with Cursor

…report

Co-authored-by: Cursor <cursoragent@cursor.com>
@catminou4

Copy link
Copy Markdown

Tested on Apple M1 Max, macOS 27.2.1 arm64, Python 3.12.16: python -I tests/test_wave32_pixel_scan.py → 10 tests OK. No game files. AI-assisted (Devin).

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested 80d9e93a on Linux, CPython 3.14, CPU only, merged onto main 867d922f: its own tests pass, but the failure the title is about still tracebacks

  • python -I tests/test_wave32_pixel_scan.py: Ran 10 tests, OK. With only tools/wave32_pixel_scan.py reverted: FAILED (errors=1), because the test patches a staging helper that does not exist on main.
  • Real CLI, a report path in a folder the user cannot write, with a previous report present:
    • run 1 and run 2 (writable): exit 0, report written.
    • chmod 500 the folder, run 3: exit 1 with a PermissionError traceback ending Permission denied: '…/.wave32_pixel_scan-….tmp'. The previous report survives, but this is the shape the PR set out to remove.

Cause, by an agent's reading I confirmed by the traceback: the staged NamedTemporaryFile is created before the try/finally, and main() has no OSError handler (tools/wave32_pixel_scan.py around line 285). Sibling PRs in the same series (#9131, #9098) print one ERROR: line and exit 2 for the same situation; I verified those two.

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants