[PR #1744] glb_inspect: skip binary payloads when inspecting a model file #1756

Open
opened 2026-11-26 21:18:51 +01:00 by 4ld0 · 0 comments
Owner

📋 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)

  • e335f0b glb_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.py on 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.py and git diff --check passed.
  • The shared base at bcaa13da passed 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

  • Based on current upstream main.
  • One topic.
  • All test inputs are synthetic. No game data, keys or decryption.
  • Translator contract table: N/A.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1744 **Author:** [@kirigayakazima](https://github.com/kirigayakazima) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/glb-inspect-stream-chunks` --- ### 📝 Commits (1) - [`e335f0b`](https://github.com/ubiquitarianism/leonida/commit/e335f0baada63df57908924b724f4911dc9d22fb) glb_inspect: skip binary chunk payloads during file inspection ### 📊 Changes **2 files changed** (+41 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_glb_inspect.py` (+18 -0) 📝 `tools/glb_inspect.py` (+23 -10) </details> ### 📄 Description Claimed in the coordination issue as: [GLB-INSPECT-STREAM-CHUNKS](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160388047) ### 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.py` on 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.py` and `git diff --check` passed. - The shared base at `bcaa13da` passed 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 - [x] Based on current upstream main. - [x] One topic. - [x] All test inputs are synthetic. No game data, keys or decryption. - Translator contract table: N/A. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1756
No description provided.