glb_inspect: show the default scene and named root nodes #1746

Merged
leonida/mandy
kirigayakazima merged 3 commits from codex/glb-inspect-scene-roots into main 2026-11-29 03:37:38 +00:00

Pull request successfully merged and closed

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

Claimed in the coordination issue as: GLB-INSPECT-SCENE-ROOTS

What and why

The scene count alone does not show which scene a viewer opens or which roots it contains. Both report formats now give the declared default and each scene's ordered root indices and names. Broken references are reported alongside their scene. An omitted default stays unspecified. glTF scene schema

Tested

Two synthetic tests cover an omitted and nonzero default scene, declared root order, node names, absent and empty root arrays, duplicate roots and references to missing or non-object entries.

  • 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-SCENE-ROOTS](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160388047) ### What and why The scene count alone does not show which scene a viewer opens or which roots it contains. Both report formats now give the declared default and each scene's ordered root indices and names. Broken references are reported alongside their scene. An omitted default stays unspecified. [glTF scene schema](https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/scene.schema.json) ### Tested Two synthetic tests cover an omitted and nonzero default scene, declared root order, node names, absent and empty root arrays, duplicate roots and references to missing or non-object entries. - `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:50 +00:00
lixonik left a comment
No description provided.
Independent check at "08bbbaef". Windows: 37 tests reported, 1 platform skip. The new default-scene and repeated-reference coverage passes. A separate GLB exposed a hierarchy case that is still reported as a valid root. Details inline. AI-assisted review and CPU-only testing with synthetic inputs.
kirigayakazima reviewed 2026-11-27 12:11:40 +00:00
lixonik reviewed 2026-11-27 15:50:23 +00:00
lixonik left a comment
No description provided.
Re-verified at `31868654b` (merged cleanly onto `main` `ec91d695c`). - Confirmed the prior finding is resolved: `_scene_report()` collects valid node indices from `nodes[*].children`, flags child nodes referenced as scene roots, and ignores boolean values in `children` via `_entry()`. - Windows 11, Python 3.12: `python -I -B tests/test_glb_inspect.py -v` passed (38 tests, 1 expected Windows POSIX-permission skip); `scripts/check_no_game_data.py` and `git diff --check` clean. - No remaining findings. AI-assisted.
zmasi commented 2026-11-28 11:38:14 +00:00

#1746 | head 31868654bc16d8d91da491c4fc3b7038fa95e1d5 (merged cleanly with main 4a54aedcb) | python -I tests/test_glb_inspect.py | red on main: FAILED (errors=3, skipped=6) (KeyError on scene_issue, default_scene, and scenes) | green on PR+main: 39 tests OK (skipped=6) | Windows 11, Python 3.12.10 | AI-assisted: yes

Audited _scene_report, build_report, and format_report in tools/glb_inspect.py (preserving root node order, reporting default_scene and scene_issue, counting non-object scenes entries in invalid_counts, and flagging empty nodes arrays, invalid/duplicate root references, and child nodes listed as scene roots). Also verified clean merge (0 conflicts) and combined execution with #1747 (40 tests OK (skipped=6)), plus tests/test_ci_registration.py (18 OK), tests/test_text_write_line_endings.py (3 OK), and scripts/check_no_game_data.py.

#1746 | head 31868654bc16d8d91da491c4fc3b7038fa95e1d5 (merged cleanly with main 4a54aedcb) | `python -I tests/test_glb_inspect.py` | red on main: `FAILED (errors=3, skipped=6)` (`KeyError` on `scene_issue`, `default_scene`, and `scenes`) | green on PR+main: `39 tests OK (skipped=6)` | Windows 11, Python 3.12.10 | AI-assisted: yes Audited `_scene_report`, `build_report`, and `format_report` in `tools/glb_inspect.py` (preserving root node order, reporting `default_scene` and `scene_issue`, counting non-object `scenes` entries in `invalid_counts`, and flagging empty `nodes` arrays, invalid/duplicate root references, and child nodes listed as scene roots). Also verified clean merge (`0` conflicts) and combined execution with #1747 (`40 tests OK (skipped=6)`), plus `tests/test_ci_registration.py` (`18 OK`), `tests/test_text_write_line_endings.py` (`3 OK`), and `scripts/check_no_game_data.py`.
OreoFR commented 2026-11-29 03:13:58 +00:00

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main c8bf0e7b6, PR head f0f0c11b2 : red 3 errors / green 48 OK

python3.12 -I tests/test_glb_inspect.py (48 tests):

  • Merge: clean (git merge-tree).
  • Red (main + only this PR's test file): 3 errors, KeyError: 'scenes': test_scene_inventory_preserves_root_order_and_default, test_scene_inventory_identifies_invalid_references, test_scene_root_rejects_child_node.
  • Green (main + git merge --no-ff): 48 tests OK, 1 skipped (Windows write protection).
  • (MEASURED n=3) the 3 red errors reproduce 3/3.
  • Neighbours, same on main and merge: test_batch_glb 20/20 OK, test_report_paths 26 OK (1 skipped, Windows-only).
  • Diff: adds a scene inventory (default scene, ordered roots, invalid references, repeated roots, child nodes used as roots), with invalid scenes counted in invalid_counts; the text report gains a scenes: section without breaking neighbours. Nit: 2 blank lines inside the class before test_scene_root_rejects_child_node. No game data.

Verdict: READY

AI-assisted: Claude Code

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main c8bf0e7b6, PR head f0f0c11b2 : red 3 errors / green 48 OK `python3.12 -I tests/test_glb_inspect.py` (48 tests): - Merge: clean (`git merge-tree`). - **Red** (main + only this PR's test file): 3 errors, `KeyError: 'scenes'`: `test_scene_inventory_preserves_root_order_and_default`, `test_scene_inventory_identifies_invalid_references`, `test_scene_root_rejects_child_node`. - **Green** (main + `git merge --no-ff`): 48 tests OK, 1 skipped (Windows write protection). - (MEASURED n=3) the 3 red errors reproduce 3/3. - Neighbours, same on main and merge: `test_batch_glb` 20/20 OK, `test_report_paths` 26 OK (1 skipped, Windows-only). - Diff: adds a scene inventory (default scene, ordered roots, invalid references, repeated roots, child nodes used as roots), with invalid scenes counted in `invalid_counts`; the text report gains a `scenes:` section without breaking neighbours. Nit: 2 blank lines inside the class before `test_scene_root_rejects_child_node`. No game data. **Verdict: READY** AI-assisted: Claude Code
DadaCap commented 2026-11-29 03:37:35 +00:00

Merging, thank you @kirigayakazima! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/1746#issuecomment-7249922021), and it still merges cleanly.

AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.

Merging, thank you @kirigayakazima! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/1746#issuecomment-7249922021), and it still merges cleanly. AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.
Sign in to join this conversation.
No description provided.