Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .omo/evidence/20260723-awaited-network-timers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Awaited network timer QA evidence

## What was tested

- `npm test` built the current branch and ran the complete repository test suite.
- `node --test --test-timeout 60000 dist/tests/network/fetch.spec.js` ran the seven focused retry, timeout, abort, and error-normalization tests.
- `manual-runtime.json` records a direct call to the built `networkFetch` implementation. A synthetic first request returned HTTP 503, the awaited 20 ms retry delay elapsed, and the second request returned 200. A separate never-resolving fetch was aborted by the awaited 20 ms timeout.

## What was observed

- Full suite: 145 tests passed, 0 failed, 0 cancelled, exit code 0. Exact output: `full-suite.txt`.
- Focused suite: 7 tests passed, 0 failed, 0 cancelled, exit code 0. Exact output: `focused-tests.txt`.
- Manual runtime: retry completed after 44 ms with two calls and status 200; timeout completed after 22 ms with `network_timeout`. Exact structured output: `manual-runtime.json`.
- Before the fix, the same full suite consistently cancelled all seven network tests with `cancelledByParent` and `Promise resolution is still pending but the event loop has already resolved`.

## Why it is enough

The focused tests cover the network API contract, the full suite covers repository regressions, and the direct built-runtime exercise proves that both awaited timer paths keep the Node process alive until their promises settle.

## What was omitted

No credentials, request headers, environment dumps, or external network traffic were used. The manual runtime used local synthetic fetch implementations only.
53 changes: 53 additions & 0 deletions .omo/evidence/20260723-awaited-network-timers/focused-tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
TAP version 13
# Subtest: networkFetch retries retryable status responses and then succeeds
ok 1 - networkFetch retries retryable status responses and then succeeds
---
duration_ms: 2.439708
type: 'test'
...
# Subtest: networkFetch uses retry-after when calculating retry delay
ok 2 - networkFetch uses retry-after when calculating retry delay
---
duration_ms: 0.060416
type: 'test'
...
# Subtest: networkFetch caps retry-after delays with maxDelayMs
ok 3 - networkFetch caps retry-after delays with maxDelayMs
---
duration_ms: 0.030167
type: 'test'
...
# Subtest: networkFetch normalizes DNS and reset errors
ok 4 - networkFetch normalizes DNS and reset errors
---
duration_ms: 0.075833
type: 'test'
...
# Subtest: networkFetch times out requests
ok 5 - networkFetch times out requests
---
duration_ms: 1.483667
type: 'test'
...
# Subtest: networkFetch honors init.signal abort reasons without options.signal
ok 6 - networkFetch honors init.signal abort reasons without options.signal
---
duration_ms: 0.29525
type: 'test'
...
# Subtest: networkFetch preserves parent NetworkFetchError reasons passed through options.signal
ok 7 - networkFetch preserves parent NetworkFetchError reasons passed through options.signal
---
duration_ms: 0.206041
type: 'test'
...
1..7
# tests 7
# suites 0
# pass 7
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 96.512417
focused_exit=0
Loading