Loading...
Loading...
Compare original and translation side by side
| Tool | Purpose | Speed |
|---|---|---|
| scripts/smart_commit_analyzer.py | Auto-evolving regression detection | Fast |
| scripts/analyze_commits_ai.py | AI semantic analysis (DeepSeek) | Slow |
| scripts/analyze_git_changes.py | Git history statistics | Fast |
| scripts/validate_commit_fixes.py | Legacy manual rules (deprecated) | Fast |
| 工具 | 用途 | 速度 |
|---|---|---|
| scripts/smart_commit_analyzer.py | 可自动演进的回归检测 | 快速 |
| scripts/analyze_commits_ai.py | AI语义分析(基于DeepSeek) | 缓慢 |
| scripts/analyze_git_changes.py | Git历史统计分析 | 快速 |
| scripts/validate_commit_fixes.py | 传统手动规则(已废弃) | 快速 |
undefinedundefinedundefinedundefined🔍 Smart Commit Analyzer
============================================================
Step 1: 从 Git 历史更新规则库...
📊 扫描到 78 个修复提交
✅ 新增 5 条规则
Step 2: 验证所有规则...
============================================================
📋 验证结果
============================================================
✅ 通过: 70
❌ 失败: 2
⚠️ 警告: 3
⏭️ 跳过: 0🔍 Smart Commit Analyzer
============================================================
Step 1: 从Git历史更新规则库...
📊 扫描到78个修复提交
✅ 新增5条规则
Step 2: 验证所有规则...
============================================================
📋 验证结果
============================================================
✅ 通过: 70
❌ 失败: 2
⚠️ 警告: 3
⏭️ 跳过: 0┌─────────────────────────────────────────────────────────┐
│ Step 1: git log --grep="fix" │
│ → Auto-discover all fix commits │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 2: git show <commit> -- <file> │
│ → Extract key code patterns from diffs │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 3: Save to configs/auto_generated_rules.json │
│ → Rules auto-grow with new fix commits │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 4: Validate all rules │
│ → Detect regressions (missing patterns) │
└─────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────┐
│ Step 1: git log --grep="fix" │
│ → 自动发现所有修复提交 │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 2: git show <commit> -- <file> │
│ → 从代码差异中提取关键代码模式 │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 3: Save to configs/auto_generated_rules.json │
│ → 规则会随新修复提交自动增长 │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Step 4: Validate all rules │
│ → 检测回归问题(缺失的代码模式) │
└─────────────────────────────────────────────────────────┘DEEPSEEK_API_KEYundefinedDEEPSEEK_API_KEYundefinedundefinedundefinedundefinedundefinedundefinedundefined.github/workflows/commit-analysis.yml| Job | Tool | Trigger |
|---|---|---|
| Smart Regression Detection | scripts/smart_commit_analyzer.py | Always |
| AI Deep Analysis | scripts/analyze_commits_ai.py | If DEEPSEEK_API_KEY set |
.github/workflows/commit-analysis.yml| 任务 | 工具 | 触发条件 |
|---|---|---|
| 智能回归检测 | scripts/smart_commit_analyzer.py | 始终触发 |
| AI深度分析 | scripts/analyze_commits_ai.py | 当配置了DEEPSEEK_API_KEY时 |
| File | Purpose |
|---|---|
| Main regression detection tool |
| Auto-generated validation rules |
| AI-powered analysis |
| Git history parser |
| GitHub Actions workflow |
| 文件 | 用途 |
|---|---|
| 核心回归检测工具 |
| 自动生成的验证规则 |
| 基于AI的分析工具 |
| Git历史解析工具 |
| GitHub Actions工作流 |
python3 scripts/smart_commit_analyzer.pypython3 scripts/smart_commit_analyzer.py --validatepython3 scripts/smart_commit_analyzer.py --show-rulespython3 scripts/smart_commit_analyzer.pypython3 scripts/smart_commit_analyzer.py --validatepython3 scripts/smart_commit_analyzer.py --show-rules| Status | Meaning | Action |
|---|---|---|
| ✅ Passed | Pattern found in code | None |
| ❌ Failed | Pattern missing (potential regression) | Investigate |
| ⚠️ Warning | Pattern may have been refactored | Review |
| ⏭️ Skipped | File not found (renamed/deleted) | Update rules |
| 状态 | 含义 | 操作建议 |
|---|---|---|
| ✅ 通过 | 代码中存在目标模式 | 无需操作 |
| ❌ 失败 | 目标模式缺失(潜在回归问题) | 需排查 |
| ⚠️ 警告 | 模式可能已被重构 | 需审核 |
| ⏭️ 跳过 | 文件未找到(已重命名/删除) | 更新规则 |