Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v26.x-staging #66914 +/- ##
=================================================
+ Coverage 90.24% 90.75% +0.51%
=================================================
Files 729 775 +46
Lines 242760 273391 +30631
Branches 46044 52520 +6476
=================================================
+ Hits 219073 248117 +29044
- Misses 15133 16144 +1011
- Partials 8554 9130 +576
🚀 New features to boost your workflow:
|
This reverts commit f81a148. A parked TransformStream write was resumed from the read that lifted the backpressure, so transform(), the writes queued behind it and flush() ran in the reader's async context instead of the writer's, losing AsyncLocalStorage state. The parked write error test is kept, as it covers spec behavior that still holds after the revert. Refs: nodejs#65625 Refs: nodejs#66906 Signed-off-by: Matteo Collina <hello@matteocollina.com>
This reverts commit 9ec9383. Resolving a parked write from the readable side ran the first parked transform() in the reader's async context. Conflicts with later commits are resolved by keeping their state record classes and the kParkedAlgorithmResult check used by ReadableStream.from(). Refs: nodejs#65143 Refs: nodejs#66906 Signed-off-by: Matteo Collina <hello@matteocollina.com>
mcollina
force-pushed
the
revert-webstreams-parked-write-v26.x
branch
from
October 22, 2026 15:50
ac998a5 to
2463b52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts the two commits that moved parked
TransformStreamwrites off the[[backpressureChangePromise]]reaction, which regressedAsyncLocalStoragepropagation intotransform()/flush()(#66906):transform()for every chunk after a parked write, andflush(), run in the reader's context.transform()runs in the reader's context.Conflicts with later commits are resolved by keeping their state record classes (
TransformStreamStatenow carriesbackpressureChangeagain), thekParkedAlgorithmResulthandling still used byReadableStream.from(), and thekResolvedPromiseimport used byresolvedStartAlgorithm(3c9f878).test-whatwg-transformstream-parked-write-error.jsis kept: it covers spec behavior and passes on the reverted code. Thepipe-throughbenchmark is kept too.Verified locally on this branch:
The regression test from #66907 passes in both modes; whatwg/webstream tests, WPT streams, async-local-storage and async-hooks suites pass.
Alternative: #66915 (draft) backports the fix from #66907 instead, with a promise fallback for
--no-async-context-frame. Only one of the two should land.Refs: #66906
Refs: #66907
Refs: #66913
🤖 Generated with Claude Code
https://claude.ai/code/session_01LGUJ9PwPYkYJiCpUEsr7KJ