Respect fraction_digits for unscaled compact numbers #1486
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.31) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 107 lines diff across 1 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.280
Real PR Conversation Timeline
1 comments
"Review active on #1486"
general
weight: 0.35
chrikrah
Fixes #1484.
_get_compact_format()now rounds tofraction_digitswhen formatting numbers below the smallest compact magnitude or matching a"0"compact pattern, instead of returning the unroundedDecimaldirectly. When rounding carries the value across a magnitude boundary (such as999.6to1000inen_US, or9999.6to10000inja_JP), it re-runs the lookup at the next magnitude so the compact suffix is selected from the rounded value.Verification
tests/test_numbers_format_decimal.pyandtests/test_numbers.pycoveringformat_compact_decimalandformat_compact_currencybelow the smallest magnitude, across magnitude carry boundaries, and on"0"patterns.pytest tests/test_numbers.py tests/test_numbers_format_decimal.py tests/test_support_format.py(159 passed) andruff check.