[pull] canary from vercel:canary - #1307
Merged
Merged
Conversation
## Summary The existing metadata resolver combines two responsibilities: walking the loader tree to collect and schedule route exports, and interpreting the metadata or viewport value produced by an individual route layer. Move the route-layer operations into metadata-resolution-primitives.ts. This includes wrapping generateMetadata and generateViewport, loading file-based metadata, merging values with their resolved parents, post-processing metadata, and producing SelectedMetadata for rendering. Keep resolve-metadata.ts responsible for the existing traversal and scheduling flow, importing the extracted operations back into the same call sites and preserving its existing exports. This creates a reusable boundary for other traversal strategies without introducing another resolution path. This is intended to be behavior preserving: traversal order, eager generator invocation, parent promise behavior, warnings, and rendered metadata and viewport tags are unchanged. ## Verification - pnpm build-all <!-- NEXT_JS_LLM -->
The `back-before-hydration` assertions read the heading with `browser.elementByCss`, which waits for the load event before it returns. Here the load event cannot fire until the stalled scripts are released and finish running, and that is the whole window the test is about. So the first attempt inside `retry` blocks for almost the entire 3s budget, looks at the DOM once, and then `retry` refuses a second look because `waited + interval > duration`. This waits in the browser instead, with the load event out of the picture. Every page already has its own heading id, except the two search pages, which shared one; they get a per-page id too. Then a single `waitForSelector` resolves the moment that page commits, and the URL assertion follows the wait rather than racing alongside it. The assertions that check content *stayed* put keep polling with `retry`, since a change there is the failure. Holding the flight response for 1800ms and throttling the renderer 8x reproduces the CI failure exactly on canary — same `Failed to retry within 3000ms`, same expected "Home" / received "Post" — and passes with this change; the suite is still 16/16 with the response held for 6s. Test-only. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )