Add explicit failure categories for automation edge cases
Problem
Currently, when failure category automation encounters edge cases, they all result in missing failure category data. This makes it impossible to distinguish between different types of analysis failures:
- Automation didn't run - The failure category analysis was never attempted (system issue)
- No trace available - Job exists but has no trace content (GitLab API/job issue)
- No patterns matched - Analysis ran successfully but no patterns matched the trace (pattern coverage gap)
Proposed Solution
Introduce explicit failure categories for each edge case:
Current state:
- Automation didn't run:
failure_category = NULL - No trace available:
failure_category = NULL - No patterns matched:
failure_category = NULL
Proposed state:
- Automation didn't run:
failure_category = NULL - No trace available:
failure_category = 'no_trace_available' - No patterns matched:
failure_category = 'no_failure_category_found'
Implementation
Add these constants to JobTraceToFailureCategory:
NO_TRACE_AVAILABLE = 'no_trace_available'
NO_FAILURE_CATEGORY_FOUND = 'no_failure_category_found'
Benefits
Operational Visibility: Distinguish between system failures, API issues, and pattern coverage gaps
Debugging: Immediately know whether to check system health, GitLab API, or pattern definitions
Alerting: Create targeted alerts for different failure types
Edited by David Dieulivol