What versions & operating system are you using?
@cloudflare/vitest-pool-workers 0.18.7, miniflare 4.20260721.0, workerd 1.20260721.1, vitest 4.1.8, Node 24, Linux (GitHub Actions ubuntu-22.04) and macOS.
Describe the Bug
When a test suite running under vitest-pool-workers makes real fetch() calls to external HTTPS endpoints, workerd repeatedly logs an internal exception with a full (unsymbolized) stack trace, even though every test passes:
exception = kj/compat/tls.c++:429: disconnected: peer disconnected without gracefully ending TLS session
stack: .../node_modules/@cloudflare/workerd-linux-64/bin/workerd@364fe50 .../bin/workerd@53d0120 ... (~18 frames)
This happens whenever the remote server or a load balancer closes an idle keepalive connection without sending a TLS close_notify — normal internet behavior that HTTP clients are expected to tolerate silently (undici, Bun, and Deno all discard the same event). No request is in flight on the connection, so nothing fails; it's purely log noise, but with the stack trace it dominates the output of an otherwise green run (10+ occurrences in a ~90s suite).
Real-world example (public CI log from the E2B JS SDK integration suite, all 393 tests passing): https://github.com/e2b-dev/E2B/actions/runs/30017080220/job/89239801004
There is no user-side hook to filter it: the pool installs its own handleStructuredLogs and spreads SHARED_MINIFLARE_OPTIONS into the final Miniflare options itself, so the miniflare key in the vitest config can't override log handling.
Expected behavior
The message is filtered like its siblings. ignoreMessages in packages/vitest-pool-workers/src/pool/index.ts already suppresses the equivalent non-TLS shapes — disconnected: operation canceled, disconnected: WebSocket peer disconnected, etc. — under the comment "this is normal operation and really shouldn't error". The TLS variant belongs in the same list:
"disconnected: peer disconnected without gracefully ending TLS session",
Please provide a link to a minimal reproduction
Any worker test that opens a TLS connection to a server that drops idle connections without close_notify reproduces it; the CI log linked above is a live example. I'll open a one-line PR adding the message to ignoreMessages.
What versions & operating system are you using?
@cloudflare/vitest-pool-workers0.18.7,miniflare4.20260721.0,workerd1.20260721.1, vitest 4.1.8, Node 24, Linux (GitHub Actionsubuntu-22.04) and macOS.Describe the Bug
When a test suite running under
vitest-pool-workersmakes realfetch()calls to external HTTPS endpoints, workerd repeatedly logs an internal exception with a full (unsymbolized) stack trace, even though every test passes:This happens whenever the remote server or a load balancer closes an idle keepalive connection without sending a TLS
close_notify— normal internet behavior that HTTP clients are expected to tolerate silently (undici, Bun, and Deno all discard the same event). No request is in flight on the connection, so nothing fails; it's purely log noise, but with the stack trace it dominates the output of an otherwise green run (10+ occurrences in a ~90s suite).Real-world example (public CI log from the E2B JS SDK integration suite, all 393 tests passing): https://github.com/e2b-dev/E2B/actions/runs/30017080220/job/89239801004
There is no user-side hook to filter it: the pool installs its own
handleStructuredLogsand spreadsSHARED_MINIFLARE_OPTIONSinto the final Miniflare options itself, so theminiflarekey in the vitest config can't override log handling.Expected behavior
The message is filtered like its siblings.
ignoreMessagesinpackages/vitest-pool-workers/src/pool/index.tsalready suppresses the equivalent non-TLS shapes —disconnected: operation canceled,disconnected: WebSocket peer disconnected, etc. — under the comment "this is normal operation and really shouldn't error". The TLS variant belongs in the same list:Please provide a link to a minimal reproduction
Any worker test that opens a TLS connection to a server that drops idle connections without
close_notifyreproduces it; the CI log linked above is a live example. I'll open a one-line PR adding the message toignoreMessages.