Commit 5dd08e0
fix: heal missed Pulse peer discovery without widening LiveKit fan-out
Remote avatars intermittently disappear after teleporting to a World
and back to Genesis Plaza (and, per the 2026-08-05 recurrence, even
without teleporting, under archipelago fragmentation). The remote-avatar
pipeline is announcement-driven with no reconciliation loop: since the
Pulse integration (PR #7291), a peer is announced to an observer exactly
once per interest-set entry, and while Pulse is active LiveKit's
AnnounceProfileVersion broadcast is targeted only at wallets that
already announced to us. Any dropped, negated, or realm-raced Pulse
join therefore produces a permanently invisible peer -- there is no
client- or server-side membership reconciliation. (The filed v0.154/
v0.155 100%-repro mechanism, PR #9041's ForceRelease of Pulse-sourced
avatars on teleport, is already reverted at the pin; this addresses the
residual one-shot-discovery fragility class that still recurs.)
- LiveKitMessagesBroadcaster: while Pulse is active, fall back to an
untargeted AnnounceProfileVersion broadcast on the island+scene pipes
at a slow cadence (~10s) instead of only the targeted send, so any
peer whose Pulse join we missed self-heals over a LiveKit room we
demonstrably share. To avoid duplicating the Pulse movement/emote
stream room-wide, Send's recipient lists now skip any wallet with a
live PeerIdCache session -- recruitment into announcedWallets stays
unconditional, but effective fan-out composition for Pulse-live peers
is unchanged from HEAD.
- PulseMultiplayerBus.PlayerState: HandlePlayerLeft now ignores a leave
whose SubjectId no longer matches the wallet's current peer id (a
late/re-ordered leave for a superseded session), closing the window
where a stale leave deletes a freshly re-joined avatar.
- PeerIdCache: Remove/RemoveWhereNotInRealm only clear the wallet's
reverse mapping when it still points at the peer id being removed, so
a dangling forward entry from a re-join can't destroy the live
session's reverse lookup out from under the new guard.
- Thread PeerIdCache through PulseContainer -> MultiplayerContainer ->
LiveKitMultiplayerContainer so the broadcaster can filter by live
session.
Adversarial review (NEEDS-FIX) found the first pass's announce fallback
recruited every Pulse-active peer into announcedWallets within one
interval, turning targeted LiveKit movement/emotes into full-room
fan-out that duplicated the Pulse stream. This revision keeps the
fallback announce-only and filters Send by live PeerIdCache membership,
so only genuinely missing peers get materialized and fan-out
composition matches HEAD.
Add EditMode tests for the join-epoch guard (join/re-join/stale-leave
sequencing) and for the broadcaster's fallback-materializes /
send-path-excludes-live-session behavior.
Fixes #9337.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent df35da1 commit 5dd08e0
13 files changed
Lines changed: 335 additions & 32 deletions
File tree
- Explorer/Assets/DCL/Multiplayer
- Connections/Pulse
- Movement
- Systems
- Tests
- Profiles/BroadcastProfiles
- Tests
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
125 | | - | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
295 | 352 | | |
296 | 353 | | |
297 | 354 | | |
| |||
Lines changed: 57 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
45 | 69 | | |
46 | 70 | | |
47 | 71 | | |
| |||
54 | 78 | | |
55 | 79 | | |
56 | 80 | | |
57 | | - | |
| 81 | + | |
58 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
59 | 86 | | |
60 | 87 | | |
61 | 88 | | |
| |||
67 | 94 | | |
68 | 95 | | |
69 | 96 | | |
70 | | - | |
| 97 | + | |
71 | 98 | | |
72 | 99 | | |
73 | | - | |
| 100 | + | |
74 | 101 | | |
75 | 102 | | |
76 | 103 | | |
77 | 104 | | |
78 | | - | |
79 | | - | |
| 105 | + | |
80 | 106 | | |
| 107 | + | |
81 | 108 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
86 | 115 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
90 | 121 | | |
91 | | - | |
92 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
93 | 127 | | |
94 | 128 | | |
95 | 129 | | |
96 | 130 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
101 | 135 | | |
102 | 136 | | |
103 | 137 | | |
104 | 138 | | |
105 | | - | |
| 139 | + | |
106 | 140 | | |
| 141 | + | |
107 | 142 | | |
108 | 143 | | |
109 | 144 | | |
110 | 145 | | |
111 | 146 | | |
112 | | - | |
| 147 | + | |
113 | 148 | | |
114 | 149 | | |
115 | 150 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments