Executable matching contract12 exact fictional fixtures · BigInt arithmetic · No persistence or AI
← Reconciliation runADR-R01 / ADR-R02

Matching truth you can inspect.

Every fixture is executable. A tie stops at its current precedence, cross-currency values fail closed, and aggregation is bounded before evaluation.

Rule-set versionresolve-rules-r02-v1±2 days · 1 minor unit · max 50 aggregation rows
Money representation

Integer minor-unit strings at rest. BigInt in computation.

Currency and scale travel with every amount. No FX conversion or floating-point comparison exists in P0.

Precedence

First applicable unique rule wins.

  1. 1Exact reference + amount + date
  2. 2Reference + amount inside two days
  3. 3One-minor-unit tolerance
  4. 4Explicit fee-adjusted net
  5. 5Bounded payout aggregation
Golden regression set

Twelve exact outcomes.

These cases lock boundary behavior before database types or provider adapters can influence the domain.

IDScenarioExpected resultRule or reason
R02-01
Unique exact reference, amount, and dateThe highest-precedence unique 1:1 result matches.
MATCHEDEXACT_REFERENCE_AMOUNT_DATE
R02-02
Exact-rule tieA tie at the highest applicable precedence is ambiguous; later rules cannot select a winner.
AMBIGUOUSEXACT_REFERENCE_AMOUNT_DATE
R02-03
Reference and amount within two daysA unique exact amount may match inside the inclusive configured date window.
MATCHEDREFERENCE_AMOUNT_DATE_WINDOW
R02-04
Outside the date windowAn otherwise equal record three days away remains unresolved.
UNRESOLVEDNO_APPROVED_RULE
R02-05
One-minor-unit toleranceThe tolerance is inclusive and runs only after exact-amount rules.
MATCHEDMINOR_UNIT_TOLERANCE
R02-06
Tolerance exceededA two-minor-unit difference does not auto-match.
UNRESOLVEDNO_APPROVED_RULE
R02-07
Explicit fee-adjusted netGross minus a source-recorded fee may match a unique net bank amount.
MATCHEDFEE_ADJUSTED
R02-08
Fee is not inferredThe same gross/net difference remains unresolved when the PSP fee field is absent.
UNRESOLVEDNO_APPROVED_RULE
R02-09
Bounded payout aggregationAll rows sharing an explicit payout ID may form one exact-sum group.
MATCHEDBOUNDED_PAYOUT_AGGREGATION
R02-10
Aggregation cardinality limitA 51-row payout group is rejected before subset search or summation can authorize a match.
UNRESOLVEDAGGREGATION_CARDINALITY_EXCEEDED
R02-11
Cross-currency equalityEqual displayed decimals in different currencies never auto-match; P0 performs no FX conversion.
UNRESOLVEDNO_APPROVED_RULE
R02-12
Missing approved identifierEqual amount and date alone are insufficient for 1:1 matching.
UNRESOLVEDNO_APPROVED_RULE