Executable matching contract12 exact fictional fixtures · BigInt arithmetic · No persistence or AI
← Reconciliation runADR-R01 / ADR-R02Matching 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 representationInteger 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.
PrecedenceFirst applicable unique rule wins.
- 1Exact reference + amount + date
- 2Reference + amount inside two days
- 3One-minor-unit tolerance
- 4Explicit fee-adjusted net
- 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-01Unique exact reference, amount, and dateThe highest-precedence unique 1:1 result matches.
MATCHEDEXACT_REFERENCE_AMOUNT_DATER02-02Exact-rule tieA tie at the highest applicable precedence is ambiguous; later rules cannot select a winner.
AMBIGUOUSEXACT_REFERENCE_AMOUNT_DATER02-03Reference and amount within two daysA unique exact amount may match inside the inclusive configured date window.
MATCHEDREFERENCE_AMOUNT_DATE_WINDOWR02-04Outside the date windowAn otherwise equal record three days away remains unresolved.
UNRESOLVEDNO_APPROVED_RULER02-05One-minor-unit toleranceThe tolerance is inclusive and runs only after exact-amount rules.
MATCHEDMINOR_UNIT_TOLERANCER02-06Tolerance exceededA two-minor-unit difference does not auto-match.
UNRESOLVEDNO_APPROVED_RULER02-07Explicit fee-adjusted netGross minus a source-recorded fee may match a unique net bank amount.
MATCHEDFEE_ADJUSTEDR02-08Fee is not inferredThe same gross/net difference remains unresolved when the PSP fee field is absent.
UNRESOLVEDNO_APPROVED_RULER02-09Bounded payout aggregationAll rows sharing an explicit payout ID may form one exact-sum group.
MATCHEDBOUNDED_PAYOUT_AGGREGATIONR02-10Aggregation cardinality limitA 51-row payout group is rejected before subset search or summation can authorize a match.
UNRESOLVEDAGGREGATION_CARDINALITY_EXCEEDEDR02-11Cross-currency equalityEqual displayed decimals in different currencies never auto-match; P0 performs no FX conversion.
UNRESOLVEDNO_APPROVED_RULER02-12Missing approved identifierEqual amount and date alone are insufficient for 1:1 matching.
UNRESOLVEDNO_APPROVED_RULE