Skip to content

stream: fix stale byte stream queue size - #67499

Open
MattiasBuelens wants to merge 1 commit into
nodejs:mainfrom
MattiasBuelens:webstreams-byte-enqueue-stale-queue-size
Open

MattiasBuelens wants to merge 1 commit into
nodejs:mainfrom
MattiasBuelens:webstreams-byte-enqueue-stale-queue-size

Conversation

@MattiasBuelens

@MattiasBuelens MattiasBuelens commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Re-read the byte controller's queue size before filling each pending read request. A released BYOB reader can leave a partially filled pull-into descriptor that is enqueued while a default reader has multiple pending reads. Caching the queue size causes the loop to dequeue from an empty queue after fulfilling the first read request, which triggers an internal assertion error.

Add a regression test for one, two, and three pending reads and verify that any remaining queued bytes are preserved. (I'll also upstream this test to Web Platform Tests.)

Disclosure: code generated by AI (6.1 Sol via Codex), reviewed by me.

@MattiasBuelens MattiasBuelens added the web streams Issues and PRs related to the Web Streams API. label Nov 15, 2026
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 15, 2026
Re-read the byte controller's queue size before filling each pending
read request. A released BYOB reader can leave a partially filled
pull-into descriptor that is enqueued while a default reader has
multiple pending reads. Caching the queue size causes the loop to
dequeue from an empty queue after fulfilling the first read request.

Add a regression test for one, two, and three pending reads and verify
that any remaining queued bytes are preserved.

Signed-off-by: Mattias Buelens <mattias@buelens.com>
@MattiasBuelens
MattiasBuelens force-pushed the webstreams-byte-enqueue-stale-queue-size branch from 496e1e8 to 01f4238 Compare November 15, 2026 20:13
@MattiasBuelens MattiasBuelens added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 15, 2026
@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.66%. Comparing base (537a20c) to head (01f4238).
⚠️ Report is 88 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67499   +/-   ##
=======================================
  Coverage   90.66%   90.66%           
=======================================
  Files         799      799           
  Lines      280254   280243   -11     
  Branches    54122    54116    -6     
=======================================
- Hits       254091   254083    -8     
- Misses      16280    16281    +1     
+ Partials     9883     9879    -4     
Files with missing lines Coverage Δ
lib/internal/webstreams/readablestream.js 98.43% <100.00%> (+0.07%) ⬆️

... and 27 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.

@jasnell jasnell added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 15, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 16, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

nodejs-github-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

@jasnell
jasnell requested a review from mcollina November 18, 2026 12:11

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 19, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 19, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

   ⚠  Could not retrieve the email or name of the PR's author from user's GitHub profile!
   ✖  GitHub CI is still running

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
�[36m⠋�[39m Loading data for nodejs/node/pull/67499
�[36m⠋�[39m Loading data for nodejs/node/pull/67499
�[36m⠋�[39m Getting collaborator contacts from README of nodejs/node
�[36m⠋�[39m Getting PR from nodejs/node/pull/67499
�[36m⠋�[39m Getting reviews from nodejs/node/pull/67499
�[36m⠋�[39m Getting comments from nodejs/node/pull/67499
�[36m⠋�[39m Getting commits from nodejs/node/pull/67499
✔  Done loading data for nodejs/node/pull/67499
----------------------------------- PR info ------------------------------------
Title      stream: fix stale byte stream queue size (#67499)
   ⚠  Could not retrieve the email or name of the PR's author from user's GitHub profile!
Branch     MattiasBuelens:webstreams-byte-enqueue-stale-queue-size -> nodejs:main
Labels     author ready, needs-ci, commit-queue, web streams
Commits    1
 - stream: fix stale byte stream queue size
Committers 1
 - Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67499
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/67499
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 15 Nov 2026 20:03:07 GMT
   ✔  Approvals: 2
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/67499#pullrequestreview-5913627941
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/67499#pullrequestreview-5971385396
   ✖  GitHub CI is still running
   ℹ  Last Full PR CI on 2026-11-18T05:47:56Z: https://ci.nodejs.org/job/node-test-pull-request/79235/
�[36m⠙�[39m Querying data for job/node-test-pull-request/79235/
�[36m⠙�[39m Querying data for job/node-test-pull-request/79235/
�[36m⠙�[39m Querying API for job/node-test-pull-request/79235/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu

View workflow run

@jakecastelli jakecastelli removed the commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. label Nov 19, 2026
@jakecastelli

Copy link
Copy Markdown
Member

CI in progress is false report, probably need a manual land

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

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. web streams Issues and PRs related to the Web Streams API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants