Skip to content

Keep Iterate extensions as one minimal patch on Cap’n Web 0.12.0 - #9

Merged
jonastemplestein merged 0 commit into
mainfrom
fork-tidy
Sep 24, 2026
Merged

jonastemplestein merged 0 commit into
mainfrom
fork-tidy

Conversation

@jonastemplestein

@jonastemplestein jonastemplestein commented Sep 24, 2026 •

Copy link
Copy Markdown

Keep Iterate's WebSocket upgrade and onCall extensions as one commit directly on vanilla capnweb@0.12.0 (7702075d4122e6808512ee50acc591310b77da7a). The release-relative patch is 26 files, +2,372 / −46, including tests, documentation, and scoped publishing. Runtime changes are confined to six files (+806 / −30); 613 lines are the new WebSocket module.

Scope

  • Serialize WebSocket upgrade Responses using existing RPC streams. Preserve upgradeWebSocketResponse, portable WebSocketPair, native Workers upgrades, close propagation, queued-frame draining, copied binary buffers, listener isolation, and single-transfer ownership. Binary events contain exactly-sized ArrayBuffers.
  • Carry runtime-independent onCall through promise pipelining. Enforce one synchronous invocation and release arguments or results when a wrapper fails.
  • Keep one three-line stream timing guard: zero-duration samples must not make the flow-control window NaN and permanently block writes. A focused regression fails without it; the unmodified upstream browser suite also reproduces the problem.
  • Keep upstream types, validator, and other RPC/stream behavior. Add focused feature tests, concise fork documentation, package identity, and minimal workflow changes for fork CI and tag-triggered scoped npm publication. Cloudflare-only workflows retain owner guards.

Claude Opus 5.5 implemented this reduction with xhigh reasoning following the earlier upstream issues, discussions, and remote-branch review. Package version remains 0.12.2 with a pending patch changeset.

Validation

  • Library build and type tests passed; 1,469 Vitest tests + 16 Bun tests passed across Node, workerd, Chromium, Firefox, WebKit, and Bun.
  • Installed the packed candidate throughout iterate/iterate at latest main, 3802a1b28c6a89cfe78b6f12cfce873eaa61b092. OS production build and the entire monorepo type check passed.
  • 251 SDK tests, 7 CLI tunnel tests, 122 targeted unit/Workers tests, and ten relevant E2E files passed (67 passed, 3 existing expected failures, 5 deployment-only skips). Coverage includes Node-provider WebSocket upgrades, CLI tunnels, ingress routes, sockets surviving context resets, RPC values and lifetimes, reconnect/attach, connectors, secrets, sessions, and wire round trips.
  • Confirmed the consumer's installed ESM, CJS, and declarations match the final build. No consumer source changes were required; temporary package overrides were restored.

These are local workerd checks, not a production deployment. Package publication and the tag-triggered release workflow have not been exercised. Remaining forwarding and buffering limitations are documented in FORK.md.

History and adoption

Landed on main as fc68b9cf214ce8b0ab0ef8c3c4136934c27cad6c: exactly one commit above vanilla 0.12.0. The PR was reviewed against pristine upstream-0.12, then retargeted to main and marked merged when the reviewed commit landed. The former main is preserved at archive/main-before-0.12-20260924; upstream-0.12 remains pristine. Post-merge Test and Semgrep workflows passed.

@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/iterate/capnweb/@iterate-com/capnweb@9

commit: fc68b9c

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/websocket-streams.ts Outdated
@jonastemplestein jonastemplestein changed the title Reconcile published fork and harden RPC and WebSocket lifecycle Maintain Iterate fork as one commit on Cap’n Web 0.12.0 Sep 24, 2026
@jonastemplestein
jonastemplestein changed the base branch from main to upstream-0.12 September 24, 2026 14:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2da8299. Configure here.

Comment thread src/core.ts Outdated
@jonastemplestein jonastemplestein changed the title Maintain Iterate fork as one commit on Cap’n Web 0.12.0 Keep Iterate extensions as one minimal patch on Cap’n Web 0.12.0 Sep 24, 2026
@jonastemplestein
jonastemplestein changed the base branch from upstream-0.12 to main September 24, 2026 21:02
@jonastemplestein
jonastemplestein merged commit fc68b9c into main Sep 24, 2026
5 checks passed
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