← Back to Pull requests

[19.0][OU-FIX] account: link exchange move to an existing partial #6114

Open
unknown opened this pull request with 166 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 23, 2026 19:03 UTC
Author

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

Diff: 166 lines (+124 / -42) across 2 files Reviewer: hbrunn Review duration: 10657m
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
0.35
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.1% (MEDIUM) · Higher = larger blast radius
35.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.7% · Safe to merge
18.7%