[PPF] Validate `unstable_ensureStatic` nesting (#98357)
`ensureStatic` forms a hierarchy: `"auto" < "shell" < "prefetch" < "navigation"`, with each value being more contrained than its predecessor. 1. A child segment cannot relax constraints set by a parent segment, it can only tighten them - so `shell` in a layout and `prefetch` in a page is fine, but the opposite is not - note that setting `"auto"` in the child *is* allowed, because it means "unconstrained" and is compatible with all the other configs 2. We can't have two conflicting levels set by two parallel slots (but `auto` is compatible with any other constraint, so it's allowed, same as above) 3. If a segment sets `ensureStatic = false`, then no other segments on that route are allowed to constrain the route by setting anything higher than `auto` (this is meant as a signal for e.g. "this segment DELIBERATELY uses a runtime shell and should not be overridden to be static") Also adds exhaustive tests for all of these scenarios.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment