meshlet_page: validate RPF9 headers before scanning #2214

Open
github-bot wants to merge 1 commit from github-bot/gh-2214 into main AGit
Owner

@⁠whoalin1 on GitHub · 2026-11-26 06:25 UTC · original
whoalin1:meshlet-rpf9-header-validation → main · +39 −3 · 2 files · 1 commits · open

Summary

  • reject inputs shorter than the fixed RPF9 header instead of silently reporting zero pages
  • reject a non-RPF9/9FPR magic before scanning for zlib streams
  • reject a data-start offset outside the archive, while still allowing a valid header-only archive to yield zero pages
  • add synthetic CLI regressions that no report is written for invalid inputs

Item: MESHLET-PAGE-RPF9-HEADER

This carries forward the still-uncarried fix in old-pr/9986, originally written by lucastayaralvarenga-ui, reapplied and verified on current main.

Tests

Under the local machine coordination lock:

  • control: the new invalid-header regressions fail on the unpatched tool (invalid inputs exit 0)
  • fixed: python -I tests/test_meshlet_page.py — 73 tests, OK
  • python -m compileall -q tools/meshlet_page.py tests/test_meshlet_page.py — pass
  • git diff --cached --check — pass

No game files or GPU.

AI-assisted with Devin.

**@⁠whoalin1** on GitHub · 2026-11-26 06:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2214) `whoalin1:meshlet-rpf9-header-validation` → `main` · +39 −3 · 2 files · 1 commits · open ## Summary - reject inputs shorter than the fixed RPF9 header instead of silently reporting zero pages - reject a non-`RPF9`/`9FPR` magic before scanning for zlib streams - reject a data-start offset outside the archive, while still allowing a valid header-only archive to yield zero pages - add synthetic CLI regressions that no report is written for invalid inputs Item: MESHLET-PAGE-RPF9-HEADER This carries forward the still-uncarried fix in old-pr/9986, originally written by lucastayaralvarenga-ui, reapplied and verified on current main. ## Tests Under the local machine coordination lock: - control: the new invalid-header regressions fail on the unpatched tool (invalid inputs exit 0) - fixed: `python -I tests/test_meshlet_page.py` — 73 tests, OK - `python -m compileall -q tools/meshlet_page.py tests/test_meshlet_page.py` — pass - `git diff --cached --check` — pass No game files or GPU. AI-assisted with Devin.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:22:32 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:06 UTC · original

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_meshlet_page.py: 73 tests OK. The PR's test file against main's tools/meshlet_page.py: 5 failures, so the new tests fail on main and pass with the fix. compileall clean.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2214#issuecomment-7188917098) Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_meshlet_page.py: 73 tests OK. The PR's test file against main's tools/meshlet_page.py: 5 failures, so the new tests fail on main and pass with the fix. compileall clean. AI-assisted: yes (Claude Code)
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:50 UTC · original

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_meshlet_page.py: 73 passed, 17 subtests passed (main: 71 passed, 12 subtests).

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2214#issuecomment-7189899129) Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_meshlet_page.py`: 73 passed, 17 subtests passed (main: 71 passed, 12 subtests). (AI-assisted test run; output checked by hand.)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2214/head:github-bot/gh-2214'
git switch 'github-bot/gh-2214'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2214'
git switch 'github-bot/gh-2214'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2214'
git switch 'github-bot/gh-2214'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2214'
git switch 'main'
git merge --squash 'github-bot/gh-2214'
git switch 'main'
git merge --ff-only 'github-bot/gh-2214'
git switch 'main'
git merge 'github-bot/gh-2214'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.