AddThisFeature

Sync Conflict Resolution

Decide what happens when your app and an external system disagree.

involved Integrations

What it adds

Detection and human resolution of divergence between a local record and its counterpart in a synced external system.

What your agent is told to do

6
  1. 1

    Write down the source-of-truth policy per field or per object before building anything: app wins, external wins, or a human decides. An implicit policy becomes silent data loss.

  2. 2

    Detect divergence by comparing stored versions or change timestamps from both systems against the last synced snapshot. Last-write-wins on arrival order is not detection; it is overwriting.

  3. 3

    When a human must decide, show both values side by side and state the consequence of each choice, including what will be pushed to the external system.

  4. 4

    Support field-level resolution where the object allows it, so choosing a local phone number does not also revert an externally-updated address.

  5. 5

    Stamp each resolution with the versions it settled, and make later sync jobs carrying older versions no-ops. Do NOT let a queued stale job reopen a conflict a user already resolved.

  6. 6

    Two users saving the same record in your app is a different problem, owned by Edit Conflict Detection, which limits itself to the moment of writing. Do not re-implement its version-token mechanics here.

Edge cases it handles

6
  • The external system may not expose a version or reliable modified timestamp. Fall back to hashing the fields you care about and say so in the policy.
  • Clock skew between systems makes timestamp comparison unsafe near the boundary. Prefer versions; when using time, require a meaningful margin.
  • A record deleted on one side and edited on the other is a conflict, not a delete. Never propagate a destructive action as the automatic resolution.
  • Conflicts arrive in bulk after an outage. Offer a reviewed bulk resolution by policy rather than making someone click through hundreds.
  • Resolution must be auditable — who chose which side, when, and what the discarded value was. Someone will ask.
  • While a conflict is unresolved, the record must be visibly flagged, and syncing that field must pause instead of quietly picking a winner.

Definition of done

8
  • A source-of-truth policy exists per synced object or field and is documented in the app.
  • Conflicts are detected by version or timestamp comparison against a last-synced snapshot.
  • The resolution UI shows both values and states what each choice will do.
  • Field-level resolution is possible where the object supports it.
  • A stale sync job cannot reopen or reverse a resolved conflict.
  • Every resolution records the chooser, the time, and the discarded value.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.