Conflict resolution is a product rule expressed in engineering. Decide which facts can merge, which authority wins, and which disagreements require review before choosing a generic last-write strategy.
Different fields can deserve different policies. A note addition, a customer address, an approval, and a scheduled resource assignment do not carry the same meaning or consequence.
Start with invariants and ownership
List conditions that must remain true, such as one confirmed appointment per reserved slot or an approval requiring an authorised actor. Identify the source of authority for each field and whether changes are reversible.
Then compare candidate rules: append independent events, merge nonoverlapping fields, accept a designated system's value, reject stale updates, or ask a person. Document why the rule fits the workflow rather than choosing it because a storage library makes it convenient.
Compare a fictional field-service record
Suppose two devices edit a request offline. One adds a note; the other adds a different note. Appending both can preserve intent. If both change the appointment time, combining fields is not enough because the schedule may require a fresh availability decision.
For a phone-number correction, the product may require review when both devices changed the same value. For an external system's billing reference, the application may treat that system as authoritative and reject local edits entirely.
Build fixtures for independent changes, same-field conflicts, cross-field invariant violations, deletion, permission removal, and delayed replay. Reverse arrival order and confirm the result follows the stated rule. Preserve rejected drafts where policy permits.
Evaluate the human and operating cost
Automatic resolution reduces interruption but can hide incorrect assumptions. Manual review preserves judgement while adding support and user effort. Track why review occurs so a recurring harmless conflict can motivate a better rule without weakening consequential controls.
Make resolution auditable when it changes important business state. Record the actor, current revision, chosen value, and reason where needed. A later reviewer should be able to distinguish automatic merge from an authorised override.
The tradeoff is precision versus complexity. A small pilot can support a narrow set of editable fields and explicit review for the rest. That can be safer and easier to explain than a universal merge engine with poorly understood behaviour.
Flutter's offline-first guide supplies context. The Social App case study documents related offline engineering. This field-service policy is fictional and makes no claim about its implementation.
Questions about conflict policies
Is last-write-wins always wrong?
No. It may be acceptable for low-consequence data when explicitly chosen. Avoid applying it accidentally to decisions with stronger invariants.
Can one policy cover every field?
Sometimes a narrow product permits that simplicity. Review whether field meaning, authority, and consequences genuinely match before generalising.
What should a design review produce?
Produce a field-and-action policy table, invariants, preserved-draft rules, and timing permutations. Bring it to a mobile consistency discussion.