test: pin uniform struct-array constant indexing across all 5 shader targets - #227
Merged
Conversation
…l 5 targets Harvested from the composite-effects spike (PR #218): a uniform array of structs has no element address resolvable at lower time, so members must be read through constant indices and passed to helpers as scalars/vectors. This file pins the supported idiom green on rv32n, rv32c, rv32lpn, wasm, and interp — the runtime-indexed form compile-fails on 4 of the 5. One change from the spike version: the header comment cited the corpus glob `array/of-struct/*`, whose `/*` the harness's block-comment stripper (new since the spike branched) reads as a real block-comment opener, silently stripping every subsequent directive — the file passed with zero cases. Reworded to `array/of-struct/`; the stripper bug is flagged separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Defect entry (2026-07-29, fixed): meteor's render shader indexed a uniform struct array with a runtime value; it compiled on the host backend and failed on 4 of 5 targets, so the engine render test and CI stayed green while the browser sim broke. Debt entry (carried): the condition behind it — nothing compile-gates examples/**/*.glsl on the non-host targets, and an engine-level render test structurally cannot. Both indexed; the debt entry is conformed to the register template (carried/since/logged) that landed after the spike branched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Yona-Appletree
marked this pull request as ready for review
July 31, 2026 18:46
# Conflicts: # docs/debt/README.md
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.
Plan: lp2025/2026-07-31-1002-modules-buses-panels (Q9, out-of-band harvest)
Path: ~/.photomancer/planning/lp2025/2026-07-31-1002-modules-buses-panels/plan.md
Harvests one standalone piece from the composite-effects spike (#218) onto main, per Q9 of the modules-buses-panels plan:
lp-shader/lps-filetests/filetests/uniform/array-of-struct.glsl— pins the supported uniform-struct-array idiom (constant-index member reads, including through a helper) green on all five targets. The runtime-indexed form compile-fails on 4 of 5 targets (all butrv32lpn.q32), so this is the shape example shaders must follow.docs/defects/2026-07-29-uniform-struct-array-runtime-index.md— the meteor spike shader used runtime indexing; the engine render test's host backend accepts it, so every automated gate stayed green while the browser sim broke.docs/debt/example-shaders-not-compile-gated.md— the standing condition: nothing compile-gatesexamples/**/*.glslon non-host targets. Conformed to the register template (carried/since/logged) that landed after the spike branched; both registry indexes updated.No meteor/plasma example content or scoped-bus code — those stay on #218.
One deviation from the spike version, load-bearing: as harvested, the filetest ran zero cases yet reported green. Its header comment cited the corpus glob
array/of-struct/*, and the parser's block-comment stripper (new since the spike branched) treats that/*inside a//line comment as a real block-comment opener, silently stripping every later directive. Reworded the comment to drop the*; the stripper bug + a zero-case guard are chipped for a separate fix. No other corpus file has the poisoning pattern.Local validation:
just check testgreen;./scripts/filetests.sh uniform/array-of-struct.glslruns 2/2 cases on each of rv32n.q32, rv32c.q32, rv32lpn.q32, wasm.q32, interp.f32 (10/10).🤖 Generated with Claude Code