Skip to content

Rebase fork onto cloudflare/capnweb v0.11.1 - #6

Merged
jonastemplestein merged 0 commit into
mainfrom
rebase-0.11
Aug 18, 2026
Merged

Rebase fork onto cloudflare/capnweb v0.11.1#6
jonastemplestein merged 0 commit into
mainfrom
rebase-0.11

Conversation

@jonastemplestein

@jonastemplestein jonastemplestein commented Aug 17, 2026

Copy link
Copy Markdown

What this is

This rebases the iterate capnweb fork onto the latest cloudflare/capnweb main (7e864a8, v0.11.1 plus one unreleased fix). Our previous base was bc4bc45 (v0.10.0, 13 upstream commits behind).

Because this is a rebase, the branch shares no commits with the current main — GitHub will report merge conflicts, and that is expected. Do not merge via the UI. After approval, integrate with:

git push origin rebase-0.11:main --force-with-lease

(requires temporarily allowing force-push on main, or an admin push). The PR diff you see here is the full delta that lands on main: everything upstream shipped since our old base, plus our fork commits replayed on top.

What we pick up from upstream (0.10.0 → 0.11.1+)

Fork commits carried (in order, same six as the last rebase)

  1. Add support for sending WebSockets over RPC, as part of a fetch upgrade Response — the reason this fork exists (src/websocket-streams.ts + serialize.ts/core.ts integration).
  2. Add a prepare script so git dependencies get a build.
  3. Add a server-side per-call RPC hookRpcSessionOptions.onCall, used by iterate/iterate for ITX observability.
  4. Publish as @iterate-com/capnweb with pkg.pr.new and npm release CI — package rename, fork README banner, release workflows. README install snippet now references ^0.11.1.
  5. Sync package-lock name to @iterate-com/capnweb.
  6. Remove Cloudflare-internal CI workflows from the fork — Bonk + CLA assistant.

Per the standing fork policy, nothing else is carried (fallbackCall remains dropped).

Conflict resolutions

Commits 1–3 (all the code: WebSocket tunneling, prepare script, onCall) applied clean over upstream's changes — the URL-serialization and RpcPromise-alias work doesn't overlap the fork's regions. Three mechanical conflicts:

Verification

On the final tree (macOS, local):

  • npm run build — root + capnweb-validate clean, including the new ASCII-only dist gate.
  • npm run test:types — clean.
  • npm test (vitest: node, workerd, Chromium, Firefox, WebKit) — 1232/1234 pass. The 2 failures are both the known WebKit-only "applies backpressure when window fills up" flake under full parallel load on macOS (documented in the previous rebase PR Rebase fork onto cloudflare/capnweb v0.10.0 (drop fallbackCall) #5; reproduces on pristine upstream). It passes standalone in all 6 projects (npx vitest run -t "applies backpressure…" → 6/6).
  • npm run test:bun — 16/16 pass.

CI status on this PR

🤖 Generated with Claude Code


Note

Medium Risk
Touches core RPC serialization, session evaluation, and stream disposal across a large upstream jump; risk is mitigated by broad test runs, with only known WebKit backpressure flakes under full parallel load.

Overview
Rebases the @iterate-com/capnweb fork from upstream v0.10.0 to v0.11.1 (plus one unreleased fix), replaying six fork commits on top. Integration is a history rewrite—expect GitHub merge conflicts; land with git push origin rebase-0.11:main --force-with-lease, not a normal merge.

Upstream since 0.10.0: first-class URL over RPC; unified RpcPromise typing; WritableStream stub-call arg disposal on failure; ASCII-only dist/ gate via scripts/check-dist-ascii.mjs; removal of the ~1ms Node/Bun HTTP batch latency floor; capnweb-validate tolerates extra args and caps typescript as a dependency; docs and version packaging for 0.11.x.

Fork deltas retained: WebSocket tunneling for upgrade Response.webSocket (websocket-streams.ts + serialize/core); RpcSessionOptions.onCall for server-side per-call observability; prepare script for git installs; scoped package name, pkg.pr.new/release CI, README install at ^0.11.1; Cloudflare Bonk/CLA workflows removed.

Mechanical merges: fork package.json metadata with upstream 0.11.1 version; lockfile regenerated; deleted Bonk workflows stay deleted.

Reviewed by Cursor Bugbot for commit 51a87a1. Bugbot is set up for automated code reviews on this repo. Configure here.

@jonastemplestein

Copy link
Copy Markdown
Author

Integrated: refreshed onto today's upstream main (2de5871, one commit past the version this PR was opened with — cloudflare#241, the new StubHook arg-disposal contract; our onCall commit was re-threaded into the restructured ValueStubHook.call() including disposal of args when a handler throws before invoking) and force-pushed to main per the playbook. Full suite on the final tree: 406 Node + 192 workerd + browsers, 1330/1330, Bun 16/16. #7 is now a normal single-commit PR against main.

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.

1 participant