Notify only on unexpected run failures

Classify each failed run from its terminal visit: a stage that
deliberately routes to #failure with a reason is expected and does not
notify or ask for attention; errors, budgets, timeouts, interruptions and
exhausted visit limits (from the recorded control evidence) are
unexpected and always notify.
This commit is contained in:
2026-11-12 11:16:13 +00:00
parent bc376c3fff
commit a6221caa6e
15 changed files with 184 additions and 21 deletions
+2
View File
@@ -54,6 +54,8 @@ type RunEventFrame struct {
CompletedSteps int `json:"completed_steps,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
FinishedAt string `json:"finished_at,omitempty"`
FailureKind string `json:"failure_kind,omitempty"`
FailureReason string `json:"failure_reason,omitempty"`
// Artifacts is the number of files recorded for the referenced step, so a
// client can surface artifact capture without reading the step.
Artifacts int `json:"artifacts,omitempty"`
+2
View File
@@ -187,6 +187,8 @@ type RunSummary struct {
CreatedAt string `json:"created_at"`
FinishedAt string `json:"finished_at"`
Diagnostic string `json:"diagnostic"`
FailureKind string `json:"failure_kind,omitempty"`
FailureReason string `json:"failure_reason,omitempty"`
ResultPreview string `json:"result_preview,omitempty"`
CompletedSteps int `json:"completed_steps"`
// Model and StageModels are the launch-time overrides this run records so it