Skip to content

Import endpoint: manual conflict-review workflow (POST /resolve) #149

Description

@DutchJaFO

Context

Deferred out of #45 (import endpoint) — see the scope-change comment on #45 and docs/milestones/data-import-sources/45-import-endpoint-plan.md's Scope changes section.

#45 ships automatic conflict detection and resolution (all 5 policies from #64: skip, newest-wins, merge-ours, merge-theirs, review), logging every conflict to System_ImportConflicts. review-policy conflicts are left Status = "pending" in that table but nothing currently lets a user resolve them — they just stay pending forever.

This issue is the manual-review half: letting a user look at pending conflicts and decide, per field, which side wins.

Blocked on

#56 (audit log) — not started. The original design (from #45's stale issue text) required every resolution decision to be recorded with ActorType='user', Action='updated', old/new values — that needs #56's IAuditLogger/AuditLog table to exist first.

What this issue should deliver

  1. GET /api/v1/quotes/import/conflicts?status=pending (or similar) — list pending System_ImportConflicts rows, likely paginated (mirror System_AuditEntries' existing paging pattern).
  2. POST /api/v1/quotes/import/conflicts/{id}/resolve (or similar — exact route TBD at planning time) — accepts a per-field resolution (keep existing / replace with incoming), updates the quote's stored fields accordingly, and marks the System_ImportConflicts row Status = "resolved", ResolvedAt set.
  3. Each resolution recorded in the audit log (Audit log: provenance and change history across all entity types #56) with the acting user, old value, new value per field.
  4. Decide at planning time: does this reuse FieldMergeResolver's existing merge machinery, or is a per-field keep/replace decision simple enough to not need it?

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions