You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subtask of #10602 (umbrella #10603). The FailurePatternDetector (services/failure_pattern_detector.py) is fully built with a singleton (get_pattern_detector()) but has zero production callers on either side — nothing writes patterns and nothing reads them.
Scope (full loop — write + read consumer)
Write: on workflow execution failure (enhanced_orchestration/workflow_runner.py:_handle_workflow_execution_failure), call learn_pattern(causal_chain, error_type) to record/increment the failure pattern (Redis-backed). Fire-and-forget, never raise into the failure path.
Read: before/at failure handling, call detect_pattern(causal_chain, error_type); when a known recurring pattern is found, annotate the failure result (e.g. known_failure_pattern: {occurrences, resolution_success_rate}) so it's surfaced to the caller/logs — this is the consumer that makes the learned data useful.
Guard all detector calls so a Redis/detector error never breaks workflow failure handling.
Verification
Unit test: two identical failures → learn_pattern increments occurrence count; detect_pattern returns the known pattern and the failure result carries the known_failure_pattern annotation on the second occurrence.
✅ Closed — merged via PR #10631 (squash fde294f). FailurePatternDetector full loop wired into workflow failure handling (learn=write, detect=read, known_failure_pattern annotation=consumer); records once at top level (no double-count); 6 tests pass; code-review issues fixed. Follow-up: detector async-redis #10635. Part of #10602.
Activity
mrveiss commentedon Jun 28, 2026
Part of #10602 / umbrella #10603.
feat(reliability): wire FailurePatternDetector into workflow failure …
mrveiss commentedon Jun 28, 2026
✅ Closed — merged via PR #10631 (squash fde294f). FailurePatternDetector full loop wired into workflow failure handling (learn=write, detect=read, known_failure_pattern annotation=consumer); records once at top level (no double-count); 6 tests pass; code-review issues fixed. Follow-up: detector async-redis #10635. Part of #10602.