fix(network): keep awaited retry timers alive - #441
Open
zhengdaqi wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Keep retry delays and request timeout timers referenced while
networkFetchis awaiting them. The currentmainbranch unreferences those timers, allowing Node to exit with pending promises and cancelling all seven network tests.Changes
unref()from request timeout timers and both retry-delay timer paths.QA & Evidence
What was tested: Complete
npm testsuite after building the branch.Observed result: 145 passed, 0 failed, 0 cancelled; exit code 0.
Artifact:
.omo/evidence/20260723-awaited-network-timers/full-suite.txtWhy sufficient: Covers repository-wide regressions and proves the seven previously cancelled network tests now complete.
What was tested: Focused
networkFetchtest file.Observed result: 7 passed, 0 failed, 0 cancelled; exit code 0.
Artifact:
.omo/evidence/20260723-awaited-network-timers/focused-tests.txtWhy sufficient: Covers retry status handling, retry-after caps, timeout, abort propagation, and error normalization.
What was tested: Direct calls to the built runtime with a synthetic 503-to-200 retry and a never-resolving fetch interrupted by timeout.
Observed result: Retry made two calls and returned 200 after 44 ms; timeout returned
network_timeoutafter 22 ms.Artifact:
.omo/evidence/20260723-awaited-network-timers/manual-runtime.jsonWhy sufficient: Proves the actual built timer paths keep the process alive until awaited promises settle.
Risks & Residuals
Referenced timers intentionally keep a process alive only while an in-flight request or retry is being awaited. Existing abort and timeout cleanup remains unchanged. No external network or credentials were used in QA.