glb_inspect: exclude invalid POSITION bounds from model extents #1748

Merged
leonida/mandy
kirigayakazima merged 1 commit from codex/glb-inspect-position-bounds into main 2026-11-28 19:28:37 +00:00

Pull request successfully merged and closed

kirigayakazima commented 2026-11-25 11:04:12 +00:00

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.py on 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.py and git diff --check passed.
  • The shared base at bcaa13da passed 6,287 semantic tests across 488 files.

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.
Claimed in the coordination issue as: [GLB-INSPECT-POSITION-BOUND-VALIDITY](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160388047) ### 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.py` on 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.py` and `git diff --check` passed. - The shared base at `bcaa13da` passed 6,287 semantic tests across 488 files. 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.
lixonik reviewed 2026-11-25 11:19:54 +00:00
lixonik left a comment
No description provided.
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.
whoalin1 commented 2026-11-25 11:25:26 +00:00

Independent verification (Windows, Python 3.11.9): _bbox now 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.py 38 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.

Independent verification (Windows, Python 3.11.9): `_bbox` now 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.py` 38 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.
MoonEyes commented 2026-11-28 19:28:34 +00:00

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 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

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 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No description provided.