[DO NOT MERGE] feat(sdk): clients target the authoritative server; registry collisions; players dedupe - #1523
Draft
cyaiox wants to merge 1 commit into
Draft
[DO NOT MERGE] feat(sdk): clients target the authoritative server; registry collisions; players dedupe#1523cyaiox wants to merge 1 commit into
cyaiox wants to merge 1 commit into
Conversation
…ns reported; players helper deduped Phase 4 of the authoritative-server network refactor — retiring the P2P-era wire topology: - clients emit CRDT, REQ_CRDT_STATE, and room CUSTOM_EVENTs targeted [authoritative-server] instead of broadcasting to every peer (the O(N²)→O(N) client-traffic fix, #10); the server's room fan-out stays broadcast until AOI; pre-role sends fall back to broadcast, by design and documented - registerMessages reports re-registration of an existing key and enforces the reserved '~sdk/' prefix (skipped, reported) — via console.error because the scene runtime console has no warn (#12) - players helper: one instance per engine via a WeakMap memo shared by the public API and addSyncTransport (removes the duplicate per-frame diff system and double-fired callbacks); the diff loop itself is now mark-and-sweep in both directions, fixing a real join-miss when one player joined and another left in the same frame - docs/network-peer-visibility.md: measured evidence for the two deferred defects — #11 needs a host roster or a wire-level broadcast-except-X primitive (the headless server provably cannot know its silent peers); #13 needs a component-wide change subscription in @dcl/ecs (local same-frame create+delete collapses at flush; the wire path notifies per message, so only the subscription shape blocks it) Red suite final state: 11 of 13 defects fixed and green; #11 and #13 stay pinned it.failing with deferral notes. Wire goldens byte-identical. Claude-Session: https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
Deploying js-sdk-toolchain with
|
| Latest commit: |
d4dd9e7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2bfd47e9.js-sdk-toolchain.pages.dev |
| Branch Preview URL: | https://stack-06-topology.js-sdk-toolchain.pages.dev |
This was referenced Aug 5, 2026
Draft
Contributor
Test this pull request
|
This was referenced Aug 5, 2026
cyaiox
marked this pull request as draft
August 5, 2026 14:25
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.
Phase 4 of the authoritative-server network refactor — retiring the
P2P-era wire topology:
[authoritative-server] instead of broadcasting to every peer (the
O(N²)→O(N) client-traffic fix, fix: get dcl export working #10); the server's room fan-out stays
broadcast until AOI; pre-role sends fall back to broadcast, by
design and documented
enforces the reserved '~sdk/' prefix (skipped, reported) — via
console.error because the scene runtime console has no warn (fix @dcl/kernel and @dcl/unity-renderer dependencies version #12)
the public API and addSyncTransport (removes the duplicate per-frame
diff system and double-fired callbacks); the diff loop itself is now
mark-and-sweep in both directions, fixing a real join-miss when one
player joined and another left in the same frame
deferred defects — feat: add to copy images in setup export #11 needs a host roster or a wire-level
broadcast-except-X primitive (the headless server provably cannot
know its silent peers); fix: recursive export, now it ignores the files specified in .dclignore #13 needs a component-wide change
subscription in @dcl/ecs (local same-frame create+delete collapses
at flush; the wire path notifies per message, so only the
subscription shape blocks it)
Red suite final state: 11 of 13 defects fixed and green; #11 and #13
stay pinned it.failing with deferral notes. Wire goldens byte-identical.
Claude-Session: https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kzo6zwrn1CA79S4RN1dgsU
📚 Stack (splits #1505 — merge top-down within each stack)
Network layer (each PR is one self-contained, independently-green commit):
sdk-commands (independent of the stack above):
After a parent squash-merges, the child needs
git rebase --onto origin/auth-server <old-parent> <child>— ping the session and it gets restacked.