.vbw-planning/milestones/ui-fixes-and-smart-scraping/phases/05-simplify-source-status/05-RESEARCH.md
Operational State:
active (boolean, default: true) — Controls whether source is actively fetchedfetch_status (string, default: "idle") — Async operation state (values: "idle", "queued", "fetching", "failed")Health Monitoring:
health_status (string, default: "healthy") — Primary health indicatorhealth_status_changed_at (datetime) — Tracks when status last changedrolling_success_rate (decimal, 0-1) — Moving average of fetch successauto_paused_at (datetime) — When auto-pause was triggeredauto_paused_until (datetime) — When auto-pause expireshealth_auto_pause_threshold (decimal, nullable) — Per-source overridefailure_count (integer, default: 0)last_error (text)last_error_at (datetime)consecutive_fetch_failures (integer, default: 0)Auto-pause does NOT toggle active — it sets health_status = "auto_paused" while keeping active=true. This is the core confusion: auto-paused sources still show as "active" in the filter because active boolean remains true.
rolling_success_rate < auto_pause_threshold (default 0.2/20%)auto_resume_threshold (default 0.6/60%)SourceHealthResetIndex filters:
health_status_eq dropdown: "Healthy", "Warning", "Declining", "Critical" (missing Auto-Paused, Improving)active_eq toggle: "Active" vs "Paused"Health badge helper maps all 7 values to colored labels with interactive action menus for critical/declining/auto_paused.
Row partial: Shows "Paused" badge (amber) if !source.active?, otherwise shows health badge.
if auto_paused_active?(auto_paused_until)
"auto_paused"
elsif consecutive_failures(logs) >= 3
"declining"
elsif improving_streak?(logs)
"improving"
elsif rate >= 0.8
"healthy"
elsif rate >= 0.5
"warning"
else
"critical"
end
configuration/health_settings.rbHigh:
Medium:
Low:
Core insight: The confusion stems from conflating operational state with health diagnosis. auto_paused is treated as a health status but it's really an operational state.
Proposed simplification:
auto_paused_until.future?