Fix overlapping replay slots after a prerender abort #37850

Merged
gnoff opened 5:38pm on October 14, 2026 wanted to merge 82 Ξ” into facebook/react main from
jstory/fizz-overlapping-postpones

Pull Request Overview

  • Opened on October 14, 2026
  • Status Merged
  • Commit count 1 with first commit October 14, 2026

Total Delta

82 Total Diff Delta

Open Days

Open 23 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
Set up deploy tracking to begin tracking full PR start-to-deploy times

Total time for pull request 0.0 business days from first commit authored to merge
Deploy tracking has not been set up

Author avatar

Fix overlapping replay slots after a prerender abort

Summary

A prerender can abort during a retry after the retried task has spawned a suspended child. Abort cleanup records a replay slot for the whole task, then tries to record a child slot at the same key path. Resuming the parent already renders that child, so the existing assertion turns a resumable abort into a prerender error. This surfaced after the abort unwind change in #37710.

Keep the parent slot and ignore the redundant child slot. The regression test verifies that both children render after resuming.

How did you test this change?



  • yarn test ReactDOMFizzStaticBrowser --runInBand (36 passed)


  • yarn test ReactDOMFizzStaticBrowser --prod --runInBand (36 passed)

  • yarn linc

  • node scripts/prettier/index.js check-changed

Comments Threads Pending Resolution

packages/react-server/src/ReactFizzServer.js
4197
          slots = resumableNode[3] = {} as {[index: number]: number};
4198
        } else if (typeof slots === 'number') {
4199
          // The parent task was aborted after it spawned this child task.
4200
          // Resuming the parent also renders this child, so its slot is redundant.
4201
          return;

Resolved Comment Threads

No resolved comments have been left on this PR.