glb_inspect: exclude invalid POSITION bounds from model extents #1748
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1748"
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?
Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-25T11:04:12Z.
Claimed in the coordination issue as: GLB-INSPECT-POSITION-BOUND-VALIDITY
What and why
An inverted or oversized POSITION bound could be reported as complete. An overflowing JSON exponent could prevent writing the entire JSON report. Both bounds now need exactly three finite numbers with ordered ranges. Good primitives still contribute to the aggregate and missing or invalid bounds mark it partial.
Tested
Two synthetic tests mix a good primitive with inverted, extra-component or boolean bounds, and pass an overflowing exponent through the GLB JSON parser and strict JSON report serialization.
python -I tests/test_glb_inspect.pyon Windows with Python 3.14.7 ran 38 tests on this branch with one platform skip. The new tests also failed 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.GPUs tested: N/A (CPU-only metadata inspection).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:19:54Z.
Review: COMMENTED
Independent check at "
855f2ef8". Windows: 37 tests reported, 1 platform skip. The mixed valid/invalid bounds and strict JSON serialization regressions passed. This also passed in the combined inspector tree with the other four PRs applied.AI-assisted review and CPU-only testing with synthetic inputs.
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T11:25:26Z.
Independent verification (Windows, Python 3.11.9):
_bboxnow requires exactly 3 components, non-bool ints or finite floats (isfinite kills 1e999->inf), ordered min<=max; invalid bounds excluded + aggregate marked partial.test_glb_inspect.py38 OK (6 env skips); both new tests pass; compileall + line-endings + check_no_game_data + diff-check clean. Non-blocking nit: returns accessor min/max lists by reference rather than copies — no downstream mutation observed. AI-assisted verification.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:28:34Z.
Red/green: tests/test_glb_inspect.py fails 4 assertions on main (invalid POSITION bounds still counted in the extents) and passes with the PR merged, on GitHub Actions Linux and natively on Windows.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)