Skip to content

awc_names: stage --out so a write failure keeps the previous report - #8967

Open
Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/awc-names-preserve-out
Open

Grimkeh wants to merge 1 commit into
ItsNotRexed:mainfrom
Grimkeh:fix/awc-names-preserve-out

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_awc_names.py — 36 OK (1 skipped)

Made with Cursor

Publish CSV and JSON name reports through a temp file + replace so a mid-write OSError leaves any prior complete report intact.

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

Copy link
Copy Markdown

Tested 7d2e7e4b3 on Linux (CPU only, Python 3.14). tests/test_awc_names.py passes (1 skipped).

The staging code is the same as in #8954, so the same trade-off applies: an existing writable report inside a read-only directory could be updated before, and now the write fails because the sibling temp file cannot be created. I measured that on #8954 and did not repeat it here. The previous report stays intact.


Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account.

@garuspl

garuspl commented Nov 23, 2026

Copy link
Copy Markdown

Tested 7d2e7e4 on Windows 11 (CPU only, no GPU needed): pass

Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto main 867d922, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).

  • tests/test_awc_names.py: main 34 passed, 22 subtests passed; with the PR 36 passed, 22 subtests passed.

AI-assisted (Claude Code, Claude Opus 5.5).

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