Repository navigation
bugfix(baker): gpuopen scalar-only entries emit available_tiers=["scalar"] (closes #369) - #379
Merged
Merged
Conversation
gerchowl
enabled auto-merge (squash)
May 10, 2026 17:09
…lar"] (closes #369) Pre-fix: 18 of 454 gpuopen catalog entries (Chrome, Aluminum, Gold, Brass, Frosted Glass, Cobalt, Red Wine, White Plastic, …) had `available_tiers` absent — `index_builder.py` omitted the key when the record's list was empty, so consumers saw `None` from `dict.get()`. Diverged silently from physicallybased's `["scalar"]` convention (#338). Fix: - `gpuopen.py` `_fetch_one`: emit `["scalar"]` (not `[]`) when no textures shipped — symmetric with physicallybased. - `index_builder.py`: always emit `available_tiers` on every entry. The empty-list shape is no longer reachable from any source path. - Client `_is_scalar_only_entry`: accept all four catalog shapes — new `["scalar"]` (post-#369), legacy `[]` and `None` (pre-#369), and key- absent — via `all(t == "scalar" for t in tiers)`. Standalone mirrored. Tests: - `test_index_builder.py`: pin always-present contract; pin `["scalar"]` passthrough. - `test_gpuopen_baker.py`: extend mtlx-only path to assert `available_tiers == ["scalar"]`; new test pins `["1k"]` for textured entries (regression guard against the fallback leaking). - `test_scalar_only_lookup.py`: parametrised over the four shapes (`["scalar"]`, `[]`, `None`, missing-key) + an end-to-end test that `asset(...).textures` returns `{}` without calling `fetch_all_textures`.
gerchowl
force-pushed
the
bugfix/369-index-builder-always-emit-tiers
branch
from
May 10, 2026 17:10
ac634e3 to
edf328a
Compare
gerchowl
added a commit
that referenced
this pull request
May 15, 2026
…lar"] (closes #369) (#379) Pre-fix: 18 of 454 gpuopen catalog entries (Chrome, Aluminum, Gold, Brass, Frosted Glass, Cobalt, Red Wine, White Plastic, …) had `available_tiers` absent — `index_builder.py` omitted the key when the record's list was empty, so consumers saw `None` from `dict.get()`. Diverged silently from physicallybased's `["scalar"]` convention (#338). Fix: - `gpuopen.py` `_fetch_one`: emit `["scalar"]` (not `[]`) when no textures shipped — symmetric with physicallybased. - `index_builder.py`: always emit `available_tiers` on every entry. The empty-list shape is no longer reachable from any source path. - Client `_is_scalar_only_entry`: accept all four catalog shapes — new `["scalar"]` (post-#369), legacy `[]` and `None` (pre-#369), and key- absent — via `all(t == "scalar" for t in tiers)`. Standalone mirrored. Tests: - `test_index_builder.py`: pin always-present contract; pin `["scalar"]` passthrough. - `test_gpuopen_baker.py`: extend mtlx-only path to assert `available_tiers == ["scalar"]`; new test pins `["1k"]` for textured entries (regression guard against the fallback leaking). - `test_scalar_only_lookup.py`: parametrised over the four shapes (`["scalar"]`, `[]`, `None`, missing-key) + an end-to-end test that `asset(...).textures` returns `{}` without calling `fetch_all_textures`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
available_tiers=["scalar"]instead of being silently absent. Symmetric with physicallybased's convention (bugfix(baker): physicallybased fetcher emits available_tiers=['scalar'] (closes #331) #338).available_tierson every entry. The[]/missing-key shape is no longer reachable from any source path._is_scalar_only_entry: accept the new["scalar"]shape and legacy shapes ([]/None/missing-key) viaall(t == "scalar" for t in tiers). Standalone mirrored. Resilient to pre-bug(substrate): gpuopen catalog emits available_tiers=null for scalar-only entries (should be []) #369 substrates (e.g. v2026.04.0/.1/.2).Closes
available_tiers=nullfor scalar-only entriesTest plan
tests/test_index_builder.py— pin always-present contract +["scalar"]passthrough (43 baker tests pass)tests/test_gpuopen_baker.py— extend mtlx-only path to assert["scalar"]; new regression-guard test for textured["1k"]clients/python/tests/test_scalar_only_lookup.py— parametrised over all four catalog shapes + end-to-endasset(...).texturesassertion that nofetch_all_texturescall is made for scalar-only entriesgerchowl/mat-vis-tst(next step) and verify catalog post-bake hasavailable_tiers=["scalar"]for the 18 scalar-only UUIDsWhy this isn't only a substrate fix
The substrate convention diverges across legacy tags (
v2026.04.0/.1/.2ship missing-key gpuopen entries), so client must remain resilient to both shapes — not just the new one. The fix lands on both sides simultaneously to keep the contract clean going forward without breaking already-published data.