What a merge must do
When two replicas diverge, a merge combines their changes into a single state. A good merge is deterministic, so any replica running it on the same inputs gets the same output, and it should preserve intent wherever the changes do not truly conflict.
Levels of conflict
- Non conflicting edits touch different regions and simply both apply.
- Concurrent same place edits need a rule, such as a CRDT id order or an OT transform.
- Semantic conflicts, like one user deleting a paragraph another is editing, may need human review.
Merge strategies
- Automatic merge resolves everything by structural rules and never asks the user.
- Three way merge compares both versions against a common ancestor to tell inserts from deletions.
Real time editors lean on automatic structural merges so users almost never see a conflict dialog.
Key idea
A merge must deterministically combine divergent edits and preserve intent, escalating only true semantic conflicts.