Skip to content

feat(harness): forward-compat with engine.io WS packing + dive lever - #106

Merged
JohnMcLear merged 2 commits into
mainfrom
harness/engine-packing-client-patch
May 16, 2026
Merged

feat(harness): forward-compat with engine.io WS packing + dive lever#106
JohnMcLear merged 2 commits into
mainfrom
harness/engine-packing-client-patch

Conversation

@JohnMcLear

Copy link
Copy Markdown
Member

Two changes for ether/etherpad#7756 lever 8 / ether/etherpad#7772:

  1. engine.io-client patchsrc/sim/engine-packing-client-patch.ts monkey-patches the engine.io-client Transport prototype so onData detects payload-encoded frames (\x1e record separator) and routes through decodePayload. Single-packet frames keep the legacy path. Always-on; the separator is a safe discriminator (engine.io packet type bytes are '0'-'6' or empty for binary, JSON escapes raw \x1e to \u001e). Patches the pnpm-store path so all socket.io-client instances share the patched prototype.

  2. engine-packing matrix entry in .github/workflows/scaling-dive.yml — sets settings.enginePacking: true and runs the dive against the SUT. Requires core_ref=feat/engine-io-ws-packing.

48 tests still green. Build clean.

JohnMcLear and others added 2 commits May 16, 2026 06:38
ether/etherpad#7756 lever 8 prototype, harness side. Patches the
engine.io-client transport prototype to recognise WebSocket frames
that carry multiple engine.io packets joined by the record
separator (\\x1e, U+001E) — the same wire format the polling
transport already uses, now usable on WS when the server sets
settings.enginePacking.

A single-packet frame never legitimately contains the separator
(engine.io packet type bytes are '0'-'6' or empty for binary, and
JSON escapes raw \\x1e to ``), so the discriminator is
safe: legacy servers send single-packet frames and the patch falls
through to the original onData path.

Patches the pnpm-store path of engine.io-client@6.6.4 directly so
we touch the same module instance the bundled socket.io-client
uses (pnpm symlinks resolve to one module object). Idempotent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ether/etherpad#7756 lever 8. Sets settings.enginePacking=true via
sed-append so engine.io's WebSocket transport coalesces multi-packet
flushes into one payload-encoded frame (matching the polling
transport's wire format). Requires core_ref to include
feat/engine-io-ws-packing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@JohnMcLear
JohnMcLear merged commit 5036f0c into main May 16, 2026
4 checks passed
@JohnMcLear
JohnMcLear deleted the harness/engine-packing-client-patch branch May 16, 2026 05:41
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