rpf_probe: write non-regular --out directly, guard empty/trailing-sep paths, enforce strict JSON (RPF-PROBE-NONREG-AND-OUT-GUARDS) #1593
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1593"
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?
Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-25T05:28:15Z.
Item:
RPF-PROBE-NONREG-AND-OUT-GUARDS(unclaimed — coordination issue #14 is at GitHub's 2,500-comment cap with no successor open issue yet, and 0 open PRs touchtools/rpf_probe.py).Summary
_write_json_report()'s non-regular destination branch:os.stat("/dev/null")succeeds with a character-device mode rather than raisingOSError, so checkingnot stat.S_ISREG(mode)actually takes the direct-write path for/dev/nulland pipes instead of attempting to stage a temp file in/devand replace/dev/null.game_diror--outand trailing-separator--outdirectory paths before scanning archives (previously--out " "created a whitespace-named file incwdand--out new_folder/wrote a regular file namednew_folder).allow_nan=Falseand a trailing\non written JSON reports, avoid computingentropy(body)twice per archive inprobe(), and accept optionalargv=Noneinmain().Verification
python3 -W error -I tests/test_rpf_probe.py -v: 33/33 passed.python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/rpf_probe.py tests/test_rpf_probe.py: passed.python3 -m compileall -q tools/rpf_probe.py tests/test_rpf_probe.py: passed.tests/test_rpf_probe.pyagainst unpatchedmain:tools/rpf_probe.py):failures=6, errors=0across all 3 new regression tests.AI-assisted: yes
GPUs tested: none (CPU-only Python archive header survey tool; synthetic headers only, no game data)
Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T05:28:30Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T10:30:32Z.
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)