Repository navigation
docs: drop the world.ack running-maximum workaround - #47
Merged
Merged
Conversation
asobi v0.84.1 (widgrensit/asobi#479) makes world.ack monotonic per connection: asobi_player_session holds a last_ack_seq and drops any ack that does not advance it. The session is per WebSocket and dies with it, so the mark resets exactly when the client's counter does. Remove the client-side high-water filter the docs prescribed against the old per-zone mark, the claim that seq can go backwards, the per-zone ack explanation, and the widgrensit/asobi#477 reference. Reconciliation is now: drop every buffered input at or below ack.seq, then replay the rest. State the floor as asobi >= v0.84.1 rather than v0.84.0, which was superseded the same day. Also narrow the reserved `data` key to its v0.84.1 rule: only a payload whose sole key is `data` holding an object is unwrapped (deprecated); siblings are no longer dropped, and a non-object payload draws an invalid_payload error frame instead of being read as empty input.
Keep the bare v0.84.1 floor for ack monotonicity and drop the consequence clause: v0.84.0 servers do send acks, so "an older one sends nothing" was false. Revert the dispatcher comment to v0.84.0. It records when world.ack first appeared on the wire, which is provenance, not the monotonicity floor. Align WorldInputAsync with WsFrame: a non-object world.input payload draws an error frame with reason invalid_payload, uncorrelated because the frame carries no cid.
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.
asobi v0.84.1 (widgrensit/asobi#479) made
world.ackmonotonic per connection.asobi_player_sessionholds alast_ack_seqand drops any ack that does not advance it; the session is per WebSocket and dies with it, so the mark resets exactly when the client's counter does.The Unity docs told readers to keep a running maximum and ignore any ack that did not advance it, because until v0.84.1 the mark was recorded per zone and a crossing player could receive a lower
seqfrom the zone they left. That can no longer happen, so the workaround now defends against something the server guarantees against.Removed
payload.seqgoing backwards, and the instruction to keep a running maximum (README.md).widgrensit/asobi#477reference. The issue is closed.long _acked = -1high-water variable and itsif (ack.seq <= _acked) return;filter from the reconciliation sample.seq. The monotonic filter drops a non-advancing ack, so they do not.world.ackframes per broadcast" half of thebroadcast_intervalbullet.Reconciliation is now simply: drop every buffered input at or below
ack.seq, then replay the rest on top of the accumulated state.Version floor
The README bullet is a bare floor: Requires asobi core v0.84.1 or later. Nothing about what an older server does, because v0.84.0 does send acks; they can simply regress across a zone crossing.
The
AsobiDispatchercomment stays at v0.84.0. It records whenworld.ackfirst appeared on the wire, which is provenance, not the floor for the monotonicity guarantee.Reserved
datakeyNarrowed to its v0.84.1 rule wherever the docs mentioned it: only a payload whose sole key is
datamapped to an object is unwrapped (deprecated, removed at the next protocol break). Adataalongside other keys, or one whose value is not an object, is forwarded verbatim - siblings are no longer dropped. A payload that is not an object at all draws anerrorframe with reasoninvalid_payloadrather than being read as empty input, andWorldInputAsync's XML docs now tell that same story asWsFrameinstead of claiming the server cannot report a bad input at all.Kept, unchanged
The opt-in rule, the high-water-mark semantics, a rejected input still advancing the mark, the ack being addressed to one connection and never riding the shared
world.tick, theworld.tickdelta/accumulate guidance with itsa/u/rops, the full-snapshot-per-new-subscription and interest-ring behaviour, andbroadcast_intervaldefaulting to 3 with 1 giving an ack every tick.Docs and comments only - no behaviour change.
dotnet test Tests/AsobiCore.NET: 128 passed.