Skip to content

stream: update iterable streams to use budget backpressure#64464

Open
jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:jasnell/iter-streams-backpressure-new
Open

stream: update iterable streams to use budget backpressure#64464
jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:jasnell/iter-streams-backpressure-new

Conversation

@jasnell

@jasnell jasnell commented Jul 13, 2026

Copy link
Copy Markdown
Member

WinterTC55/iter-streams#23 updated the backpressure model in the iterable streams specification to use a byte-budget model. This PR updates the implementation to match.

Signed-off-by: James M Snell jasnell@gmail.com
Assisted-by: Opencode/Opus

@jasnell
jasnell requested review from mcollina and trivikr July 13, 2026 00:27
@jasnell jasnell added stream Issues and PRs related to the stream subsystem. experimental Issues and PRs related to experimental features. labels Jul 13, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic
  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 13, 2026
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.54054% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.15%. Comparing base (4bec191) to head (efe85ee).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/streams/iter/share.js 77.04% 14 Missing ⚠️
lib/internal/streams/iter/broadcast.js 93.33% 3 Missing ⚠️
lib/internal/streams/iter/classic.js 66.66% 1 Missing and 1 partial ⚠️
lib/internal/streams/iter/push.js 96.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64464      +/-   ##
==========================================
+ Coverage   90.13%   90.15%   +0.02%     
==========================================
  Files         741      741              
  Lines      242106   242152      +46     
  Branches    45551    45562      +11     
==========================================
+ Hits       218211   218313     +102     
+ Misses      15430    15357      -73     
- Partials     8465     8482      +17     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)
lib/internal/quic/state.js 100.00% <100.00%> (ø)
lib/internal/streams/iter/duplex.js 96.35% <100.00%> (ø)
lib/internal/streams/iter/pull.js 84.12% <100.00%> (+0.25%) ⬆️
lib/internal/streams/iter/utils.js 98.22% <100.00%> (-0.06%) ⬇️
lib/internal/streams/iter/classic.js 89.31% <66.66%> (-0.02%) ⬇️
lib/internal/streams/iter/push.js 90.92% <96.66%> (-0.26%) ⬇️
lib/internal/streams/iter/broadcast.js 86.24% <93.33%> (+0.24%) ⬆️
lib/internal/streams/iter/share.js 85.31% <77.04%> (+0.31%) ⬆️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread doc/api/stream_iter.md Outdated
Comment thread lib/internal/streams/iter/push.js
Comment thread lib/internal/streams/iter/push.js
Comment thread lib/internal/streams/iter/broadcast.js Outdated
Comment thread lib/internal/streams/iter/push.js Outdated
Comment thread lib/internal/streams/iter/utils.js Outdated
@jasnell
jasnell force-pushed the jasnell/iter-streams-backpressure-new branch from 939e46e to 9ae61ff Compare July 20, 2026 22:31
@jasnell
jasnell requested a review from pimterry July 20, 2026 22:34
@nodejs-github-bot

This comment was marked as outdated.

@jasnell
jasnell force-pushed the jasnell/iter-streams-backpressure-new branch from 9ae61ff to c55171f Compare July 20, 2026 22:48
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

jasnell added 2 commits July 21, 2026 06:29
Updates the implementation to use the updated backpressure
model that landed here: WinterTC55/iter-streams#23

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
@jasnell
jasnell force-pushed the jasnell/iter-streams-backpressure-new branch from c55171f to efe85ee Compare July 21, 2026 13:31
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Labels

experimental Issues and PRs related to experimental features. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants