[pull] canary from vercel:canary#1058
Merged
Merged
Conversation
This allows injecting client bootstrap code using only next.config.js (without writing to any user source files).
Outdated. we don't really use these
## Problem Fixes the trace propagation issue reported in vercel/otel#107. `NEXT_OTEL_VERBOSE=1` opened the `NextServer.getRequestHandler` span before request header propagation, so incoming `traceparent` was ignored and framework spans started a new trace. ## Solution Extract propagated request context before wrapper request-handler spans. Add focused e2e coverage in the existing OpenTelemetry suite for verbose spans inheriting the incoming `traceparent`, including the parent span id. Validated with `pnpm --filter=next build` and `pnpm test-dev-turbo test/e2e/opentelemetry/instrumentation/opentelemetry.test.ts`. <!-- NEXT_JS_LLM_PR -->
…93940) When both `cachedNavigations` and `varyParams` are enabled and a `<Link prefetch={true}>` points to a page with fallback params, the resulting Full prefetch could leak param-specific content into the cache entry of a different param value. As of today, `varyParams` tracking only works within the static stage portion of a response. A Full prefetch response covers all stages, so the server-reported set is incomplete and can't be trusted — it may arrive empty. The client then re-keys the entry under a vary path where every path param is replaced with `<Fallback>`, so a subsequent lookup for a different param value collides on that entry and reads the previously prefetched page's content. This change makes `fulfillEntrySpawnedByRuntimePrefetch` skip the re-keying when `fetchStrategy === FetchStrategy.Full` and keep the entry pinned to its concrete vary path. That aligns Full prefetches with how they're already keyed when `cachedNavigations` is disabled, where the server sends no `varyParams` and the client never re-keys. The trade-off is that we miss out on cross-param sharing for Full prefetches even when a segment genuinely doesn't depend on a given param. Ideally we'd track `varyParams` through the dynamic stage too, but that's not possible today: the `varyParams` thenable would need to resolve before the render completes, while React waits for the thenable to resolve before completing the render — a deadlock in the Flight response. This limitation should naturally go away as `prefetch={true}` evolves under Cache Components, where it will likely become a runtime prefetch — a render aborted at a known stage — at which point we can track `varyParams` properly across stages for these requests, likely switching from a thenable to an async iterable.
rootParams is now available by default. the flag is removed. There are still intentional limitations. For instance rootParams cannot be used in route handlers and Server Actions. The feature will be expanded with some support for this in the future.
A lot of this was written with Claude. We lean a lot on published libraries for the statistics, so I've got confidence in them. This adds top-level commands to devlow, `run`, and `compare`, though we're still backwards compatible with `run` being the default if no command is specified. - `--n=<N>` runs each variant N times, `--warmup=<N>` discards the first N runs (don't use on cold-start metrics). Default behavior is unchanged at n=1. - Every run now writes a snapshot CSV to `.devlow-bench/snapshots/<ts>.csv` (long format, one row per sample, so mixed-unit metrics share a file). Override with `--snapshot=<path>`. - `--compare` prints a side-by-side table at the end of a run against the newest snapshot. `--baseline=<path>` points at a specific file or directory. - `devlow-bench compare <baseline.csv> <current.csv>` is a separate subcommand for diffing two existing snapshots without rerunning anything. For every scenario/variant/metric combination, it shows baseline vs current `mean / p50 / p90 (n)`, the absolute and percent delta, and two p-values.
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 : )