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
@@ -98,6 +98,12 @@ void main() {
),
AttentionKind.failed,
);
expect(
attentionKindForRun(
run({'status': 'failed', 'failure_kind': 'expected'}),
),
isNull,
);
});
test(
@@ -151,6 +157,26 @@ void main() {
attentionDetail(AttentionKind.failed, run({'diagnostic': null})),
'Run failed',
);
expect(
attentionDetail(
AttentionKind.failed,
run({
'diagnostic': 'generic diagnostic',
'failure_reason': 'Provider authentication failed',
}),
),
'Provider authentication failed',
);
expect(
attentionDetail(
AttentionKind.failed,
run({
'diagnostic': 'generic diagnostic',
'failure_reason': ' ',
}),
),
'generic diagnostic',
);
},
);