Problem
Workflow success rate is currently calculated as cumulative/all-time:
success_rate = (successful_runs / total_executions) * 100
A workflow that failed 100 times 6 months ago but now works perfectly still shows a poor success rate (e.g., 50% instead of 100%).
Proposed Solution
Similar to the 24h rolling window implemented for machine health uptime (health_check_history table), implement a rolling window for workflow success rate.
Options:
- Time-based: Last 7 days of executions
- Count-based: Last 50 executions
Reference
See commit 1f6dbcda for the machine health rolling window implementation pattern:
health_check_history table stores individual checks
get_machine_uptime_24h() function calculates from recent records
- Cleanup of old records (7 days retention)
cc @m13v
Problem
Workflow success rate is currently calculated as cumulative/all-time:
A workflow that failed 100 times 6 months ago but now works perfectly still shows a poor success rate (e.g., 50% instead of 100%).
Proposed Solution
Similar to the 24h rolling window implemented for machine health uptime (
health_check_historytable), implement a rolling window for workflow success rate.Options:
Reference
See commit
1f6dbcdafor the machine health rolling window implementation pattern:health_check_historytable stores individual checksget_machine_uptime_24h()function calculates from recent recordscc @m13v