Skip to content

feat: add rolling window for workflow success rate #38

Description

@louis030195

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions