[PPF] Model caches with stale < MIN_SHELL_STALE as prefetch-only data - #98339
Open
lubieowoce wants to merge 3 commits into
Open
[PPF] Model caches with stale < MIN_SHELL_STALE as prefetch-only data#98339lubieowoce wants to merge 3 commits into
stale < MIN_SHELL_STALE as prefetch-only data#98339lubieowoce wants to merge 3 commits into
Conversation
Contributor
Tests PassedCommit: d5f8ee9 |
Note that in practice, the usage of `makeStageHangingPromise` was fine, because `stagedRendering.finalStage < stage` was never true in static prerenders, so we never actually tracked it as a runtime data access. However semantically it should never be tracked as runtime data, because a runtime shell would not provide it either.
lubieowoce
force-pushed
the
lubieowoce/short-stale-is-not-runtime
branch
from
September 8, 2026 02:24
550b73c to
d5f8ee9
Compare
stale < MIN_SHELL_STALE as prefetch-only data (not runtime data)stale < MIN_SHELL_STALE as prefetch-only data
lubieowoce
marked this pull request as ready for review
September 8, 2026 05:07
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.
Caches that have
stale < MIN_SHELL_STALEwere usingmakeStageHangingPromisein prerenders, which (in theory) was meant to track a runtime data access during a static prerender, which in turn would make the page use runtime shells. This is semantically incorrect, because both static and runtime shells would exclude the cache, and both static and runtime prefetches would include it, so it does not actually signal runtimeness, only prefetchness. The only thing we should be doing for these caches is excluding the content, same asunstable_prefetch().This PR replaces
makeStageHangingPromisewithmakePrefetchHangingPromise, which is not tracked as runtime data at all. We also use it forunstable_prefetch()to signal the correspondence.Note that in practice, the usage of
makeStageHangingPromiseinuse-cache-wrapperwas technically fine, because its runtime data tracking was effectively dead code. We only returned it ifstagedRendering.finalStage < stage, but for static prerendersstage = staticLinkDataStage = PrefetchStaticandfinalStage = Static, so the condition was never actually true, and we never actually tracked it as a runtime data access. However semantically it should still not be tracked as runtime data.(The condition can be true in a runtime prerender that only prerenders the shell. We don't do any tracking in runtime prerenders, so it was also a no-op).
Stack created with GitHub Stacks CLI • Give Feedback 💬