Red HatVikash Shaw, Andre LustosaProblem & solution
How we cut CI failure triage from hours to minutes using AI
Summary
The Pipeline Failure Analyzer (PFA) cuts CI failure triage from hours to minutes by confining AI to exactly one of five pipeline stages. Four stages remain deterministic: Prepare cleans raw logs by stripping ANSI codes and progress bars, Summarize assembles structured reports, Notify creates tickets, and Publish commits to wikis. The AI Analyze stage groups failures by root cause using semantic reasoning, overcoming traditional string-based algorithms that fail when the same missing dependency produces different error messages across CPU and GPU architectures. Prepare achieves 95–98% compression on 10,000-line traces, reducing them to 200–500 lines with virtually no signal loss by extracting error anchors and merging overlapping context windows. Before AI output proceeds downstream, five validation layers—including 13-field checks, cross-references, path audits, JSON schema, and trace verification—prevent hallucinated diagnoses from entering tickets or reports.
Context
A platform team faced 80 failed CI jobs with 50,000-line trace logs each after nightly multi-architecture builds across CPU and GPU targets, requiring hours of manual triage to identify shared root causes among the failures.
Approach / What changed
The Pipeline Failure Analyzer (PFA) uses a 5-stage pipeline where AI is confined to exactly one stage (Analyze) for grouping failures by root cause using semantic reasoning. Four deterministic stages handle log cleaning (Prepare) by stripping ANSI codes and progress bars, extracting error anchors with overlapping context windows, and achieving 95-98% compression on traces; report assembly (Summarize) via templating; ticket creation (Notify); and wiki publishing (Publish). Before AI output proceeds, five validation layers verify field completeness, cross-references, path formats, JSON schema, and trace log integrity.
Takeaways
A strict architectural boundary confining AI to exactly one of five pipeline stages ensures determinism in report assembly, ticket creation, and wiki publishing, reducing cost and non-determinism.
Log cleaning that strips ANSI codes, progress bars, and extracts error anchors achieves 95–98% compression on 10,000-line traces with virtually no signal loss, dramatically improving AI analysis quality.
Five validation layers (verdict, findings gate, path audit, schema, trace) prevent hallucinated AI output from entering downstream systems, catching failures like HTML error pages that would cause fabricated diagnoses.
FAQ
How does PFA handle same root cause with different error messages across architectures?
The AI Analyze stage uses semantic reasoning to group failures by root cause, overcoming traditional string-matching algorithms that cannot connect errors when the same missing dependency triggers different messages on x86_64 versus aarch64 builds.
How does PFA prevent AI hallucinations in automated tickets?
PFA enforces five validation layers on AI output: field checks (13 required), findings gate (cross-references), path audit (canonical format), JSON schema (full summary), and trace verification (minimum size, no HTML error pages). This catches hallucinated diagnoses before they enter downstream systems.
What is the key design principle for adding AI to CI/CD?
The most important principle is drawing a strict AI boundary: AI should only be used where human-like causal reasoning is required (grouping failures). All other stages like log cleaning, report assembly, and ticket creation should remain deterministic to ensure reliability and testability.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.