Repository navigation
Conversation
Port zero-swift's addMutationOutcomeListener as Zero::add_mutation_outcome_listener: the listener hears each mutation's server outcome once, as a MutationServerOutcome, including that of a mutation replayed after its server result settled with a ZeroError when the client gave up connecting. The listeners belong to the Zero, so they outlive a replaced client.
This branch has not been deployed
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.
tmm's decision 2(b): Swift's mutation-outcome listener, ported to Rust.
A mutation's
serverresult settles withZeroErrorwhen the client gives up connecting (disconnect_timeout_ms), yet the mutation is replayed after a reconnect. This listener hears its real outcome then, once per mutation, so an app has one place to show rejections. JS has no counterpart; this is Swift'saddMutationOutcomeListener.pushResponse, amutationsPatcherror, or lmid advancing). Theserverresult settles first.Zero, so they survive an in-place client replacement.Tests:
tests/mutation_outcomes.rs, 4 tests:Each fails against a plausible wrong version: no dedupe, reporting from
server, or attaching to the first engine only.Benchmarks (
mutationsandpokes, 2 passes × 5 alternating rounds vs main): all within ±3.2%, with overlapping ranges.Changeset:
zero-rustminor (with 0.3.0).Checked locally: clippy
-D warnings, tests, docs, and conformance (66,384 cases, 0 failures).