Skip to content

bugfix(baker): gpuopen scalar-only entries emit available_tiers=["scalar"] (closes #369) - #379

Merged
gerchowl merged 1 commit into
devfrom
bugfix/369-index-builder-always-emit-tiers
May 10, 2026
Merged

gerchowl merged 1 commit into
devfrom
bugfix/369-index-builder-always-emit-tiers

Conversation

@gerchowl

@gerchowl gerchowl commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes

Test 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-end asset(...).textures assertion that no fetch_all_textures call is made for scalar-only entries
  • Full baker suite: 606 pass / 16 skipped
  • Full client suite: 459 pass / 29 skipped / 2 xfailed
  • Spot-bake gpuopen subset on gerchowl/mat-vis-tst (next step) and verify catalog post-bake has available_tiers=["scalar"] for the 18 scalar-only UUIDs

Why this isn't only a substrate fix

The substrate convention diverges across legacy tags (v2026.04.0/.1/.2 ship 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.

@github-actions github-actions Bot added area:testing Test infrastructure, BATS, pytest area:client Python/JS/Rust client packages area:baker Baker pipeline, Dagger, data fetchers labels May 8, 2026
@gerchowl
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
gerchowl force-pushed the bugfix/369-index-builder-always-emit-tiers branch from ac634e3 to edf328a Compare May 10, 2026 17:10
@gerchowl
gerchowl merged commit 8c73865 into dev May 10, 2026
5 checks passed
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`.
@gerchowl
gerchowl deleted the bugfix/369-index-builder-always-emit-tiers branch July 1, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:baker Baker pipeline, Dagger, data fetchers area:client Python/JS/Rust client packages area:testing Test infrastructure, BATS, pytest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant