mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1599] bvh_groups: validate scan bounds and --json upfront, use same_report_path, catch write OSError (BVH-GROUPS-GUARDS-AND-IO) #1618
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1618
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1599
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/bvh-groups-guards-and-io📝 Commits (1)
042a2d2bvh_groups: validate scan bounds and --json upfront, use same_report_path, catch write OSError📊 Changes
2 files changed (+91 additions, -7 deletions)
View changed files
📝
tests/test_bvh_groups.py(+55 -0)📝
tools/bvh_groups.py(+36 -7)📄 Description
Item:
BVH-GROUPS-GUARDS-AND-IO(unclaimed — coordination issue #14 is at GitHub's 2,500-comment cap with no successor open issue yet, and 0 open PRs touchtools/bvh_groups.py).Summary
start,limit, andmax_inflateinscan()before the empty-archive fast path so out-of-rangestarton empty files,limit <= 0,max_inflate <= 0, andboolvalues raiseValueError(previouslylimit=0scanned the whole archive andmax_inflate=0/Truecrashed withstruct.errorinbvh_index.classify).archiveand--jsonbefore scanning (reject empty/whitespace strings, directories, trailing separators, and missing parent directories) and use the sharedreport_paths.same_report_path()guard instead of rawos.path.samefile().OSErrorfromwrite_json_report()inmain()and publish--jsonbefore printing stdout (exiting with code 2 and one stderr line instead of a traceback), and enforceallow_nan=Falseinwrite_json_report().Verification
python3 -W error -I tests/test_bvh_groups.py -v: 16/16 passed.python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/bvh_groups.py tests/test_bvh_groups.py: passed.python3 -m compileall -q tools/bvh_groups.py tests/test_bvh_groups.py: passed.tests/test_bvh_groups.pyagainst unpatchedmain:tools/bvh_groups.py):failures=11, errors=3across all new regression tests.AI-assisted: yes
GPUs tested: none (CPU-only Python BVH descriptor tool; synthetic streams only, no game data)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.