fix(sync): harden terminal state races

This commit is contained in:
Timo
2026-09-01 03:34:01 +02:00
parent 77e7d0c103
commit bc5d1a0ea6
5 changed files with 55 additions and 10 deletions
+5 -3
View File
@@ -558,9 +558,11 @@ non-seeking state for `EPISODE_SYNC_V2_STABILITY_MS`.
Any timeout, failed player action, participant departure, manual media command,
room/target change, or explicit cancellation produces `cancel`; v2 never
executes after a timeout. Peers resume only when that transaction paused a
previously playing player and no newer local user action superseded it. Peers
joining after `start` are excluded from the frozen barrier and receive no v2
frames for that transaction.
previously playing player and no newer local or room action superseded it. A
superseding room command defines the next state without racing a restoration.
Peers joining after `start` are excluded from the frozen barrier and receive no
v2 frames for that transaction. Clients revalidate the complete prepared state
again immediately before applying `execute`.
Legacy episode events remain accepted. A new relay binds their PREPARE, EXECUTE,
and CANCEL to the accepted lobby initiator, limiting duplicate old-client wire