[20.0][FIX] dms: upload size limit of 0 refused every upload #548
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.33) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 159 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.304
Real PR Conversation Timeline
1 comments
"Review active on #548"
general
weight: 0.35
pedrobaeza
The "Size" setting of Documents (
dms.binary_max_size) has no default value. Until the parameter exists, the settings page shows 0, and saving the settings for any other reason stores 0 (in 20.0,set_values()writes the integer withset_int). From then on_get_binary_max_size()returns 0 and every upload is refused with "The maximum upload size is 0 MB".We hit it on a production database: the settings were saved for an unrelated option, and nobody could upload a document any more.
Changes:
documents_binary_max_sizedefaults to 25, the limit already used when the parameter is missing_get_binary_max_size()treats a zero or negative value as unset and falls back to 25Tests:
test_binary_max_size_zero_is_default. It fails without the fixThe same issue seems to exist in 18.0 and 19.0 (no default on the field, and the settings store "0"). I can backport it if you want.
Assisted-by: Claude Opus 5.5