Skip to content

Add per-record diff details to the reconciliation endpoint #325

Description

@therealjhay

Current behavior:
Reconcile endpoint returns count comparison only — no per-record details.

Expected behavior:
Add detail query parameter. When true, compare all settlement IDs pairwise and return mismatches: [{ id, field, gatewayValue, engineValue }]. Cap at 100. Add truncated flag if more.

Files to modify:

  • services/settlement-engine/src/index.ts — enhance reconcile handler
  • shared/validation/schemas.ts

Test requirements:

  1. Identical data — 0 mismatches.
  2. Different status — appears in diff.
  3. Missing in one system — appears as "missing".
  4. Detail=false — count-only response.

Acceptance criteria:

  • Operators can identify exact settlement mismatches.
  • Detailed mode opt-in, capped at 100 records.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions