# ai_failure_analysis **Repository Path**: JanuaryJIAN/ai_failure_analysis ## Basic Information - **Project Name**: ai_failure_analysis - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-19 - **Last Updated**: 2026-04-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AI Test Failure RCA System (MVP) AI驱动的自动化流水线测试用例执行失败问题自动定位系统原型。 ## 功能模块 | 模块 | 说明 | |------|------| | `collector` | 数据采集与标准化引擎 | | `classifier` | 智能分类与初筛引擎 | | `analyzer` | 深度根因分析引擎(核心) | | `advisor` | 修复建议与知识沉淀引擎 | | `knowledge` | 知识库管理(历史故障、规则库) | ## 快速开始 ```bash # 安装依赖 pip install -r requirements.txt # 运行 demo(使用内置模拟数据) python -m src.main demo # 分析单个失败事件(从 JSON 文件) python -m src.main analyze --input demo_data/sample_failure.json # 分析 JUnit XML 报告 python -m src.main analyze --junit demo_data/junit_report.xml # 交互模式 python -m src.main interactive ``` ## 架构 ``` CI/CD 失败事件 │ ▼ [采集器 Collector] → 统一事件模型 │ ▼ [分类器 Classifier] → 失败类型 + Flaky 检测 │ ▼ [分析器 Analyzer] → 根因定位 + 证据链 │ ▼ [建议器 Advisor] → 修复方案 + 知识沉淀 ```