[PPF] Instant validation for `ensureStatic = "shell" | "prefetch"` #98249
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 288 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.339
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #98249"
general
weight: 0.35
lubieowoce
Adjusts Instant Validation internals to validate the
ShellStaticstage instead ofShellRuntimewhenensureStatic >= "shell". If that's the case, the client will do a static request (and extract the shell from it), so the app shell cannot access session data (unlike the PPF default, where we use a runtime shell).Note that in some cases, this might seem more restrictive than needed. For
ensureStatic >= "shell", the client will do a static prefetch that goes up to theStaticstage which resolves more things, like staticparams,prefetch()( in thePrefetchStaticstage) andnavigation()(in theNavigationStaticstage). However:1. The client expects to be able to rewind the static prefetch into a shell and reuse it across the whole route, so we should be validating that the shell is actually useful.
2. For
ensureStatic = "shell", we might still do a runtime prefetch (with<Link prefetch={true}>), which will not havenavigation(), and validatingShellStaticcatches that.Implementation notes
RequestStore.needsAppShelltoRequestStore.needsRuntimeShell(undoing a previous rename), because theShellStaticstage can _also_ be an App Shell, just not a _runtime_ one. The flag controls whether or not we're delaying link data until the runtime stages, which we don't need to do if the shell is static.ensureStatic >= "shell"set, we _won't_ setRequestStore.needsRuntimeShellanymore, which means that the main render can once again be re-used for both IV and SSV.prepareValidationInputsInPartialPrefetchingis changed accordingly. We'll also setrevealAfterStagetoStaticShellto match what the client would have prefetched.ValidationPrefetchKind.StaticAppShell, which checks the prefetch at theShellStaticstage. This is enabled if we haveensureStatic >= "shell". the PPF default modeValidationPrefetchKind.RuntimeAppShellusesShellRuntimeinstead.Tests
cookies()ifensureStatic >= "shell"(unlike the default behavior of app shells)params,prefetch(), andnavigation()regardless ofensureStatic(same as default)