Skip to content

fix: handle scheduled roots during async batch rebasing - #18676

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/svelte-18675-batch-scheduled-roots
Draft

fix: handle scheduled roots during async batch rebasing#18676
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/svelte-18675-batch-scheduled-roots

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor

Fixes #18675.

When one async batch commits, another batch can legitimately already have roots scheduled for a later flush. Batch rebasing incorrectly treated this as an invariant violation and could eagerly traverse work that was already scheduled.

Record whether the target batch already has scheduled work before marking rebase dependencies, and only eagerly traverse roots newly created by that marking when no flush is already pending.

Adds a runtime-runes regression covering a branch mounted after initial render with $effect.pending(), an awaited each block, bind:this, and a second awaited expression.

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of svelte from 3abb714:

pnpm add https://pkg.svelte.dev/svelte/c/3abb714b260f432dda4e57125b9eba012fb1c04f

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/svelte/pr/18676

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3abb714

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

0 participants