Canonical test for whether a RunViewParams.DataSource value requests the MATERIALIZED snapshot.
DataSource is typed 'Live' | 'Materialized' here, but it crosses a GraphQL String boundary
(RunViewResolver declares it as an unconstrained @Field(() => String)), so a cross-version or non-MJ
client can send 'materialized', 'MATERIALIZED', or 'Materialized '. This trims + lowercases before
comparing, so every such variant is recognized as materialized; anything else (including a typo) means a
live read — the safe default. Use this at EVERY DataSource decision point (read routing in
GetEffectiveBaseView, the cache-eligibility gate in runViewCacheEligible, and the cache fingerprint in
LocalCacheManager) so a mis-cased request can never be routed to the snapshot by one site while being
cached as Live by another (the silent-stale hazard that separate === 'Materialized' checks allow).
Canonical test for whether a
RunViewParams.DataSourcevalue requests the MATERIALIZED snapshot.DataSourceis typed'Live' | 'Materialized'here, but it crosses a GraphQLStringboundary (RunViewResolver declares it as an unconstrained@Field(() => String)), so a cross-version or non-MJ client can send'materialized','MATERIALIZED', or'Materialized '. This trims + lowercases before comparing, so every such variant is recognized as materialized; anything else (including a typo) means a live read — the safe default. Use this at EVERY DataSource decision point (read routing in GetEffectiveBaseView, the cache-eligibility gate in runViewCacheEligible, and the cache fingerprint in LocalCacheManager) so a mis-cased request can never be routed to the snapshot by one site while being cached as Live by another (the silent-stale hazard that separate=== 'Materialized'checks allow).