Skip to content

fix(glb): report malformed JSON roots and image declarations as unknown (#14296) - #14340

Closed
P-r-e-m-i-u-m wants to merge 1 commit into
morluto:mainfrom
P-r-e-m-i-u-m:fix/glb-layout-invalid-json
Closed

P-r-e-m-i-u-m wants to merge 1 commit into
morluto:mainfrom
P-r-e-m-i-u-m:fix/glb-layout-invalid-json

Conversation

@P-r-e-m-i-u-m

Copy link
Copy Markdown

Fixes #14296 — claimed on the issue first.

Changes

glbLayout no longer silently coerces malformed GLB JSON into empty defaults and reports full coverage:

  • Non-object JSON roots ([], null, 42, "text", true) now set json_status: "invalid", regionsExamined: "unknown" and the existing "not a readable JSON object" limitation, while still listing the raw chunk regions.
  • A non-array images member now sets unknown coverage with an explicit limitation.
  • An image whose buffers[0] is not an object, or whose byteOffset is explicitly null, now counts as unresolved instead of being listed as an embedded region.

Added a jsonRoot override to the GLB test fixture and 12 regression cases through the real reader.

Verification

npx vitest run src/artifacts/gpuAsset/GpuAssetArtifactReader.test.ts — 41 passed (12 new).

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-24T09:33:57.811561Z
We couldn’t complete this review. Comment @codex review to try again.
d398cb3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR stops reporting complete GLB coverage for malformed JSON roots and image declarations while keeping raw chunk regions available.

  • GLB files with malformed declarations now show unknown coverage.

Reviews (1) · Last reviewed commit: "fix(glb): report malformed JSON roots an..." · Reviewed by Greptile

@vincentkoc

Copy link
Copy Markdown
Collaborator

thanks for the fix! we’re consolidating this in #14297, which covers the same malformed GLB cases and adds positive controls plus CLI regression coverage. closing this overlapping PR so we can review and land one implementation.

@vincentkoc vincentkoc closed this Nov 26, 2026
@P-r-e-m-i-u-m

Copy link
Copy Markdown
Author

Thanks for the clear reason, @vincentkoc — consolidating into #14297 is the right call, and glad to see it landed.

That one slipped past my duplicate check: I searched PR titles for the issue number, but #14297's title doesn't mention #14296. I'll search by touched file and open PRs for the same bug from now on, not just by issue reference.

No hard feelings at all. My patch passed 41 targeted tests and Greptile gave it 5/5, so I know the work was sound — but one implementation is better than two. Happy to take another issue when there's one free.

@morluto morluto added the bug Something isn't working label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] GLB layout reports non-object JSON roots as parsed and non-array images as complete

3 participants