[19.0][OU-FIX] account: link exchange move to an existing partial #6114
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 166 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.306
Real PR Conversation Timeline
1 comments
"Review active on #6114"
general
weight: 0.35
hbrunn
The migration of account.full.reconcile#exchange_move_id copied the last partial
reconciliation of each full reconciliation to hold the exchange move. The copy keeps the
amount, so every line of those reconciliations gets the amount counted twice: lines are
no longer reconciled, residuals appear and invoices go from paid to partial.
This links the exchange move to an existing partial reconciliation of the full
reconciliation instead, without creating any new partial.
Steps to reproduce:
1. In 18.0, have a full reconciliation with an exchange difference move (an invoice in
a foreign currency paid at a different rate).
2. Migrate to 19.0.
3. The invoice shows as partially paid, and the lines of the reconciliation have a
residual equal to the amount of the copied partial.
Expected: the invoice stays paid and the partials, residuals and payment states match
18.0. Checked on a production database with about 18,000 full reconciliations: after
the fix, account moves, lines, partials and open items by partner match 18.0.
The migration test now checks that no partial reconciliation of the full
reconciliation is duplicated (no repeated debit/credit line pair) and that its lines
stay reconciled with no residual. Without the fix it fails (3 partials for 2 distinct
line pairs); with it, it passes.
Assisted by AI