Repository navigation
tools/anim_clips: write --out JSON report atomically (ANIM-CLIPS-ATOMIC-JSON) - #2297
Conversation
|
Locally verified
Same-directory staging file, UTF-8/LF writes, Synthetic fixtures only; no game data. GPUs tested: N/A (CPU-only). AI-assisted verification. |
tiguan26
left a comment
There was a problem hiding this comment.
Approving fcac19c.
The --out report is written through a temp file in the same folder, fsync and replace_retry with published_mode, and the temp file is removed on failure; the OSError handler around it still turns a failed write into a clean exit. The file now ends with a newline, which is harmless.
Merged onto main d1dff7949 together with #2403, #2410, #2299, #2330 and #2286 (no conflicts), on Linux with Python 3.13. tests/test_anim_clips.py: 54 passed (main: 53). AI-assisted (Claude Code, Claude Opus 5.5).
MSedgeMC
left a comment
There was a problem hiding this comment.
Verified on the PR branch: python3 -m unittest tests.test_anim_clips -v -> 54 tests OK, including the new atomic --out JSON cases. Not approving yet: the branch is 450 commits behind current main, so a rebase is needed before the final diff can be reviewed.
|
#2297 | head The baseline raised AttributeError for the new writer. After merging, the test checked the output and exercised the simulated replace failure. Pinned main |
|
Merged, thank you @Ch1mpleo! What it does: tools/anim_clips: write --out JSON report atomically (ANIM-CLIPS-ATOMIC-JSON) How it was checked: sodove tested this PR at head CI: the red jobs on this PR fail the same way on main, or on the older main it was built on (the Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers. |
Claimed in the coordination issue as: ANIM-CLIPS-ATOMIC-JSON (#1608 (comment))
What and why
Writes --out\ JSON atomically in \ ools/anim_clips.py\ via _write_json_atomic\ (\os.path.realpath\ + \ empfile.mkstemp\ + \sync\ + \published_mode\ +
eplace_retry\ with cleanup on failure), preserving symlinks and permissions. Adds a regression test in \ ests/test_anim_clips.py.
Tested
GPUs tested: n/a (CPU-only Python tool & unit tests)
AI-assisted: yes
Checklist
eeds rebase).