Skip to content

v0.2.0 — LLM-Powered Failure Analysis

Latest

Choose a tag to compare

@kkkashan kkkashan released this 21 Feb 01:09
· 9 commits to main since this release

LISA MCP Server v0.2.0 — LLM-Powered Test Analysis

What's new

4 new MCP tools (total: 17):

Tool Description
analyze_test_run_with_llm Analyze all failures in a run with Claude
analyze_failure_root_cause Deep-dive on a single test failure
generate_analysis_report Generate HTML + Markdown reports
run_and_analyze End-to-end: run tests → collect logs → analyze → report

3 new modules:

  • log_collector.py — memory-safe log scanning (256 KB/file cap, seeks to tail, extracts error context windows)
  • llm_analyzer.py — Anthropic API with tool_use for structured failure analysis
  • report_generator.py — self-contained HTML reports (no external CSS/CDN)

5 new Pydantic models:
RootCauseCategory · FailureSeverity · FailureAnalysis · RunAnalysisSummary · AnalysisReport

12 root cause categories: kernel_panic, network_timeout, disk_io_error, permission_denied, package_not_found, service_crash, assertion_failure, timeout, environment_setup, flaky_test, infrastructure, unknown

Example usage

# Analyze a run and get a report in one call
generate_analysis_report(
    results_source="./lisa_results.xml",
    api_key="sk-ant-xxx",
    output_dir="./reports/",
    run_dir="./lisa/runtime/latest/",
)
# → reports/lisa_analysis.html  (visual report)
# → reports/lisa_analysis.md    (Markdown)

What Claude returns

For each failed test:

{
  "root_cause_category": "disk_io_error",
  "root_cause_description": "NVMe device not enumerated — PCIe timeout at boot",
  "recommended_fix": "Switch to Lsv3 VM series for NVMe tests",
  "severity": "critical",
  "confidence": 0.88
}

Full documentation: docs/llm-analysis.md