| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #57867 +/- ##
========================================
Coverage 90.23% 90.24%
========================================
Files 630 630
Lines 185518 185726 +208
Branches 36369 36410 +41
========================================
+ Hits 167401 167604 +203
+ Misses 11005 10999 -6
- Partials 7112 7123 +11
... and 36 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
| const duration = Date.now() - start; | ||
|
|
||
| // Verify the timeout happened at approximately the right time (with some margin) | ||
| assert.ok(duration >= 8900, `Timeout happened too early: ${duration}ms`); | ||
| assert.ok(duration < 11000, `Timeout happened too late: ${duration}ms`); |
There was a problem hiding this comment.
Do we really need this?
Can't we validate the reason is a timeout signal?
Sorry, something went wrong.
There was a problem hiding this comment.
Updated, does it look better?
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: #57867 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
The relevant bug was fixed upstream: nodejs/node#57867
`AbortSignal.any([caller, AbortSignal.timeout(ms)])` has a history of dropping the timeout: the composed signal can be collected while the request is in flight, so the deadline never fires and the request hangs — the exact failure the deadline exists to prevent (nodejs/node#57736, fixed by nodejs/node#57867). Raising the package's Node floor would fix it, but that is a breaking constraint on every consumer to work around an implementation detail. Wiring the controller by hand behaves identically on every supported version, and lets the timer be cleared once the request settles rather than leaving one pending per request for its full timeout. The body read moved inside the deadline too — headers can arrive promptly while the body stalls. Also from review: - Docs: `--session` is cloud-only, so the flag table says so. - Docs: the isolation wording implied `storageMode: 'readonly'` removed project-file interaction. It stops *writes*; the session still reads the same shared files. Split into what is and is not isolated. - Docs: the sessions example called `getNotebook` without importing it, and passed the optional `sessionNotebookId` where a string is required — neither would have compiled if copied. - Tests: the pending-fetch helper now rejects immediately for an already-aborted signal, as real fetch does. Added cases for timer cleanup on both the success and failure paths, and for an already-aborted caller signal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Fixes #57736
This PR fixes an issue where AbortSignal.any([AbortSignal.timeout(ms)]) would sometimes fail. The problem occurred because timeout signals inside a composite signal (created by AbortSignal.any()) were being garbage collected before they could fire.
I don't know how to make a simpler test for this honestly. Open to suggestions.
I used the following test to check for memory leaks. I assume that it works because when I initially made a mistake trying to fix this, it did cause a memory leak and it was reflected in this test:
After:
Before: