fix(sre): separate controlled run outcomes

This commit is contained in:
Your Name
2026-07-19 03:34:10 +08:00
parent cf2049c974
commit 3b1a429419
3 changed files with 36 additions and 2 deletions

View File

@@ -130,7 +130,17 @@ _RUN_SUMMARY_SQL = text(
count(*) FILTER (WHERE state = 'completed')::int AS completed_runs,
count(*) FILTER (
WHERE state IN ('failed', 'cancelled', 'timeout')
)::int AS failed_runs
)::int AS failed_runs,
count(*) FILTER (
WHERE is_shadow IS FALSE
AND step_count > 0
AND state = 'completed'
)::int AS controlled_completed_runs,
count(*) FILTER (
WHERE is_shadow IS FALSE
AND step_count > 0
AND state IN ('failed', 'cancelled', 'timeout')
)::int AS controlled_failed_runs
FROM awooop_run_state
WHERE project_id = :project_id
AND created_at >= :window_start
@@ -335,6 +345,8 @@ def build_automation_slo_scorecard(
"controlled_runs_with_steps",
"completed_runs",
"failed_runs",
"controlled_completed_runs",
"controlled_failed_runs",
)
}
return {