Repository navigation
Conversation
…port Publish through a temp file + replace so a mid-write OSError leaves any prior complete JSON intact. Co-authored-by: Cursor <cursoragent@cursor.com>
shyro29
left a comment
There was a problem hiding this comment.
Tested 0e4656a0d on Linux x86_64, CPython 3.14 (no game files): pass.
python -I tests/test_page_index.pyat the head: OK; the same test file against main's tool: FAILED (errors=1) — red/green confirmed.- Same observation as on #8798's staging review: stage-beside-destination +
published_mode+replace_retry, destination touched only byos.replace, non-regular destinations written directly as before, permission probe retained.page_index's direct-writer parity is kept (it never created the parent, and this doesn't add one). python -I scripts/check_no_game_data.pyon the two changed files: clean. AI-assisted (Claude Code).
sds-228
left a comment
There was a problem hiding this comment.
Focused suite passes 22/22 at this head; the new write-failure case fails against the pre-change source. The staged publish leaves the previous JSON report untouched when the final replace fails.
AI-assisted (OpenCode).
|
Tested 0e4656a 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
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested
AI-assisted (Claude Code). |
Summary
tools/page_index.pyJSON--outthrough a temp file +replace_retryso a mid-write failure leaves any previous complete report (same preserve pattern as character_census: stage --json so a write failure keeps the previous report #8757 / wave64_graphics_scan: stage --out so a write failure keeps the previous report #8753 / pe_shader_containers: stage --json so a write failure keeps the previous report #8742).--outunchanged.Claim: #8504 (comment)
Synthetic; no game files. AI-assisted (Cursor / Composer).
Test plan
python3 -I -m unittest discover -s tests -p test_page_index.py— 22 OKMade with Cursor