Before submitting
Problem
Local pnpm test exits 1 with 36 cancelled tests and zero failed assertions: 26 in tests/inprocess-reviewer.test.ts and 10 in tests/rdd-status-line.test.ts. Both suites contain fixtures that await never-settling fakes raced against AbortSignal.timeout(). That API's timer is unreferenced, so once the microtask queue drains, Node exits the event loop while the test promise is still pending. The runner reports "Promise resolution is still pending but the event loop has already resolved", cancels that test, and then cancels every later test in the same file as a cascade. The first cancellations are the timeout test at tests/inprocess-reviewer.test.ts:274 and the never-settling reader test at tests/rdd-status-line.test.ts:169.
This is a fixture-liveness defect, not a production timeout problem: neither production path is asserted to misbehave. The smallest fix keeps a bounded referenced handle alive only while each never-settling fixture awaits its timeout, clearing it afterwards; an alternative is a Node-version-gated keepalive in scripts/run-test-suite.mjs.
Related but distinct from #1157, which describes the wall-clock deadline assertion cancelling rdd-status-line tests under load: these cancellations fire before any assertion runs, and inprocess-reviewer currently has no tracker for this class.
Steps to reproduce
On Node 22 (reproduced on v22.22.2), from a source checkout of current main:
node --experimental-strip-types --test tests/inprocess-reviewer.test.ts produces 10 pass / 0 fail / 26 cancelled.
node --experimental-strip-types --test tests/rdd-status-line.test.ts produces 8 pass / 0 fail / 10 cancelled.
- Full
pnpm test on main produced 3398 pass / 36 cancelled / 41 skipped / 0 failed assertions, with all 36 cancellations in the two files above.
CI is green on the same commits because .github/workflows/ci.yml pins Node 24, whose event loop keeps these timer-resolved promises alive.
Expected and actual behavior
Expected: the local suites complete (or fail with real assertion failures) on a supported Node version.
Actual: the runner cancels the first never-settling fixture test in each file with "Promise resolution is still pending but the event loop has already resolved", and every subsequent test in that file is cancelled as a cascade, making the full local suite permanently red on Node 22.
gentle-pi version
Source checkout of main at 80375c6 (package version 3.7.0); also reproduced at 758d2bb.
Pi version
0.87.1
Operating system
Linux
Relevant logs or error output (optional)
not ok 11 - inprocess reviewer refuses with TIMED_OUT when the completion exceeds its bound
---
duration_ms: ~
cancelledByParent: true
error: "Promise resolution is still pending but the event loop has already resolved."
...
Before submitting
Problem
Local
pnpm testexits 1 with 36 cancelled tests and zero failed assertions: 26 intests/inprocess-reviewer.test.tsand 10 intests/rdd-status-line.test.ts. Both suites contain fixtures that await never-settling fakes raced againstAbortSignal.timeout(). That API's timer is unreferenced, so once the microtask queue drains, Node exits the event loop while the test promise is still pending. The runner reports "Promise resolution is still pending but the event loop has already resolved", cancels that test, and then cancels every later test in the same file as a cascade. The first cancellations are the timeout test attests/inprocess-reviewer.test.ts:274and the never-settling reader test attests/rdd-status-line.test.ts:169.This is a fixture-liveness defect, not a production timeout problem: neither production path is asserted to misbehave. The smallest fix keeps a bounded referenced handle alive only while each never-settling fixture awaits its timeout, clearing it afterwards; an alternative is a Node-version-gated keepalive in
scripts/run-test-suite.mjs.Related but distinct from #1157, which describes the wall-clock deadline assertion cancelling rdd-status-line tests under load: these cancellations fire before any assertion runs, and
inprocess-reviewercurrently has no tracker for this class.Steps to reproduce
On Node 22 (reproduced on v22.22.2), from a source checkout of current
main:node --experimental-strip-types --test tests/inprocess-reviewer.test.tsproduces 10 pass / 0 fail / 26 cancelled.node --experimental-strip-types --test tests/rdd-status-line.test.tsproduces 8 pass / 0 fail / 10 cancelled.pnpm testonmainproduced 3398 pass / 36 cancelled / 41 skipped / 0 failed assertions, with all 36 cancellations in the two files above.CI is green on the same commits because
.github/workflows/ci.ymlpins Node 24, whose event loop keeps these timer-resolved promises alive.Expected and actual behavior
Expected: the local suites complete (or fail with real assertion failures) on a supported Node version.
Actual: the runner cancels the first never-settling fixture test in each file with "Promise resolution is still pending but the event loop has already resolved", and every subsequent test in that file is cancelled as a cascade, making the full local suite permanently red on Node 22.
gentle-pi version
Source checkout of
mainat 80375c6 (package version 3.7.0); also reproduced at 758d2bb.Pi version
0.87.1
Operating system
Linux
Relevant logs or error output (optional)