Skip to content

Conversation

@mischnic
Copy link
Member

@mischnic mischnic commented Jan 21, 2026

Closes PACK-6536

  • with deployment id available: a header contains the process.env.NEXT_DEPLOYMENT_ID , the client knows its dpl id already, so we can use that already
  • with deployment id unavailable: a header contains the BUILD_ID, keep the existing logic of storing the build id in the browser
  • output:export mode: a response field contains the BUILD_ID, keep the existing logic of storing the build id in the browser

  • Fallback behavior for when there is no deployment id
  • Fallback behavior for output: export
  • Find the right place where the header should be added for dynamic RSC responses on the server
  • Find the right place where the header should be added for prerendered static RSC responses (route manifest)

Copy link
Member Author

mischnic commented Jan 21, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mischnic mischnic changed the title Cleanup Replace flight navigation build id field with header Jan 21, 2026
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 21, 2026

Failing test suites

Commit: 1cc781e | About building and testing Next.js

pnpm test-start-turbo test/e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts (turbopack) (job)

  • segment cache (deployment skew) > with NEXT_DEPLOYMENT_ID > does not crash when prefetching a static page on a different deployment (DD)
Expand output

● segment cache (deployment skew) › with NEXT_DEPLOYMENT_ID › does not crash when prefetching a static page on a different deployment

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#build-id') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts:122:37)

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 21, 2026

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 456ms 455ms ▁▁▁▁▁
Cold (Ready in log) 439ms 440ms ▁▁▁▁▂
Cold (First Request) 801ms 809ms ▁▁▃▁▃
Warm (Listen) 457ms 456ms ▁▁▁▁▁
Warm (Ready in log) 439ms 440ms ▁▁▁▁▁
Warm (First Request) 337ms 339ms ▁▂▁▂▁
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 455ms 455ms ▁▁▁▁▁
Cold (Ready in log) 439ms 439ms ▁▁▁▁▁
Cold (First Request) 1.767s 1.761s ▁▁▁▁▁
Warm (Listen) 456ms 456ms ▁▁▁▁▁
Warm (Ready in log) 439ms 439ms ▁▁▁▁▁
Warm (First Request) 1.764s 1.775s ▁▁▁▁▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 4.304s 4.273s ▂▂▁▁▁
Cached Build 4.311s 4.319s ▂▂▁▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 14.089s 14.030s ▁▆▃▄▂
Cached Build 14.283s 14.233s ▁▇▃▄▄
node_modules Size 460 MB 460 MB ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles: **432 kB** → **432 kB** ⚠️ +14 B

