mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #1744] glb_inspect: skip binary payloads when inspecting a model file #1756
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#1756
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/1744
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/glb-inspect-stream-chunks📝 Commits (1)
e335f0bglb_inspect: skip binary chunk payloads during file inspection📊 Changes
2 files changed (+41 additions, -10 deletions)
View changed files
📝
tests/test_glb_inspect.py(+18 -0)📝
tools/glb_inspect.py(+23 -10)📄 Description
Claimed in the coordination issue as: GLB-INSPECT-STREAM-CHUNKS
What and why
The inspector needs the JSON and the chunk table, but opening an exported model previously read the entire file into a Python bytes object. The file entry point now checks chunk headers against the actual file length and seeks over payloads. The byte-array parser and non-seekable input still work.
Tested
A guarded stream compares the report with the byte-array entry point and fails on any read of either the BIN or extension payload. A separate synthetic file with a 128 MiB BIN chunk took 134,613 peak Python-traced bytes during inspection on the local integration branch.
python -I tests/test_glb_inspect.pyon Windows with Python 3.14.7 ran 37 tests on this branch, including one platform skip. The new regression coverage also fails against the original inspector.python -I scripts/check_no_game_data.py tools/glb_inspect.py tests/test_glb_inspect.pyandgit diff --checkpassed.bcaa13dapassed 6,287 semantic tests across 488 files. The change is confined to the model inspector and its tests.GPUs tested: N/A (CPU-only metadata inspection).
AI-assisted: Yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.