1. 15 Oct, 2026 6 commits
  2. 14 Oct, 2026 9 commits
    • Luke Sandberg's avatar
      [lts-active] Turbopack: Ignore realpath errors during module resolution,… · 8ad85240
      Luke Sandberg authored
      [lts-active] Turbopack: Ignore realpath errors during module resolution, matching node's behavior (#100217)
      
      Backports [Turbopack: Ignore realpath errors during module resolution,
      matching node's behavior
      (#99951)](https://github.com/vercel/next.js/pull/99951) to
      `releases/lts/active`. The cherry-pick applied cleanly.
      
      ## Verification
      
      - `cargo test -p turbopack-core --lib resolve::`, using this branch's
      pinned toolchain: 65/65 tests passed. On macOS this needs a symlink-free
      `TMPDIR`, because the default temp dir is under `/var` → `/private/var`.
      That affects every resolve test on this branch, not just this change.
      - `cargo check --release -p turbopack-core`: clean. Removing `bail!`
      leaves no unused import.
      
      <!-- NEXT_JS_LLM -->
      Co-authored-by: 's avatarBenjamin Woodruff ‮ <benjamin.woodruff@vercel.com>
      8ad85240
    • Luke Sandberg's avatar
      [lts-active] [turbopack] Fix two GC paths that leave half-torn-down dependency edges (#100209) · 29d030e8
      Luke Sandberg authored
      Backports [[turbopack] Fix two GC paths that leave half-torn-down
      dependency edges (#99902)](https://github.com/vercel/next.js/pull/99902)
      to `releases/lts/active`.
      
      Builds on #100002, which brought over the snapshot rework (#99644,
      #99649) that this fix depends on.
      
      ## Conflict resolution
      
      `storage.rs` conflicted because #99747 (capture snapshot pending bits
      under exclusion) is not on this branch. The fix itself applies
      unchanged. The resolution only adjusts the surrounding code:
      
      - The snapshot scan takes #99902's loop as-is. The shard guard is
      already a write lock, so switching from `iter()` to `iter_mut()` is
      safe.
      - Added only the `is_deleted_new_task` helper.
      `debug_assert_persistable` does not exist on this branch.
      - Ported the three new storage tests to the `storage.take_snapshot(..)`
      method form. Dropped one `any_snapshot_pending()` assert, because that
      helper only exists after #99747.
      
      
      <!-- NEXT_JS_LLM -->
      29d030e8
    • Luke Sandberg's avatar
      [lts-active] fix(next-code-frame): snap visible window to char boundaries (#100212) · 3e50b822
      Luke Sandberg authored
      Backports [fix(next-code-frame): snap visible window to char boundaries
      (#92646)](https://github.com/vercel/next.js/pull/92646) to
      `releases/lts/active`. The cherry-pick applied cleanly.
      
      ## Verification
      
      - `cargo test -p next-code-frame`, using this branch's pinned toolchain:
      53/53 tests passed.
      
      <!-- NEXT_JS_LLM -->
      Co-authored-by: 's avatarmugi-uno <mugi.uno@gmail.com>
      Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
      3e50b822
    • Tobias Koppers's avatar
      [lts-active] Turbopack: backport Pages Router dev module graph chaining (#98823,… · 9458fb99
      Tobias Koppers authored
      [lts-active] Turbopack: backport Pages Router dev module graph chaining (#98823, #99910, #100091) (#100008)
      
      ## Summary
      
      Backports these canary commits to `releases/lts/active`:
      
      | PR | Commit | Change |
      | --- | --- | --- |
      | #98823 | `6dd4b27b` | Chain the Pages
      Router dev client module graphs to fix `_app` availability (#99789). |
      | #99910 | `1e1f9e69` | Add Pages Router
      availability coverage and restore the import-order assertion. |
      | #100091 | `5eec1d9d` | Fix `_app`
      `next/dynamic` preload 404s introduced by #98823, and preload those
      imports in production too. |
      
      The third commit must ship with #98823: chaining the page and `_app`
      graphs made pages preload `_app`'s dynamic imports with the **page's**
      availability, unlike `_app`'s own async loader. #100091 chunks those
      imports with `_app`'s own graph and availability, then merges them with
      the page's imports. The generic collector and App Router are untouched.
      The regression was reproduced with
      [dcheng1290/next-loadable-404](https://github.com/dcheng1290/next-loadable-404).
      
      All three backports retain cherry-pick provenance. #100091 had an
      import-only conflict in `pages.rs` because LTS lacks an unrelated
      `smallvec` import; the resolution adds only `FxHashSet`. The
      added/removed lines and test files match upstream. Existing branch
      history is preserved; the merged GTM test fix (#100011) remains
      included.
      
      Fixes #99789 on the LTS line.
      
      ## Verification
      
      With a native binary rebuilt from this LTS backport branch:
      
      - `pages-app-next-dynamic-preload`: **5/5 pass** in Turbopack dev and
      build/start. The suite checks every referenced static asset returns 200,
      the dynamic component renders, and both pages preload the same non-empty
      chunk set.
      - Before applying #100091, the same suite fails **2/5** in Turbopack dev
      on this branch: a non-200 asset and the preload assertion.
      - `pages-app-availability-boundary` and `app-document-import-order`: **3
      pass, 1 existing skip** in Turbopack dev. The upstream gated
      deduplication assertion remains unchanged.
      - `pnpm build-all --env-mode=loose`, `cargo check -p next-api`, `cargo
      fmt -p next-api --check`, scoped Prettier and ESLint pass. The initial
      full bootstrap ran out of sandbox disk during native compilation; after
      clearing disposable artifacts and passing the Cargo environment through
      Turbo, the full build passed.
      
      Earlier verification, before adding #100091, also covered the #99910
      suites in Turbopack start and webpack dev. The new LTS backport has not
      been tested locally in deploy mode, on other platforms, or with full
      workspace type-checking; CI will provide that coverage.
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet 652922cb-dc34-493d-9be5-c241a5164cad -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
      9458fb99
    • Luke Sandberg's avatar
      [lts-active] turbo-tasks snapshot consistency fixes (#99644, #99732, #99649) (#100002) · eb85307e
      Luke Sandberg authored
      ## Summary
      
      Backports three snapshot-consistency fixes to `releases/lts/active`, in
      canary order:
      
      - #99644 turbo-tasks: bincode-encode copy-on-write snapshots instead of
      cloning
      - #99732 turbo-tasks: disable persisting after a failed snapshot
      - #99649 turbo-tasks: copy tasks on their first modification during a
      snapshot
      
      16.4.0 can persist inconsistent task state when a mutation races a
      background snapshot. The main case is #99649. A task that is meta-dirty
      and data-clean when the snapshot starts, then writes data before meta,
      has its live (post-mutation) meta persisted. One example is an
      invalidated task that re-runs while an idle snapshot is writing.
      `children` and `parent_count` are both meta, so the cache on disk can
      list a child edge without the child's matching `parent_count`. `next
      dev` doesn't persist on shutdown, so the next session restores that
      state. When the parent later drops the edge, the server aborts with
      `parent_count underflow: decremented below the number of persistent
      parents`. We have one report of this from a 16.4.0 dev run.
      
      The cherry-picks apply without conflicts. The six touched files are
      identical to `canary` at #99649.
      
      ## Verification
      
      - `cargo test -p turbo-tasks-backend --lib` on this branch: 119 passed.
      This includes #99649's regression test
      `modify_other_category_first_during_snapshot_preserves_snapshot_meta`
      and #99732's `failed_persist_disables_persisting`.
      - Locally on macOS this needed
      `CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=cc` and `RUSTFLAGS` set to the
      repo's shared flags without `--icf=all`. The branch's pinned
      `nightly-2026-08-20` ships a `rust-lld` that can't read the current
      macOS SDK's `.tbd` files. This is unrelated to the change, and CI uses
      its normal config.
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
      Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
      Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
      eb85307e
    • next-js-bot[bot]'s avatar
      v16.4.1 · 7217011a
      next-js-bot[bot] authored
      7217011a
    • Sebastian Sebbie Silbermann's avatar
      1798e42b
    • Sebastian "Sebbie" Silbermann's avatar
    • Sebastian "Sebbie" Silbermann's avatar
  3. 13 Oct, 2026 1 commit
  4. 12 Oct, 2026 1 commit
  5. 06 Oct, 2026 23 commits
    • next-js-bot[bot]'s avatar
      v16.4.0 · e273d5b2
      next-js-bot[bot] authored
      e273d5b2
    • Jan Kassens's avatar
      [ai-upgrade] discover upgrade models and reasoning efforts from agent CLIs (#99736) · fdf41d6f
      Jan Kassens authored
      The world of AI is moving fast. Instead of hardcoding the available
      models, discover them from the CLIs. This is a bit hacky, but probably
      more reliable than hardcoding a list that will become outdated fast. The
      available models might be different for different accounts.
      
      This involved a bit of code moving as I wanted to have the model
      discovery run in parallel to displaying the user the harness selection
      to reduce delay in selecting the model.
      
      ## Test Plan:
      In addition to new tests, also tested interactively with:
      ```
      DEBUG=next:upgrade node -e \
        "require('./packages/next/dist/lib/upgrade/harness').handoffUpgrade('This is a harness test. Do not modify files.', process.cwd(), null).catch(console.error)"
      ```
      fdf41d6f
    • next-js-bot[bot]'s avatar
      v16.4.0-canary.63 · c3e76ad9
      next-js-bot[bot] authored
      c3e76ad9
    • Will Binns-Smith's avatar
      Document next analyze export in the package bundling guide (#99735) · 47c6cc8d
      Will Binns-Smith authored
      ## Summary
      
      Document `next analyze export` with a snapshot capture/export example
      and a link to its CLI options.
      
      ## Verification
      
      - Prettier and ESLint passed.
      - Runtime tests not run (docs only).
      
      <!-- NEXT_JS_LLM -->
      47c6cc8d
    • Andrew Clark's avatar
      Revert stabilization of `forbidden()` and `unauthorized()` (#99734) · 5b106049
      Andrew Clark authored
      Stabilizing `forbidden()` and `unauthorized()` means the built-in 403
      and 401 fallbacks are rendered into every page's payload, even for apps
      that don't define `forbidden.tsx` or `unauthorized.tsx`. On a fresh
      create-next-app that's about 2.3KB of uncompressed HTML per page (~125
      bytes gzipped).
      
      I knew about the regression but I forgot that it applied to every app
      and every page, rather than just those that use `forbidden.tsx` or
      `unauthorized.tsx`. To avoid blocking the 16.4 release, we'll keep this
      feature in experimental for now until we fix the implementation to
      render the fallbacks lazily.
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      5b106049
    • Josh Story's avatar
      Preserve configured output directories during static export (#99507) · f3a6f976
      Josh Story authored
      ## Summary
      
      Static export with a custom `distDir` currently overwrites that option
      with `.next` during the build. Keep the configured export destination
      intact and derive the intermediate build directory separately, so
      adapters receive the original option while their build-directory
      argument still points to the artifacts.
      
      This removes a post-load config mutation as part of making completed
      configuration immutable for adapters and other runtime consumers.
      Preserve support for both relative and absolute Turbopack project output
      paths.
      
      ## Verification
      
      - Existing adapter tests pass in both production bundlers; custom
      export-directory coverage passes with Turbopack.
      - Existing server trace suite passes with Turbopack: six tests and five
      snapshots.
      - Existing Rust API suite passes its 25 main cases and 15 snapshots in
      each bundler. Its RSS stabilization stress case fails locally on both
      this branch and unmodified canary.
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarJamiboy Mohammad <jamiboym@gmail.com>
      f3a6f976
    • Will Binns-Smith's avatar
      Rename skill to next-bundle-optimizer and document its usage (#99731) · b22e5a29
      Will Binns-Smith authored
      ## Summary
      
      Rename `next-browser-initial-load-optimizer` to `next-bundle-optimizer`
      and update the skill directory, metadata, links, and install commands.
      
      Document how to use the skill with Turbopack's bundle analyzer, with
      prompts for audits, fixes, and route-specific optimization.
      
      ## Verification
      
      - Prettier passed for the skill and both guides.
      - Runtime tests not run (docs and skill rename only).
      
      <!-- NEXT_JS_LLM -->
      b22e5a29
    • Tobias Koppers's avatar
      [turbo-tasks-backend] Clean up task state before publishing execution completion (#99729) · 74dc549c
      Tobias Koppers authored
      ## What?
      
      Task completion now cleans up the task's per-execution state (removing
      cells that no longer exist, `cleanup_after_execution`) under the same
      task lock that finishes the execution, before the completion is
      published (in-progress state removed, `done_event` notified).
      
      Previously the cleanup ran afterwards, under a second lock acquisition.
      A waiter could invalidate the task in that gap and its next execution
      could start. The old cleanup would then remove that execution's state,
      e.g. the `outdated_*_dependencies` it was just given, and could also
      remove cells it had created.
      
      ## Why?
      
      `collectibles_outdated_dependency` fails locally on canary (5/5 runs
      here) and passes in CI only by timing. Tracing showed the old cleanup
      observing the next collector execution already running with populated
      `outdated_collectibles_dependencies`, then clearing them. Later
      collectible emissions then made the waiting collector stale, so it
      executed an extra time. The optimization from #99386 assumes that
      bookkeeping is intact.
      
      There is a second, independent reason the test can see an extra
      execution: `State::set` invalidates its readers one at a time. The
      collector can then read the source before the source was invalidated,
      see the old collectibles, and legitimately re-execute when the new ones
      arrive.
      
      ## How?
      
      - `task_execution_completed_cleanup` now takes the held `TaskGuard`.
      `task_execution_completed_finish` calls it after setting output and
      immutability, before dropping the guard and notifying `done_event`. The
      canceled path still cleans up, and stale reschedules (including
      `verify_determinism` reruns) still skip cleanup, as before. Removed cell
      data is still dropped outside the critical section.
      - Tests:
      - The existing test is unchanged. Its docs now say it is
      timing-dependent and also covers this cleanup race.
      - A new gated variant stages the overlap explicitly: the collector waits
      until the new emitter execution has started, polls its strongly
      consistent source read to `Pending`, and only then lets the emitter
      emit. This deterministically covers the dirty-not-stale optimization,
      independent of `State` invalidation order.
      
      ## Verification
      
      - With the fix: both tests pass 30/30 locally, and `cargo test -p
      turbo-tasks-backend` passes.
      - Mutant (always stale on collectible change): the gated test fails
      10/10.
      - Known limitation: there is no deterministic regression for the cleanup
      race itself without a backend test hook. With canary's ordering
      restored, the ungated test failed intermittently, between 0/20 and 8/20
      depending on test layout and invocation. The fix was confirmed by
      tracing and by an experiment that widened the old gap.
      - Clippy (default and `verify_serialization,print_cache_item_size`), a
      `verify_determinism` check, and `cargo test -p turbo-tasks-macros-tests`
      pass.
      
      <!-- NEXT_JS_LLM -->
      
      
      <!-- fleet 98a896e8-00fa-4f81-97f0-48bd49e2a9a2 -->
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
      Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
      74dc549c
    • next-js-bot[bot]'s avatar
      v16.4.0-canary.62 · ccf8c15a
      next-js-bot[bot] authored
      ccf8c15a
    • Aurora Scharff's avatar
      Improve static route error guidance (#99724) · b8c7c7f2
      Aurora Scharff authored
      ## Summary
      
      - explain that request-time work conflicts with the route's static
      requirement without repeating “fully static”
      - align the overlay explanations, build messages, and error pages for
      route body, `generateMetadata()`, and `generateViewport()` errors
      - replace the cookie-specific runtime-data card with short browser-data
      pseudocode while preserving its existing docs anchor
      - update the affected build-output snapshots
      
      ## Verification
      
      - `pnpm jest
      packages/next/src/next-devtools/dev-overlay/components/instant/instant-guidance-data.test.ts`
      - formatted and linted all changed source, test, and MDX files
      - Not run: full package build (the isolated worktree reused an older
      dependency install that does not include the latest
      `@base-ui-components/react` packages)
      
      <!-- NEXT_JS_LLM -->
      b8c7c7f2
    • Aurora Scharff's avatar
      docs: add Turbopack experimental config references (#99723) · 81bdd9cb
      Aurora Scharff authored
      ## Summary
      
      - add API references for `turbopackGc`, `turbopackLazyDynamicImports`,
      `turbopackLazyDynamicImportsSSR`, and `turbopackPluginRuntimeStrategy`
      - document each option’s defaults, supported values, runtime behavior,
      and relevant limitations
      - cross-link related Turbopack configuration options
      
      ## Verification
      
      - Verified configuration types and defaults against the current config
      source and Turbopack tests
      - `pnpm prettier --with-node-modules --ignore-path .prettierignore
      --check <new-docs>`
      - `npx eslint --config eslint.config.mjs --fix <new-docs>`
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
      81bdd9cb
    • Jiwon Choi's avatar
      Show choices for agent upgrade prompt (#99727) · fd9c5e93
      Jiwon Choi authored
      show choice for upgrade prompt
      
      | Before | After |
      | --- | --- |
      | <img
      src="https://github.com/devjiwonchoi/next.js/raw/604a56efdcbf2ead22d16c3098ae695eaff7558b/before.png"
      alt="Upgrade prompts before: answered prompts show only the question,
      hint and a blank gap" width="480"> | <img
      src="https://github.com/devjiwonchoi/next.js/raw/604a56efdcbf2ead22d16c3098ae695eaff7558b/after.png"
      alt="Upgrade prompts after: each answered prompt shows the confirmed
      choice" width="480"> |
      fd9c5e93
    • Aurora Scharff's avatar
      docs: add Keeping pages static guide and align the navigation stage docs (#99493) · 3fff1aef
      Aurora Scharff authored
      ## Summary
      
      - add a **Keeping pages static** guide that applies `ensureStatic =
      'shell'`, `'prefetch'`, and `'navigation'` to a store, then works
      through the validation errors and fixes in development
      - expand **Optimizing prefetching** around the App Shell, per-link
      prefetch, and navigation stages, including how `prefetch()` and
      `navigation()` defer cached work
      - align the `ensureStatic`, `instant`, `prefetch()`, and `navigation()`
      references with the guide and clarify how `instant = false` affects
      validation
      - document blocking generation for complete static output in the Cache
      Components ISR guide and update the related migration cross-links
      - add reusable docs-diagram tooling and the uploaded light and dark
      `ensure-static-visual` and `navigation-stage-visual` assets
      
      This PR is stacked on #97801. #99355 has merged.
      
      The Client fix cards, build-output category, and
      `#read-the-data-on-the-client` anchors used by the guide depend on
      #99659 and should land first.
      
      ## Verification
      
      - Prettier and ESLint passed for the latest documentation changes
      through the pre-commit checks
      - `bash -n .agents/skills/docs-diagrams/scripts/render.sh`
      - guide error ordering and route output were checked against development
      and build output
      
      <!-- NEXT_JS_LLM -->
      
      ---------
      Co-authored-by: 's avatarClaude Fable 5.1 <noreply@anthropic.com>
      3fff1aef
    • Benjamin Woodruff ‮'s avatar
      Turbopack: Check the invalidator map before adding a path to a batch (#99711) · 6bcde44e
      Benjamin Woodruff authored
      We don't need to add a file path to a batch and extend the batch
      deadline if the path isn't contained in the invalidator map.
      
      Prevents us from getting logspam like this:
      
      ```
      Turbopack has seen frequent file updates and is waiting for the filesystem to settle (0.5s elapsed so far; last modified: "/Users/bgw/v0/chat/.next/dev/server/next-font-manifest.js").
      ```
      
      This is much less critical with the non-recursive watcher codepath, as
      we're only watching paths we might care about, but keeping it around in
      both cases helps ensure we get some CI coverage of this. I could put it
      behind `#[cfg(debug_assert)]` for non-recursive mode, IDK.
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
      6bcde44e
    • Aurora Scharff's avatar
      docs: add guide for optimizing the static shell (#97737) · 7c16cc9f
      Aurora Scharff authored
      ## What?
      
      Adds an **Optimizing the static shell** guide that follows one team
      settings route through focused Suspense boundaries, deferred
      authentication, cache-versus-stream decisions, loading-state reuse,
      shared layouts, and parallel routes.
      
      Updates `next-cache-components-optimizer` to use that guide and the
      canonical Insight pages as its framework source of truth. The original
      phase-based Skill workflow is preserved, including the production rig,
      exact test contract, trustworthy RED-to-GREEN loop, parity check,
      differential, and reporting. Reusable implementation guidance now links
      to the corresponding guide section instead of being duplicated in
      Skill-only references.
      
      Clarifies that the optimizer can target either a direct page load or a
      named client navigation. Both use the same App Shell patterns and
      `instant()` verification loop. When the destination App Shell is already
      instant and the goal is to include additional URL-specific content
      before a click, the Skill hands off to the Partial Prefetching
      optimizer.
      
      Aligns the Cache Components and Partial Prefetching optimizers around
      the same workflow: define the contract, reuse the production rig, prove
      current behavior, make the smallest optimization, verify and ship. Their
      framework-specific decisions remain separate. The Partial Prefetching
      adoption rig also receives the shared visible, committed DOM-marker rule
      because it uses the same `instant()` testing API.
      
      ## Why?
      
      The optimizer's framework patterns are useful outside the agent
      workflow. Keeping them in public docs gives developers and agents one
      source of truth while each Skill stays focused on its product decision
      and reliable production verification.
      
      ## Eval
      
      The corrected-contract comparison uses Claude Opus 4.8 and Claude Sonnet
      4.5 with a fixed Claude Haiku 4.5 judge. It compares the baseline,
      bundled guide, production Skill from `canary`, and proposed local Skill.
      The bundled-guide and Skill treatments use a local Next.js tarball
      containing the new guide.
      
      The eval now contains 11 granular checks so product behavior, test
      quality, and workflow discipline are visible independently. They cover
      configuration, direct and client-navigation `instant()` coverage, exact
      shell markers, preserved data sources, reusable and request-time UI
      placement, all completed-route variants, viewer-cookie behavior,
      trustworthy RED, full-suite GREEN, and the bounded differential. The
      prompt names the Aurora, Nebula, unknown-release, and viewer-cookie
      parity cases explicitly.
      
      All eight treatments were rerun against this 11-check rubric.
      
      | Model | Treatment | Checks passed | Overall | Duration | Tokens
      processed | Total run cost | Cost change |
      | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
      | Opus 4.8 | Baseline | 9/11 | Fail | 26m 38s | 4.83M | $4.66 | — |
      | Opus 4.8 | Bundled guide | 8/11 | Fail | 36m 36s | 4.99M | $5.29 |
      +13.5% |
      | Opus 4.8 | Production Skill | 9/11 | Fail | 28m 20s | 3.25M | $3.35 |
      -28.0% |
      | Opus 4.8 | Proposed Skill | **11/11** | **Pass** | 32m 9s | 5.25M |
      $5.24 | +12.5% |
      | Sonnet 4.5 | Baseline | 8/11 | Fail | 22m 31s | 2.73M | $1.29 | — |
      | Sonnet 4.5 | Bundled guide | 8/11 | Fail | 17m 58s | 2.38M | $1.18 |
      -8.1% |
      | Sonnet 4.5 | Production Skill | 4/11 | Fail | 27m 18s | 2.94M | $1.38
      | +7.3% |
      | Sonnet 4.5 | Proposed Skill | 4/11 | Fail | 25m 26s | 5.49M | $2.53 |
      +96.1% |
      
      Token totals count each unique model message once and include uncached
      input, cache creation, cache reads, and output. Total run cost applies
      the current AI Gateway base rates to each token category. Judge cost is
      excluded.
      
      The eight runs processed 31.87M tokens and cost $24.91 in total,
      excluding the judge. This is one run per model and treatment, so the
      comparison is descriptive rather than a stable pass-rate measurement.
      
      The proposed Opus Skill is the only treatment to pass every check.
      Baseline and production Skill each passed 9/11, but both skipped the
      bounded differential. Baseline also missed the viewer-cookie timing
      lock. Production Skill omitted exact loading-state coverage. The
      guide-only treatment implemented the product behavior but missed an
      exact selector, trustworthy RED, and the differential.
      
      The proposed Sonnet Skill preserved the exact `instant()` contract, but
      replaced the existing runtime file read with a build-time import. It
      then stopped using the documented production command, encountered port
      conflicts from starting another Playwright server lifecycle, and never
      completed parity, GREEN, or a valid differential. This is a model
      adherence failure rather than a sandbox or credential failure. It shows
      that the restored workflow is sufficient for Opus but still too easy for
      Sonnet to abandon after it encounters test friction.
      
      ## Verification
      
      - Local Next.js build passed.
      - Prettier, TypeScript, ESLint through the commit hook, Alex, and diff
      checks passed.
      - Documentation link validation passed in CI.
      - All eight treatments finalized against the current 11-check rubric.
      7c16cc9f
    • Jiwon Choi's avatar
      22f8122a
    • Aurora Scharff's avatar
      docs: use auth interruption APIs in examples (#99698) · b4a4c055
      Aurora Scharff authored
      ## Summary
      
      - Replace generic `Unauthorized` and `Forbidden` errors with the stable
      `unauthorized()` and `forbidden()` APIs across the mutating data, forms,
      Server Actions, data security, and `use server` documentation.
      - Distinguish unauthenticated requests from authenticated users who lack
      permission in the security examples.
      - Link to the API references and explain that the functions render the
      matching fallback files.
      
      This PR is stacked on #99696, which adds the complete pattern to the
      error-handling guide.
      
      ## Verification
      
      - `pnpm prettier --with-node-modules --ignore-path .prettierignore
      --write docs/01-app/01-getting-started/07-mutating-data.mdx
      docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx
      docs/01-app/02-guides/server-actions.mdx
      docs/01-app/03-api-reference/01-directives/use-server.mdx`
      - `pnpm exec eslint --config eslint.config.mjs --fix
      docs/01-app/01-getting-started/07-mutating-data.mdx
      docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx
      docs/01-app/02-guides/server-actions.mdx
      docs/01-app/03-api-reference/01-directives/use-server.mdx`
      - `NO_UPDATE_NOTIFIER=1 pnpm exec alex
      docs/01-app/01-getting-started/07-mutating-data.mdx
      docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx
      docs/01-app/02-guides/server-actions.mdx
      docs/01-app/03-api-reference/01-directives/use-server.mdx --quiet`
      - Not run: framework tests (documentation-only change)
      
      <!-- NEXT_JS_LLM -->
      b4a4c055
    • Aurora Scharff's avatar
      docs: recommend auth interruption APIs in error handling (#99696) · 8051552d
      Aurora Scharff authored
      ## Summary
      
      - Recommend `unauthorized()` for unauthenticated requests and
      `forbidden()` for authenticated users without access.
      - Add `Suspense` boundaries around the request-time reads in the
      existing `notFound()` example and the new authentication example so both
      patterns work with Cache Components.
      - Add corresponding `unauthorized` and `forbidden` fallback UI examples
      and clarify when to use `redirect()` for sign-in flows.
      - Document eager fallback rendering consistently across the `error.js`,
      `not-found.js`, `unauthorized.js`, and `forbidden.js` references, with
      links between the related conventions.
      
      This builds on #99689, which stabilizes the authentication interruption
      APIs.
      
      ## Verification
      
      - `pnpm prettier --with-node-modules --ignore-path .prettierignore
      --write docs/01-app/01-getting-started/10-error-handling.mdx
      docs/01-app/03-api-reference/03-file-conventions/error.mdx
      docs/01-app/03-api-reference/03-file-conventions/not-found.mdx
      docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx
      docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx`
      - `pnpm exec eslint --config eslint.config.mjs --fix
      docs/01-app/01-getting-started/10-error-handling.mdx
      docs/01-app/03-api-reference/03-file-conventions/error.mdx
      docs/01-app/03-api-reference/03-file-conventions/not-found.mdx
      docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx
      docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx`
      - `NO_UPDATE_NOTIFIER=1 pnpm exec alex
      docs/01-app/01-getting-started/10-error-handling.mdx
      docs/01-app/03-api-reference/03-file-conventions/error.mdx
      docs/01-app/03-api-reference/03-file-conventions/not-found.mdx
      docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx
      docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx
      --quiet`
      - Not run: framework tests (documentation-only change)
      
      <!-- NEXT_JS_LLM -->
      8051552d
    • Benjamin Woodruff ‮'s avatar
    • Will Binns-Smith's avatar
      Bundle Analyzer Agent Skill: Trace conditional async and worker chunk loading (#99174) · 8619c015
      Will Binns-Smith authored
      ## Summary
      
      Make the bundle analyzer explain how emitted chunks can load other
      chunks. This gives the initial-load optimizer skill the relationships it
      needs to distinguish startup code from conditionally loaded code and
      trace why a dependency is reachable.
      
      - Export typed load relationships for dynamic imports, async manifests,
      and service-worker registration.
      - Tie async triggers to the actual dynamically imported module.
      - Preserve unresolved relationships and worker modules compiled in
      separate graphs so missing data is not mistaken for “nothing loads.”
      
      This builds on the preceding branch’s client chunk groups and
      machine-readable graph export. The relationships describe possible loads
      at build time; browser measurements are still needed to establish what
      actually loads initially.
      
      ## Verification
      
      - Previously reported: Next.js package no-emit types passed.
      - Native dev/prod analyzer e2e and a full Rust build were not run
      locally due to sandbox disk capacity. Current-head CI must validate
      them; earlier-head results do not verify this stack.
      - Analyzer graph-dump and snapshot-selection unit suites were removed
      earlier in the stack. Their malformed-data, stream, collision,
      packaging, and mocked-history/path coverage has no replacement.
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet d7bdbc2b-b0bc-4591-99eb-dccb0fa49c73 -->
      
      <!-- fleet ea768377-d71c-4a15-90b2-f4d50d4f6a1c -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      8619c015
    • Will Binns-Smith's avatar
      Bundle Analyzer Agent Skill: Show route chunk groups (#99170) · d6d83cfd
      Will Binns-Smith authored
      ## Summary
      
      This PR exposes **chunk groups**: sets of generated client files that
      the build associates with a route's client entry or with client
      components and layouts used by that route. They show how files relate to
      route code, beyond which modules ended up in any one file.
      
      When a route's client output is large, the groups help an agent narrow
      which related files and code to inspect. A file can appear in more than
      one group, and layout groups can include files from multiple levels.
      Groups do **not** show when a browser requests a file or how many bytes
      one component added; overlapping groups must not be added together as
      independent file sets.
      
      ## Verification
      
      - The broad graph-dump converter unit suite is removed in the root and
      not reintroduced here; existing e2e and producer code are unchanged. The
      snapshot-selection unit suite is removed too, without replacement tests;
      its targeted mocked-history/path coverage is intentionally dropped.
      Neither analyzer unit suite remains; Next package no-emit types pass.
      Unique removed edge-case coverage was explicitly accepted.
      - Earlier stack verification included Rust analyzer tests, analyzer e2e
      and a full build; these are historical results, not validation of the
      new signed heads. **New-head CI is pending.**
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet d7bdbc2b-b0bc-4591-99eb-dccb0fa49c73 -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      d6d83cfd
    • Will Binns-Smith's avatar
      Bundle Analyzer Agent Skill: Show modules in generated JS/CSS files (#99173) · 8eabe35e
      Will Binns-Smith authored
      ## Summary
      
      Before this PR, an agent could see a route's generated files and follow
      imports to find modules relevant to that route. It could not reliably
      tell **which exact modules landed in a particular JavaScript or CSS
      file**. This PR adds that per-file mapping, so an agent can trace a
      large generated file back to the modules it contains.
      
      Files that cannot be mapped are marked as such rather than shown as
      empty. The graph checks the module information before reporting a match.
      
      ## Verification
      
      - The broad graph-dump converter unit suite is removed in the root and
      not reintroduced here; existing e2e and producer code are unchanged. The
      snapshot-selection unit suite is removed too, without replacement tests;
      its targeted mocked-history/path coverage is intentionally dropped.
      Neither analyzer unit suite remains; Next package no-emit types pass.
      Unique removed edge-case coverage was explicitly accepted.
      - Earlier stack verification included Rust analyzer tests, analyzer e2e
      and a full build; these are historical results, not validation of the
      new signed heads. **New-head CI is pending.**
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet d7bdbc2b-b0bc-4591-99eb-dccb0fa49c73 -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      8eabe35e
    • Will Binns-Smith's avatar
      Bundle Analyzer Agent Skill: Expose more route details in analyze data (#99172) · 8d3606c1
      Will Binns-Smith authored
      ## Summary
      
      Export typed App, Pages and API endpoint roots and nested client
      references from analyzer route provenance into JSON Lines
      `route.entries`. Keep server/shared roles separate from verified client
      bootstrap identities: a client reference is not another endpoint or
      evidence of an observed initial request. Preserve UI binary artifacts
      internally while agents consume semantic records.
      
      ## Verification
      
      - This layer: root TypeScript and converter unit 5/5; targeted Rust
      analyzer tests 3/3. Completed stack: analyzer e2e 7/7 (App, Pages, API),
      full build 18/18. New-head CI pending.
      
      <!-- NEXT_JS_LLM -->
      
      <!-- fleet d7bdbc2b-b0bc-4591-99eb-dccb0fa49c73 -->
      
      <!-- fleet ea768377-d71c-4a15-90b2-f4d50d4f6a1c -->
      
      ---------
      Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
      Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
      8d3606c1