Hardcode dashboard collection retention to 90 days with opt-in controller setting #340
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 180 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.311
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #340"
general
weight: 0.35
kcagran
Summary
Already backported to 2.7.
get_retention_days()function (which queries the Controller's activecleanup_jobsschedules) behind a newDASHBOARD_COLLECTION['USE_CONTROLLER_RETENTION']setting (defaultFalse)DEFAULT_RETENTION_DAYS) unless the setting is explicitly enabledget_retention_days()code is preserved and functional — it just requires opt-in viasettings.yamlor theMETRICS_SERVICE_DASHBOARD_COLLECTION__USE_CONTROLLER_RETENTION=trueenv varMotivation
The Controller-derived retention period was added but not fully tested. This makes the safe 90-day default unconditional while keeping the code in place for a future release once it's been validated.
Changes
apps/settings/defaults.py— addUSE_CONTROLLER_RETENTION: FalsetoDASHBOARD_COLLECTIONapps/dashboard_reports/tasks.py— add_use_controller_retention()helper; gateget_retention_days()calls in_resolve_collection_paramsandcleanup_dashboard_reports_old_datatests/unit/dashboard_reports/test_tasks.py— patch_use_controller_retentiontoTruein tests that exercise the controller-retention pathAI Assistance
This change was developed with assistance from Claude Code (Claude Sonnet 4.6).
All generated code was reviewed, tested, and validated before merging.