mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #254] Validate RPF9 archive headers before scanning meshlet pages #305
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#305
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/254
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9986📝 Commits (1)
e990c82Validate RPF9 archive headers before scanning meshlet pages📊 Changes
2 files changed (+39 additions, -3 deletions)
View changed files
📝
tests/test_meshlet_page.py(+32 -0)📝
tools/meshlet_page.py(+7 -3)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Restores
#3822after the repository-transfer closure. The original PR cannot be reopened by its author (viewerCanReopen: false). This resubmission uses the same branch and unchanged heade990c82092612cb10d28284a52bfb7ecbb127c3e. Original independent review/test evidence: https://github.com/ProjectLeonida/Leonida/pull/3822#pullrequestreview-6025207478.Changes
An explicit
.rpfneeds a complete eight-byte header, RPF9 magic, and a data start from the header end through EOF. Invalid input exits 2 with its path before writing a report. An empty file now exits 2 instead of being silently skipped. In a run with several inputs, one invalid archive stops the run before report publication. A valid header-only archive still reports zero pages.Coordination claim.
Rebased onto main after
#3170merged. The existing report-alias protection is retained.Checks
At
e990c8209,python -I tests/test_meshlet_page.py: 68 passed on Windows with Python 3.12. The synthetic cases cover malformed headers, a valid header-only archive, directory and archive scans, and report aliases. The five malformed-header cases returned success before this change.git diff --checkpassed.CPU-only tests, no game data. AI-assisted (Codex).
Fresh integration verification against ProjectLeonida/Leonida main "
d083a2cc3": clean merge, tests/test_meshlet_page.py: 68 tests passed. Whitespace and changed-file game-data checks passed. Windows, Python 3.12.16, CPU only, synthetic inputs; no GPU run. AI-assisted (Codex).Resubmission claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116960294
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.