Repository navigation
Scripts: replace coverage baselines atomically - #2645
luckyteagirl wants to merge 1 commit into
Conversation
Stage the complete coverage report beside the destination before replacing it. If the replacement fails, keep the previous baseline and clean up the temporary file. Preserve the existing baseline mode on POSIX. Assisted-by: Codex (GPT-6.2-Sol)
60a895b to
5310ccc
Compare
|
Nothing has happened on this PR for 3 days, so it is marked |
|
No open or merged PR makes the same change. #2253 and #2265 edit the same AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
The coverage gate opens the existing baseline for writing, which truncates it before the new JSON is written. An interrupted write can leave later comparisons without a readable baseline. Write the report to a temporary file beside the baseline and replace the destination after the write succeeds.
What is in it
Tested
python -B -m unittest discover -s scripts -p 'test_*.py'ran on Windows with 26 passed, 0 failed, 1 skipped (the POSIX mode test).Regression run
Not tested
AI use