CI Failure Pattern Detector - Find recurring issues in your CI pipeline.
Developers spend 20-40% of their time debugging broken CI pipelines. The same failures happen again and again:
- Flaky tests that pass on retry
- Dependency download timeouts
- Environment configuration drift
- Race conditions
- Resource exhaustion
But CI logs are cryptic, scattered across builds, and nobody connects the dots.
ci-detective analyzes failed CI runs across your repos and identifies:
- Recurring failure patterns
- Flaky tests
- Common error signatures
- Suggested fixes based on similar failures
✅ MVP Complete - Basic analysis working
# Requires gh CLI
brew install gh # or see https://cli.github.com
# Run directly
chmod +x ci_detective.py
./ci_detective.py --helpci-detectiveci-detective --repo owner/repo-nameci-detective --limit 100🔍 Analyzing last 50 failed CI runs...
Found 50 failed runs
============================================================
📊 ANALYSIS RESULTS
============================================================
🔴 Top Failure Patterns:
• Timeout: 12 occurrences
• Dependency Error: 8 occurrences
• Assertion Error: 6 occurrences
• Connection Error: 4 occurrences
• Flaky Test: 3 occurrences
⚙️ Most Failing Workflows:
• CI: 25 failures
• Build and Test: 15 failures
• Deploy: 6 failures
• Lint: 4 failures
🌿 Most Failing Branches:
• main: 18 failures
• develop: 12 failures
• feature/api-refactor: 8 failures
============================================================
💡 Analyzed 10 run logs out of 50 failed runs
The tool detects these common failure types:
- Flaky Test - Tests that fail intermittently
- Timeout - Operations that exceed time limits
- Dependency Error - Package download/resolution failures
- Out of Memory - Memory exhaustion issues
- Permission Denied - Access control problems
- Connection Error - Network connectivity issues
- Assertion Error - Test assertion failures
- Compilation Error - Build/syntax errors
- GitHub Actions log fetching via gh CLI
- Pattern detection (8 common failure types)
- Workflow failure analysis
- Branch failure analysis
- GitLab CI support
- ML-based pattern detection
- Flaky test identification
- Historical trending (database)
- Suggested fixes database
- Slack/Discord notifications
ci-detective/
├── collectors/ # Fetch logs from CI providers
│ ├── github_actions.py
│ ├── gitlab_ci.py
│ └── base.py
├── analyzers/ # Pattern detection
│ ├── patterns.py
│ ├── flaky.py
│ └── clustering.py
├── database/ # Storage (SQLite for MVP)
│ └── schema.sql
└── cli.py # Main CLI interface
- Implement GitHub Actions log collector
- Build pattern matching engine
- Add flaky test detector
- Create CLI interface
- Test on real repos
MIT (planned)