82 files with content-based hashes (individual files not comparable between builds)

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 764 B 760 B
Total 764 B 760 B ✅ -4 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 451 B 450 B
Total 451 B 450 B ✅ -1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2086.HASH.js gzip 169 B N/A -
2161-HASH.js gzip 5.41 kB N/A -
2747-HASH.js gzip 4.48 kB N/A -
4322-HASH.js gzip 52.7 kB N/A -
ec793fe8-HASH.js gzip 62.3 kB N/A -
framework-HASH.js gzip 59.8 kB 59.8 kB
main-app-HASH.js gzip 251 B 253 B
main-HASH.js gzip 38.7 kB 39.1 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB
1596.HASH.js gzip N/A 169 B -
2658-HASH.js gzip N/A 52.5 kB -
6349-HASH.js gzip N/A 4.46 kB -
7019-HASH.js gzip N/A 5.43 kB -
b17a3386-HASH.js gzip N/A 62.3 kB -
Total 226 kB 226 kB ⚠️ +135 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B
_error-HASH.js gzip 182 B 182 B
css-HASH.js gzip 336 B 335 B
dynamic-HASH.js gzip 1.8 kB 1.8 kB
edge-ssr-HASH.js gzip 256 B 256 B
head-HASH.js gzip 352 B 349 B
hooks-HASH.js gzip 385 B 384 B
image-HASH.js gzip 580 B 580 B
index-HASH.js gzip 259 B 258 B
link-HASH.js gzip 2.5 kB 2.51 kB
routerDirect..HASH.js gzip 319 B 317 B
script-HASH.js gzip 385 B 387 B
withRouter-HASH.js gzip 316 B 315 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.97 kB 7.96 kB ✅ -8 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 125 kB 125 kB
page.js gzip 243 kB 239 kB 🟢 4.76 kB (-2%)
Total 368 kB 363 kB ✅ -4.74 kB
Middleware
Canary PR Change
middleware-b..fest.js gzip 617 B 616 B
middleware-r..fest.js gzip 155 B 156 B
middleware.js gzip 32.9 kB 33.3 kB 🔴 +356 B (+1%)
edge-runtime..pack.js gzip 842 B 842 B
Total 34.5 kB 34.9 kB ⚠️ +356 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 738 B 738 B
Total 738 B 738 B
Build Cache
Canary PR Change
0.pack gzip 3.69 MB 3.69 MB 🔴 +6.44 kB (+0%)
index.pack gzip 102 kB 102 kB
index.pack.old gzip 100 kB 102 kB 🔴 +1.43 kB (+1%)
Total 3.89 MB 3.9 MB ⚠️ +7.83 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 305 kB 306 kB
app-page-exp..prod.js gzip 162 kB 162 kB
app-page-tur...dev.js gzip 305 kB 305 kB
app-page-tur..prod.js gzip 162 kB 162 kB
app-page-tur...dev.js gzip 302 kB 302 kB
app-page-tur..prod.js gzip 160 kB 160 kB
app-page.run...dev.js gzip 302 kB 302 kB
app-page.run..prod.js gzip 160 kB 160 kB
app-route-ex...dev.js gzip 68.8 kB 68.8 kB
app-route-ex..prod.js gzip 47.6 kB 47.6 kB
app-route-tu...dev.js gzip 68.8 kB 68.8 kB
app-route-tu..prod.js gzip 47.6 kB 47.6 kB
app-route-tu...dev.js gzip 68.4 kB 68.4 kB
app-route-tu..prod.js gzip 47.4 kB 47.4 kB
app-route.ru...dev.js gzip 68.4 kB 68.4 kB
app-route.ru..prod.js gzip 47.4 kB 47.4 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 41.2 kB 41.2 kB
pages-api-tu..prod.js gzip 31.3 kB 31.3 kB
pages-api.ru...dev.js gzip 41.1 kB 41.1 kB
pages-api.ru..prod.js gzip 31.2 kB 31.2 kB
pages-turbo....dev.js gzip 50.8 kB 50.8 kB
pages-turbo...prod.js gzip 38.2 kB 38.2 kB
pages.runtim...dev.js gzip 50.8 kB 50.8 kB
pages.runtim..prod.js gzip 38.2 kB 38.2 kB
server.runti..prod.js gzip 62.2 kB 62.2 kB
Total 2.71 MB 2.71 MB ⚠️ +751 B
📝 Changed Files (8 files)

Files with changes:

  • app-page-exp..ntime.dev.js
  • app-page-exp..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page.runtime.dev.js
  • app-page.runtime.prod.js
View diffs
app-page-exp..ntime.dev.js
failed to diff
app-page-exp..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js

Diff too large to display

app-page.runtime.dev.js
failed to diff
app-page.runtime.prod.js

Diff too large to display

@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from 51a1d88 to 59cd614 Compare January 21, 2026 15:12
@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from 59cd614 to cdd8a84 Compare January 21, 2026 16:11
@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from cdd8a84 to b6db6a5 Compare January 21, 2026 16:27
@mischnic mischnic changed the base branch from canary to graphite-base/88855 January 22, 2026 16:14
@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from 0fb4730 to f2a1392 Compare January 22, 2026 16:14
@mischnic mischnic changed the base branch from graphite-base/88855 to mischnic/flight-nav-tests January 22, 2026 16:14
@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from f2a1392 to 1cc781e Compare January 22, 2026 16:21
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will improve performance by 5.89%

⚡ 1 improved benchmark
✅ 16 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation react-dom-client.development.js[tracing] 395 ms 373 ms +5.89%

Comparing mischnic/flight-nav-requests-build-id (f2a1392) with canary (d4e64f5)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on mischnic/flight-nav-tests (19ad6a7) during the generation of this report, so canary (d4e64f5) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@mischnic mischnic changed the base branch from mischnic/flight-nav-tests to graphite-base/88855 January 23, 2026 09:13
@mischnic mischnic force-pushed the graphite-base/88855 branch from 19ad6a7 to 0a673e6 Compare January 23, 2026 09:19
@mischnic mischnic force-pushed the mischnic/flight-nav-requests-build-id branch from 1cc781e to 5868f1f Compare January 23, 2026 09:19
@mischnic mischnic changed the base branch from graphite-base/88855 to mischnic/flight-nav-tests January 23, 2026 09:19
@mischnic mischnic changed the base branch from mischnic/flight-nav-tests to graphite-base/88855 January 23, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants