GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — vfs: fix promises.watch() with an already-aborted signal by trivikr · Pull Request #66254 · nodejs/node

Conversation

@trivikr

@trivikr trivikr commented Sep 24, 2026

Copy link
Copy Markdown
Member

Fixes: #66253

fs.promises.watch() over a virtual mount resolved the first next() with { done: true } when the signal was already aborted, while native fs.promises.watch() rejects with ABORT_ERR.

Buffer the AbortError in VFSWatchAsyncIterable so the first next() rejects once and later calls behave like an exhausted iterator, matching the native async generator. Concurrently pending next() calls now resolve after the rejecting one instead of all rejecting.


Assisted-by: opencode

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trivikr
vfs: fix promises.watch() with an already-aborted signal
ebc1f19
fs.promises.watch() over a virtual mount resolved the first next()
with { done: true } when the signal was already aborted, while native
fs.promises.watch() rejects with ABORT_ERR.

Buffer the AbortError in VFSWatchAsyncIterable so the first next()
rejects once and later calls behave like an exhausted iterator,
matching the native async generator. Concurrently pending next()
calls now resolve after the rejecting one instead of all rejecting.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: opencode
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Sep 24, 2026
@trivikr trivikr 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 Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (a2c8da5) to head (ebc1f19).
⚠️ Report is 568 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/vfs/watcher.js 76.47% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66254   +/-   ##
=======================================
  Coverage   90.28%   90.28%           
=======================================
  Files         789      789           
  Lines      272878   272893   +15     
  Branches    52097    52102    +5     
=======================================
+ Hits       246360   246380   +20     
+ Misses      16975    16973    -2     
+ Partials     9543     9540    -3     
Files with missing lines Coverage Δ
lib/internal/vfs/watcher.js 94.74% <76.47%> (-0.47%) ⬇️

... and 25 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr 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 Sep 27, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77987/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr
trivikr requested a review from mcollina October 19, 2026 02:22
@trivikr

trivikr commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

cc @mcollina Can you take a look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Oct 22, 2026
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 22, 2026
@trivikr trivikr added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Oct 22, 2026
@nodejs-github-bot
nodejs-github-bot merged commit fcb1aa8 into nodejs:main Oct 22, 2026
87 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Landed in fcb1aa8

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 22, 2026
@aduh95 aduh95 mentioned this pull request Oct 27, 2026
2026-10-28, Version 27.0.0-alpha.0.0.0 (Alpha) #67062
Merged
@LiviaMedeiros LiviaMedeiros mentioned this pull request Nov 3, 2026
vfs: place value before done in iterator result #67231
Closed
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@trivikr @aduh95
vfs: fix promises.watch() with an already-aborted signal
4956a1f
fs.promises.watch() over a virtual mount resolved the first next()
with { done: true } when the signal was already aborted, while native
fs.promises.watch() rejects with ABORT_ERR.

Buffer the AbortError in VFSWatchAsyncIterable so the first next()
rejects once and later calls behave like an exhausted iterator,
matching the native async generator. Concurrently pending next()
calls now resolve after the rejecting one instead of all rejecting.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: opencode
PR-URL: #66254
Fixes: #66253
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@trivikr @gabylb
vfs: fix promises.watch() with an already-aborted signal
4d20f13
fs.promises.watch() over a virtual mount resolved the first next()
with { done: true } when the signal was already aborted, while native
fs.promises.watch() rejects with ABORT_ERR.

Buffer the AbortError in VFSWatchAsyncIterable so the first next()
rejects once and later calls behave like an exhausted iterator,
matching the native async generator. Concurrently pending next()
calls now resolve after the rejecting one instead of all rejecting.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: opencode
PR-URL: nodejs#66254
Fixes: nodejs#66253
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

vfs: promises.watch() resolves { done: true } instead of rejecting with a pre-aborted signal

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@trivikr @nodejs-github-bot @mcollina
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.