Skip to content

pe_inspect: stage JSON and markdown reports so a write failure keeps the previous file - #9047

Open
Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/pe-inspect-preserve-json
Open

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/pe-inspect-preserve-json

Conversation

@Grimkeh

@Grimkeh Grimkeh commented Nov 23, 2026

Copy link
Copy Markdown

Summary

Claim: #8504 (comment)

Synthetic; no game files. AI-assisted (Cursor / Composer).

Test plan

  • python3 -I -m unittest discover -s tests -p test_pe_inspect.py — OK

Made with Cursor

…the previous file

Publish each report through a temp file + replace so a mid-write OSError leaves any prior complete JSON or markdown intact.

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_pe_inspect.py → 62 tests OK (1 skipped). No game files. AI-assisted (Devin).

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused suite passes 62/62 at this head; both new write-failure cases fail against the pre-change tool. JSON and Markdown reports are published separately, so a failed replace leaves the previous file untouched.

AI-assisted (OpenCode).

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