CNA-VGAP-017: graphics-ext shader-package drift guards have holes: no reproducibility check for shadow_caster, none run in CI, desktop clustered-forward fragment unpinned

CNA snapshot 009d40f5  ·  Known Issues › Verification gaps  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

Two checked-in packages (shadow_caster and the test package modern_resource_interop) have no ShaderPackageReproducibility CTest, CI installs no shaderc so every such CTest skips, and only the ES clustered-forward fragment is pinned to the public GLSL helpers.

Identifier
CNA-VGAP-017
Category
Verification gap
Subsystem
Testing & evidence
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
Checked-in shader packages of modules/graphics-ext (package.json plus generated header) used by ShadowMap, SpotShadowMap and ClusteredForwardEffect

Expected behaviour

Plan MOD-2216, as recorded in cmake/Tests/ModuleProbes.cmake: "checked-in packages must remain derivable from their declared source files", enforced by one reproducibility CTest per package running tools/shader_package/generate_shader_package.py --check. The clustered-forward helper pin exists "rather than allowing a second copy of an algorithm to drift unnoticed".

Actual behaviour at TARGET

ModuleProbes.cmake registers 18 reproducibility CTests, one per checked-in package except two, which have none: modules/graphics-ext/src/shaders/shadow_caster (the directional, skinned directional, cube and spot caster packages consumed by ShadowMap, CascadedShadowMap, CubeShadowMap and SpotShadowMap) and the test package tests/CNA/Graphics/shaders/modern_resource_interop. The generator exits 77 (skip) when libshaderc.so.1 is absent and no workflow under .github/workflows installs shaderc, so every registered reproducibility CTest skips in CI; the gate runs only on a developer machine with shaderc. Separately, ClusteredForwardEffectTest.PackagedEsSourceRetainsEveryPublicGlslFragment checks that kForwardEsFragmentSource contains the five public helper texts (ClusteredLightBuffer::getLightLookupGlsl() and four others); the hand-maintained desktop source forward.desktop.frag.glsl (kForwardDesktopFragmentSource, consumed by OPENGL33 and OPENGL4) is not checked, so a helper change copied into the ES file only passes every test.

Source locations

Evidence

Checked by reading at 009d40f5; not executed. At TARGET the desktop fragment differs from the ES one only in its header lines (#version 330 core instead of #version 300 es and the precision statement), so there is no drift today, and the clustered-forward GPU tests exercise the desktop variant behaviourally on OPENGL4 (CNA's record in plans/plan_opengl4_modern_graphics.md, GL4-0029, and CnaGraphicsExtTests 955/0/7). What is missing is a guard against the next edit.

Independent re-verification: Checked by reading at 009d40f5; not executed. Every package.json under modules was enumerated against the 18 registrations: exactly shadow_caster and modern_resource_interop are uncovered. That every registered gate skips in CI follows from no workflow installing shaderc and is an inference: no CI log was inspected and the runner image is assumed not to ship libshaderc.so.1. At TARGET the desktop fragment differs from the ES one only in its header lines (#version 330 core instead of #version 300 es and the precision statement), so there is no drift today, and the clustered-forward GPU tests exercise the desktop variant behaviourally on OPENGL4 (CNA's record in plan_opengl4_modern_graphics.md, GL4-0029, and CnaGraphicsExtTests 955/0/7). What is missing is a guard against the next edit.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

The 18 reproducibility CTests (label graphics;shader;generator, SKIP_RETURN_CODE 77), ClusteredForwardEffectTests.cpp (the ES pin and GPU tests that run whichever variant the renderer selects), and the shadow-map suites, which test casters behaviourally.

Regression test

Register ShadowCasterShaderPackageReproducibility and ModernResourceInteropShaderPackageReproducibility like the other 18; install libshaderc in one CI job so the generator checks run instead of skipping; extend PackagedEsSourceRetainsEveryPublicGlslFragment to kForwardDesktopFragmentSource (or generate the desktop file from the ES one).

Blast radius

Engine-layer maintainers: a shader edit without regeneration, or a helper change applied to one variant, ships unnoticed until a renderer-specific visual test catches it. Runtime behaviour at TARGET is unaffected.

Workaround

Run the generator with --check locally for every package touched (it needs libshaderc.so.1) and diff the ES and desktop clustered-forward sources.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

Tests and validation
Test architecture: CI