tools/f16_widen_probe: write --json report atomically (F16-WIDEN-PROBE-ATOMIC-JSON) #2004
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2004
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/f16-widen-probe-atomic-json"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: F16-WIDEN-PROBE-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7170181036)
What and why
Updates \ ools/f16_widen_probe.py::write_json_report\ to write via a sibling \ empfile.NamedTemporaryFile(..., encoding="utf-8", newline="\n")\ and \os.replace\ (with temp-file cleanup on failure), so an existing report is never truncated on error. Updates the OSError test and adds an atomic-replace regression test in \ ests/test_f16_widen_probe.py.
Tested
GPUs tested: n/a (CPU-only Python tool & unit tests)
AI-assisted: yes
Checklist
eeds rebase).
Verified on the PR branch: python3 -m unittest discover -s tests -p 'test_f16_widen*.py' -> 12 tests OK, including the new atomic-write / replace-failure preservation test. write_json_report now stages via NamedTemporaryFile in the target directory and os.replace, with cleanup on failure; a failed replace leaves the existing report intact. This fixes the real disk-full truncation issue. Advisory: this branch carries ~29 commits not on current main (older merges), so a rebase before merge will keep history clean — but the branch is green as-is.
#2004 | head
c97e981f3661a5d1a64b29277ca53e75795924c8|python3 -I tests/test_f16_widen_probe.py -v| red: 12 run, 1 failure, 1 error | green: 15 passed | Red → greenThe atomic-write and output-error cases failed on main. The merged test file also picked up additional tests from main.
Pinned main
33db04a7010e81c40a7a6a15624525aa0c4a3a58, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. Batch claim.Merged, thank you @Ch1mpleo!
What it does: tools/f16_widen_probe: write --json report atomically (F16-WIDEN-PROBE-ATOMIC-JSON)
How it was checked: sodove tested this PR at head
c97e981f3on main33db04a70: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (1 failure, 1 error); with the PR, green (15 OK).CI: the red jobs on this PR fail the same way on main, or on the older main it was built on (the
cs_dpp_cmp.asmtranslator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change.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.