Repository navigation
feat(conformance): add a PartyServer suite and record its results - #140
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 2, 2026 07:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anddocs/conformance/results.mdlisted it as not covered. This adds it as a third suite and records the result.packages/conformance/party-app/— apartyserver0.5.10Server(Chat) withhibernate: true, plus a/casessurface. The checks exercise PartyServer's own plumbing rather than a hand-written Durable Object:getServerByName,this.namefromctx.id.name,onStart,this.sql,setAlarm/onAlarm,/parties/<namespace>/<room>routing,broadcast(), connection attachments, and hibernation.partysuite (--suite core|agents|party|all) with two WebSocket checks: two connections to one room (welcome frames, broadcast to both, connection count, attachment,this.sqlfrom 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.partyserverreadsWebSocket.READY_STATE_OPENwhen it filters hibernatable sockets. workerd exposes bothOPEN/CLOSEDandREADY_STATE_*; the native engine only had the short spellings, so every socket looked closed andbroadcast()/getConnections()returned nothing. The globalWebSocketnow carries theREADY_STATE_*constants, with a regression test.Results (macOS arm64, Node 24.22.1)
--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 testpasses (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.