Preserve recurring date hints when finite schedules finish #6121
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 352 lines diff across 4 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
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #6121"
general
weight: 0.35
jjmata
Summary
Keep finished schedules from writing a NULL cached date or counting later charges as extra installments.
Both identifier refresh paths use the model date helper. Finite detected plans use the existing schedule matcher for their statistics. Completed counts stay stable as older payments leave the detection window.
Keep Schedule’s
nilresult, lifecycle status, paid history, and allocations unchanged. This does not change completed-plan display or active totals.Evidence
PG::NotNullViolation. A September–November plan counts a December charge as payment 4. Filtering alone then drops its count to 2 in January.After: Repeated refreshes retain count 3 and last date November 15, through December, January, and February. Tests cover both count/date end conditions and an empty scheduled-entry set.
AI assistance: GPT-6.1 Sol. Source reviews covered standards and spec; the January lookback finding has a failing-before/passing-after regression.
Merge Danger
Door: two-way
No migration or data rewrite. Reverting restores the previous detection and date calculation.
Blast Radius: Recurring
Changes cached-date and detected-series statistics updates. Ongoing schedules still advance; finite schedules generate no extra occurrences.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Completed installment schedules now retain their final expected date when recurring transactions are recorded or refreshed.
Repeated updates preserve final occurrence details, including the date, payment status, and allocation information.
Recurring transactions remain active after the final scheduled payment, with the final occurrence count and amount average preserved.
* Charges detected on or after a finite schedule’s end no longer extend its occurrence count or move its final occurrence date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->