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 — fix(cache): do not report aborted on successful cache hits by Yahiro025 · Pull Request #5819 · nodejs/undici

Conversation

@Yahiro025

@Yahiro025 Yahiro025 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

This relates to...

Fixes #5818

Rationale

A successful cache hit was reporting controller.aborted === true in onResponseEnd() because controller.aborted aliased stream.destroyed, and Readable streams are destroyed after a normal end.

Changes

Bug Fixes

  • Track abort with an explicit flag set only in abort(), so successful cache hits report aborted === false while real cancellations still report true.

Features

N/A

Breaking Changes and Deprecations

N/A

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested
  • Benchmarked (optional)
  • Documented
  • Review ready
  • In review
  • Merge ready

Test plan

  • Added issue repro + abort-path check in test/interceptors/cache.js
  • test/interceptors/cache.js (95 tests) and npm run test:cache-interceptor passed

AI disclosure

I used Cursor to help draft the fix and tests. I reviewed the diff and verified the regression coverage before opening this PR.

Sorry, something went wrong.

Uh oh!

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

All reactions
@cursoragent
fix(cache): do not report aborted on successful cache hits
0e97333
The cache interceptor treated stream.destroyed as aborted, so
onResponseEnd saw aborted=true after a normal cache hit. Track abort
with an explicit flag set only in abort().
mcollina
mcollina approved these changes Sep 14, 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
@codecov-commenter

codecov-commenter commented Sep 14, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.53%. Comparing base (bda8113) to head (0e97333).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5819      +/-   ##
==========================================
+ Coverage   93.51%   93.53%   +0.02%     
==========================================
  Files         110      110              
  Lines       39573    39576       +3     
==========================================
+ Hits        37006    37017      +11     
+ Misses       2567     2559       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@mcollina
mcollina merged commit 65fd635 into nodejs:main Sep 15, 2026
38 checks passed

Uh oh!

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

This was referenced Sep 21, 2026
[Release] v8.11.0 #5848
Closed
[Release] v8.11.0 #5849
Merged
@domenic domenic mentioned this pull request Oct 4, 2026
fix(cache): preserve abort reasons after completion #5958
Merged
2 of 7 tasks
@mrityunjay-pandey mrityunjay-pandey mentioned this pull request Oct 16, 2026
[v7.x] fix(cache): do not report aborted on successful cache hits (#5819) #6037
Open
3 of 7 tasks
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

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Cache interceptor reports aborted=true during successful onResponseEnd

Uh oh!

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

4 participants

@Yahiro025 @codecov-commenter @mcollina @cursoragent
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.