xcl_compare: open transcript before Popen, format float timeouts, validate paths upfront, write JSON atomically (XCL-COMPARE-GUARDS-AND-ATOMIC-IO) #1591
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!1591
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/xcl-compare-guards-and-atomic-io"
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
Item:
XCL-COMPARE-GUARDS-AND-ATOMIC-IO(unclaimed — coordination issue #14 is at GitHub's 2,500-comment cap with no successor open issue yet, and 0 open PRs touchtools/xcl_compare.py).Summary
transcriptbefore spawningsubprocess.Popeninrun_title()and clean up any still-running child process on unexpected exceptions, preventing leaked child processes when opening the transcript fails.OSError(includingProcessLookupError) inkill_tree()when a hung process exits just before termination, and fall back toproc.kill()iftaskkillfails on Windows.%g sinstead of%d sin_follow()so sub-second--timeoutvalues (e.g.0.5) report"no output for 0.5 s"rather than truncating to"no output for 0 s".--xcl/--gta6rt/--work/--cdb/--outand directory/trailing-separator--outupfront before running either runtime, writereport.jsonatomically viafile_mode.published_mode+replace_retry.replacewithallow_nan=False, accept optionalargv=Noneinmain(), and guardsys.stdout.reconfigure.Verification
python3 -W error -I tests/test_xcl_compare.py -v: 20/20 passed.python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/xcl_compare.py tests/test_xcl_compare.py: passed.python3 -m compileall -q tools/xcl_compare.py tests/test_xcl_compare.py: passed.tests/test_xcl_compare.pyagainst unpatchedmain:tools/xcl_compare.py):failures=8, errors=1across all 5 new regression tests.AI-assisted: yes
GPUs tested: none (CPU-only Python test harness; synthetic Python stand-ins only, no game data)
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 18 PRs (their tests, the tests importing the changed modules, the docs tests) on main 3ca0707: no new failure, Linux / Python 3.13.
AI-assisted (Claude Code, Claude Opus 5.5)