Skip to content

feat(conformance): add a PartyServer suite and record its results - #140

Merged
sinameraji merged 2 commits into
mainfrom
feat/partyserver-conformance
Nov 2, 2026
Merged

sinameraji merged 2 commits into
mainfrom
feat/partyserver-conformance

Conversation

@sinameraji

Copy link
Copy Markdown
Collaborator

Closes #130.

What

PartyServer was only ever tested by hand on celld during M0 (docs/conformance/m0-celld.md); it was not in the conformance suite and docs/conformance/results.md listed it as not covered. This adds it as a third suite and records the result.

  • packages/conformance/party-app/ — a partyserver 0.5.10 Server (Chat) with hibernate: true, plus a /cases surface. The checks exercise PartyServer's own plumbing rather than a hand-written Durable Object: getServerByName, this.name from ctx.id.name, onStart, this.sql, setAlarm/onAlarm, /parties/<namespace>/<room> routing, broadcast(), connection attachments, and hibernation.
  • Runner — a party suite (--suite core|agents|party|all) with two WebSocket checks: two connections to one room (welcome frames, broadcast to both, connection count, attachment, this.sql from a socket message), and hibernation (evicted with the socket open; the next message reaches a new instance with the attachment rehydrated). The hibernation check is skipped on Wrangler, which gives the runner no eviction control.
  • Native engine fix — partyserver reads WebSocket.READY_STATE_OPEN when it filters hibernatable sockets. workerd exposes both OPEN/CLOSED and READY_STATE_*; the native engine only had the short spellings, so every socket looked closed and broadcast()/getConnections() returned nothing. The global WebSocket now carries the READY_STATE_* constants, with a regression test.

Results (macOS arm64, Node 24.22.1)

Target Before After
Wrangler 4.150.0 17/17 21/21
celld 0.6.2 19/19 24/24
native 18/18 23/23 (also 23/23 with --native-threads 3)

PartyServer passes on all three targets, including hibernation on celld and the native engine. It has not been run on Cloudflare (the recorded Cloudflare run predates this suite) or through sobjects deploy/up; both are stated in the docs.

npm test passes (271 CLI tests, 13 conformance tests).

Docs

docs/conformance/results.md (new rows, counts, platform notes), docs/compatibility.md (PartyServer split out of the Agents SDK row), docs/native-engine.md (PartyServer row, WebSocket constants, conformance counts), packages/conformance/README.md, README.md, AGENTS.md.

sinameraji and others added 2 commits November 2, 2026 15:36
…ive engine

workerd's WebSocket has both OPEN/CLOSED and READY_STATE_* statics. The native engine only had the short spellings, so libraries that read WebSocket.READY_STATE_OPEN (PartyServer's connection manager, for one) saw undefined and treated every hibernatable socket as closed.

Co-authored-by: autopilot <kimiflare@proton.me>
Signed-off-by: Sina Meraji <sina.meraji@gmail.com>
PartyServer was only ever tested by hand on celld in M0. Add party-app/, a partyserver 0.5.10 Server with hibernation enabled, and a party suite in the runner: storage and addressing through getServerByName, alarms, /parties/chat/<room> routing, broadcast to two connections, connection attachments, and hibernation across idle eviction (celld and native; Wrangler's local runtime gives the runner no eviction control).

Wrangler 21/21, celld 24/24, native 23/23 (also 23/23 on three threads). Update the results table, compatibility table, native engine docs, README and AGENTS.md.

Co-authored-by: autopilot <kimiflare@proton.me>
Signed-off-by: Sina Meraji <sina.meraji@gmail.com>
@sinameraji
sinameraji marked this pull request as ready for review November 2, 2026 07:44
@sinameraji
sinameraji merged commit 0a3a3d5 into main Nov 2, 2026
2 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.

Conformance: PartyServer

1 participant