Read dot-grouped pasted amounts in decimal money fields #6085
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 161 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.304
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #6085"
general
weight: 0.35
jjmata
Follow-up on PR #6085 addressing the review comments:
/^[^,]\.[^,]\.[^,]*$/regex inapp/javascript/utils/parse_amount_paste.jswith a linear-time check (!match[2].includes(",") && match[2].indexOf(".") !== match[2].lastIndexOf(".")) to avoid cubic backtracking on malformed inputs with many dots before a comma.separator: whenseparator === "."(e.g. USD) in a decimal field, multi-dot pastes now returnnullto defer to the browser, matchingparseTypedNumberinstead of treating dots as thousands grouping.Disclosure: Prepared with AI assistance.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
- Amounts using consistently grouped dots are now recognized as whole numbers when the field uses a comma decimal separator. Unevenly grouped values remain rejected.
- Multiple dots are rejected when the field uses a dot decimal separator.
- Negative amounts with a currency symbol are also handled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->