Skip to content

[WIP] The Great Streams Consolidation of 2026#6706

Draft
jasnell wants to merge 78 commits intojasnell/streams-updates-jsvaluesfrom
jasnell/the-great-streams-consolidation-of-2026
Draft

[WIP] The Great Streams Consolidation of 2026#6706
jasnell wants to merge 78 commits intojasnell/streams-updates-jsvaluesfrom
jasnell/the-great-streams-consolidation-of-2026

Conversation

@jasnell
Copy link
Copy Markdown
Collaborator

@jasnell jasnell commented Apr 30, 2026

Things are happening...

hoodmane and others added 22 commits April 29, 2026 21:21
To fix test failures due to warning about node 20 EOL
EW-6888 Improve finishScheduled() outcome reporting
Some packages rely on this behavior. I also want to use it in
workers-runtime-sdk to implement entropy hooks.
Fix typo in Python snapshot generation workflow
… IO thread.

The WebSocket::AutoResponse struct holds a bare kj::Promise<void>
(ongoingAutoResponse) directly on the JS heap. When V8's GC collects a
WebSocketPair, the destructor chain reaches this promise under
DISALLOW_KJ_IO_DESTRUCTORS_SCOPE, and if the promise holds a real async node (a
ForkBranch from ws.send().fork()), destroying it triggers a fatal "KJ async
object being destroyed when not allowed" error (Sentry 37914510). The fix wraps
the promise in kj::Maybe<IoOwn<kj::Promise<void>>> so that destruction is
deferred to the IoContext's delete queue, following the same pattern already
used by outgoingMessages.
ServiceWorkerGlobalScope::connect was dropping the CONNECT authority when
constructing the ingress Socket, causing both socket.opened.remoteAddress
and socket.opened.localAddress to resolve to undefined on the connect
handler side. Plumb a localAddress parameter through Socket/setupSocket
and forward the host parameter into it so JS callers see the exact
authority string that was passed to fetcher.connect(...).

From the handler's perspective the CONNECT authority is the local address
on this side of the tunnel (the address the peer asked to connect to),
not the remote address, so populate localAddress rather than
remoteAddress. Outbound sockets continue to populate remoteAddress as
before; localAddress remains empty for outbound since we have no useful
value to expose.

Extend the existing connect-handler-test with a localAddressViaServiceBinding
case that asserts strict equality between the authority passed to
fetcher.connect(...) and the localAddress observed on the server side.
In preparation to disable them in the future.
Tidy up python build script before 314 upgrade
…ddress

fix: populate localAddress on connect handler Socket
…onse

Websockets: Wrap the ongoingAutoResponse so it gets destructed on the…
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

This comment was marked as resolved.

@codspeed-hq

This comment was marked as outdated.

@codecov-commenter

This comment was marked as outdated.

@jasnell jasnell force-pushed the jasnell/the-great-streams-consolidation-of-2026 branch from cc01824 to d60a0aa Compare May 1, 2026 23:16
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.

9 participants