-
Notifications
You must be signed in to change notification settings - Fork 113
Comparing changes
Open a pull request
base repository: cloudflare/capnweb
base: main
head repository: cloudflare/capnweb
compare: review-bug-fixes
- 10 commits
- 13 files changed
- 2 contributors
Commits on Feb 6, 2026
-
Refactor: RpcPayload.stubs -> hooks
Instead of storing an array of RpcStub, we now store an array of the underlying StubHooks. This will make it easier to add support for new types like streams, which aren't RpcStubs, but they will wrap / be wrapped in StubHooks.
Configuration menu - View commit details
-
Copy full SHA for 8cfa5b3 - Browse repository at this point
Copy the full SHA 8cfa5b3View commit details -
Add support for sending WritableStream over RPC.
(Flow control is left for a future commit.) Written using Claude+Opencode: https://share.opencode.cloudflare.dev/share/gJU0pT8p (I cleaned some stuff up manually.)
Configuration menu - View commit details
-
Copy full SHA for 965e1b8 - Browse repository at this point
Copy the full SHA 965e1b8View commit details -
Add support for sending a ReadableStream over RPC.
As described in protocol.md, the basic idea here is that whenever we want to send a ReadableStream, we first send a message to the other side creating a "pipe". We pump our ReadableStream to the pipe's WritableSteam end, and we deliver the pipe's ReadableStream end to the remote peer. This way, we can begin pushing bytes immediately upon sending a ReadableStream, without waiting for the remote end to call back asking for the bytes (which would be an unnecessary round trip). Written using Claude+Opencode: https://share.opencode.cloudflare.dev/share/ctbbBnOu
Configuration menu - View commit details
-
Copy full SHA for c83901f - Browse repository at this point
Copy the full SHA c83901fView commit details -
Implement backpressure for streams.
If more than 256kb of writes are in flight, we pause writes until past writes complete so that the number drops back below 256kb. Future commits will expand the window size. Written using Claude+Opencode: https://share.opencode.cloudflare.dev/share/D1bqkx2K This was not the best Claude session. I could probably have done it faster by hand.
Configuration menu - View commit details
-
Copy full SHA for 09e0201 - Browse repository at this point
Copy the full SHA 09e0201View commit details -
Optimization: Elide "pull" and "resolve" for streaming calls.
We add a new "stream" message to the protocol which skips these. See protocol.md for explanation. (Since this is only used for streams, which were just introduced in this PR, this is not a breaking change.) Written using Claude+Opencode: https://share.opencode.cloudflare.dev/share/OfY838e7
Configuration menu - View commit details
-
Copy full SHA for 885524e - Browse repository at this point
Copy the full SHA 885524eView commit details -
Configuration menu - View commit details
-
Copy full SHA for df03a6a - Browse repository at this point
Copy the full SHA df03a6aView commit details
Commits on Feb 7, 2026
-
Adaptively resize streaming windows.
With this change, we'll automatically update a stream's window size based on the observed bandwidth-delay product, in order to fully saturate the stream with minimal additional buffer bloat. The algorithm works by observing when each stream chunk is sent and acknowledged (via return from the RPC), allowing us to calculate: 1. Minimum round trip time. 2. Running average bandwidth over the last RTT. From that we calculate bandwidth-delay product and adjust the window to match. We actually set the window a bit bigger than the calculated BDP during startup (2x) and steady-state (1.25x) so that we can observe if the actual bandwidth is greater than expected, and thus update the window accordingly. I worked with Claude+Opencode to design the algorithm and implement, although I significantly refactored almost everything it wrote as the code was pretty meh: https://share.opencode.cloudflare.dev/share/rGV0SKLW
Configuration menu - View commit details
-
Copy full SHA for 8cb6a74 - Browse repository at this point
Copy the full SHA 8cb6a74View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef3f6e6 - Browse repository at this point
Copy the full SHA ef3f6e6View commit details
Commits on Feb 12, 2026
-
failing tests: blocked-write-lost-wakeup, readable-not-tracked-for-di…
…sposal blocked-write-lost-wakeup: windowResolver in createWritableStreamFromHook never settled when all pending writes error. Error handler (streams.ts:359) calls fc.onError() and sets pendingError but doesn't settle windowResolver. Write blocked on flow control window hangs forever. Affects await writer.write(), pipeTo(), and abort() (which waits for pending write per WritableStream spec). readable-not-tracked-for-disposal: Evaluator ['readable'] case (serialize.ts:565) doesn't push hook to this.hooks[]. Compare with ['writable'] case (line 553) which does. Disposed RpcPayload containing a ReadableStream won't cancel the stream. args-leak-on-throw (not tested): WritableStreamStubHook.call doesn't dispose args when getState() or path validation throws. Only triggers on peer misbehavior (disposed hook or malformed wire messages), not normal user actions. Skipped.
Configuration menu - View commit details
-
Copy full SHA for 1d8f4cd - Browse repository at this point
Copy the full SHA 1d8f4cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6656e3c - Browse repository at this point
Copy the full SHA 6656e3cView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...review-bug-fixes