Skip to content

Enable durableUseCacheEntries by default - #101922

Merged
mischnic merged 1 commit into
canaryfrom
mischnic/durableUseCacheEntries-default
Nov 26, 2026
Merged

mischnic merged 1 commit into
canaryfrom
mischnic/durableUseCacheEntries-default

Conversation

@mischnic

@mischnic mischnic commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What?

Enable durable "use cache" remote cache entries across deployments by default for Turbopack production builds.

Why?

Allow supported builds to reuse durable cache entries across deployments without opting in.

How?

Set the configuration default to true and update affected test expectations and fixtures. Built on #101930.

Verification

  • Verified that the two split commits preserve the original final tree with git diff --exit-code 54d52c8a877 HEAD.
  • Not run: runtime tests (history-only split; no additional implementation changes).

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Vercel Agent finished reviewing your changes.
f5c294d • Wed, 18 Nov 2026 13:02:26 GMT • 57.5s • Details

Vercel Agent's latest review does not approve this pull request under the repository's review policy.

Explanation

@sokra, please review packages/next/src/server/config-shared.ts:2559: changing this default remains a strong public-behavior escalation trigger under the merge-base policy. No new correctness findings; checked development/production and bundler gating, cache-key fallback, and all changed fixtures/assertions, with 13 focused checks passing; integration tests could not run because dependencies are absent.

Resolved issues (1)
     Issue Location
A normal next build followed by next start resolves… config.ts:577
Review steps
     Step Time
Preparing the workspace 19.9s
Analyzing the changes 32.0s
Finalizing the review 5.5s

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 0f61dce
View workflow run

@github-actions github-actions Bot added created-by: Turbopack team PRs by the Turbopack team. type: next labels Nov 17, 2026
Comment thread packages/next/src/server/config.ts Resolved
@github-actions github-actions Bot added the tests label Nov 17, 2026
@mischnic
mischnic force-pushed the mischnic/durableUseCacheEntries-default branch from 5837edf to 85e3f68 Compare November 17, 2026 13:18
@mischnic
mischnic changed the base branch from canary to fx/durable-use-cache-config November 17, 2026 13:19
@mischnic
mischnic added this pull request to stack #101931 November 17, 2026 13:19
@mischnic
mischnic force-pushed the mischnic/durableUseCacheEntries-default branch 3 times, most recently from 0ef68a5 to 2228d7f Compare November 17, 2026 21:38
@mischnic
mischnic requested a review from a team November 17, 2026 21:40
@mischnic
mischnic force-pushed the mischnic/durableUseCacheEntries-default branch from 2228d7f to 35db990 Compare November 17, 2026 22:46
@mischnic
mischnic requested a review from unstubbable November 18, 2026 10:36
Base automatically changed from fx/durable-use-cache-config to canary November 18, 2026 13:01
@mischnic
mischnic force-pushed the mischnic/durableUseCacheEntries-default branch from 35db990 to f5c294d Compare November 18, 2026 13:01
@mischnic
mischnic force-pushed the mischnic/durableUseCacheEntries-default branch from f5c294d to 0f61dce Compare November 25, 2026 16:36
@vercel
vercel Bot requested a review from sokra November 25, 2026 16:38
@vercel

vercel Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Vercel Agent Verified Review finished reviewing your changes and found no issues.
0f61dce • Wed, 25 Nov 2026 16:38:49 GMT • 1m 48s • Report • Details

Important

Needs a person: this repository’s review rules call for a person’s review.

Why?

The author is a team member and owns config-and-flags. The change is 3 implementation lines and I found no correctness defects: the default resolves to true, dev forces it off, and webpack/edge stay non-durable. But REVIEW.md counts a changed config default as a strong public-API/behavior trigger, and the config-and-flags rubric lists 'any default change in config-shared.ts' as strong. The author owns that area, so the rubric signal is only a comment, but the global strong trigger still applies and escalates.

  • Trigger: Changes or additions to public APIs or behaviors (config-shared.ts:2642). The default of the config option `experimental.durableUseCacheEntries` flips from unset (false) to true. That is a config default change that alters cache keys for every Turbopack production app on upgrade, and it isn't behind a new opt-in flag.

Review requested from: sokra.

Facts from the base’s scripts/review-context.mjs: areas: config-and-flags, use-cache, pages-router · authorIsTeamMember: true · implementationLines: 3 · totalLines: 23

Summary

Flips the default of experimental.durableUseCacheEntries to true in defaultConfig, so Turbopack production builds use durable, code-hash-based "use cache" keys (with a trailing env-state hash) by default. Test regexes are loosened to accept the optional 64-hex env hash suffix, and two fixtures pin the flag explicitly.

Questions for the author (1)

  • Flipping this default changes every "use cache" key for Turbopack production apps on upgrade (custom cache handlers see a new key shape with a trailing hash). Should this go in the upgrade notes or docs, since no docs page mentions the flag yet?
Checked (5)

     Check Location
Holds The resolved production config now has durableUseCacheEntries true when the user doesn't set it.
Ran the head's built loadConfig('phase-production-build') on an empty next.config.js through verify-exec; it printed true.
config-shared.ts:2642
Holds Development still forces the flag off, whatever the new default is.
Read loadConfig: PHASE_DEVELOPMENT_SERVER sets result.experimental.durableUseCacheEntries = false after defaults are merged.
config.ts:1887
Holds Webpack/Rspack builds stay non-durable at runtime even with the new default.
Read the work store: the flag is ANDed with the compile-time process.env.TURBOPACK, and the edge adapter hard-codes false.
work-store.ts:132
Holds The test regexes' optional [0-9a-f]{64} suffix matches the key shape, a SHA-256 hex digest appended right after the serialized key.
Read cacheHandlerKeyBase = serializedCacheKey + runtimeEnvVarStateHash, which is a sha256 .digest('hex') at lines 4124-4140.
use-cache-wrapper.ts:2635
Holds The cross-deployment fixture still runs a non-durable variant now that undefined would mean true.
Read the config: it is now an explicit boolean, so the suite without DURABLE_USE_CACHE_ENTRIES=1 resolves to false rather than to the new default.
next.config.js:18
Review steps

     Step Time
Sandbox set up 14.3s
Repository rules read: REVIEW.md and AGENTS.md files (4)
Agent review: 1 of 6 changed files opened, 2 commands run 1m 32s
Repros run on the head and the base (0), findings graded (0) 1.9s

Read the full report ↗ (Download report.json • report.md)

@mischnic
mischnic merged commit efcd015 into canary Nov 26, 2026
234 of 236 checks passed
@mischnic
mischnic deleted the mischnic/durableUseCacheEntries-default branch November 26, 2026 09:32
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.

2 participants