Skip to content

fix(network): keep awaited retry timers alive - #441

Open
zhengdaqi wants to merge 1 commit into
mainfrom
codex/fix-awaited-network-timers
Open

fix(network): keep awaited retry timers alive#441
zhengdaqi wants to merge 1 commit into
mainfrom
codex/fix-awaited-network-timers

Conversation

@zhengdaqi

Copy link
Copy Markdown
Collaborator

Summary

Keep retry delays and request timeout timers referenced while networkFetch is awaiting them. The current main branch unreferences those timers, allowing Node to exit with pending promises and cancelling all seven network tests.

Changes

  • Remove unref() from request timeout timers and both retry-delay timer paths.
  • Preserve the existing retry, timeout, and abort behavior; only the timer lifecycle changes.

QA & Evidence

  • What was tested: Complete npm test suite after building the branch.

  • Observed result: 145 passed, 0 failed, 0 cancelled; exit code 0.

  • Artifact: .omo/evidence/20260723-awaited-network-timers/full-suite.txt

  • Why sufficient: Covers repository-wide regressions and proves the seven previously cancelled network tests now complete.

  • What was tested: Focused networkFetch test file.

  • Observed result: 7 passed, 0 failed, 0 cancelled; exit code 0.

  • Artifact: .omo/evidence/20260723-awaited-network-timers/focused-tests.txt

  • Why 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_timeout after 22 ms.

  • Artifact: .omo/evidence/20260723-awaited-network-timers/manual-runtime.json

  • Why 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant