Commit Analysis
Use AI-powered commit analysis to inspect code changes, classify files by risk, and get a structured diagnosis of what might break.
Commit analysis is BlameTrail's AI-powered inspection of individual code changes. Given a commit SHA, BlameTrail fetches the diff from GitHub, classifies every changed file, scores each by its likelihood of causing issues, and produces a structured diagnosis with actionable next steps.
Running a commit analysis
From the Analyses page
- Navigate to Analyses in the sidebar.
- Click New Analysis.
- Select the repository from the dropdown (repositories linked to your services).
- Enter the commit SHA you want to analyze.
- Click Analyze.
BlameTrail queues the analysis as a background job. Results typically appear within 10--30 seconds, depending on the size of the diff.
From a deploy event
You can also trigger a commit analysis directly from a deploy's detail page. Click the Analyze Commit button next to any deploy event to launch an analysis for that deploy's head commit. This is useful when investigating suspect deploys surfaced during an incident.
What the analysis produces
Each completed analysis includes the following sections:
File classification
Every changed file is assigned a category based on its path and content:
| Category | Examples |
|---|---|
| Application logic | Route handlers, service modules, controllers |
| Configuration | Environment files, build configs, CI/CD pipelines |
| Database | Migrations, schema changes, query modifications |
| Infrastructure | Dockerfiles, Terraform, Kubernetes manifests |
| Tests | Test files, fixtures, test utilities |
| Dependencies | package.json, lock files, requirements.txt |
| Documentation | Markdown files, comments, changelogs |
Per-file risk scores
Each file receives a risk score from 0 to 100 indicating how likely it is to cause issues in production. Scores are based on:
- The category of the file (database migrations score higher than documentation)
- The size and complexity of the changes
- Whether the file touches error handling, authentication, or data persistence
- Historical patterns from prior analyses
Primary suspect
The analysis identifies a primary suspect file -- the single file most likely to cause problems if something goes wrong after this commit is deployed.
Structured diagnosis
The LLM produces a diagnosis that includes:
- Likely root cause -- A plain-language explanation of what could go wrong and why.
- Recommended next steps -- Concrete actions the team should take (e.g., "verify the migration runs cleanly against a staging database before promoting to production").
- Evidence -- Extracted code snippets and patterns that informed the diagnosis.
Analysis limits
The number of analyses available per month depends on your plan:
| Plan | Analyses per month |
|---|---|
| Free | 5 |
| Starter | 50 |
| Pro | Unlimited |
See Plans and Pricing for full plan details.
Next steps
- Range Analysis -- Analyze an entire range of commits at once.
- Automatic Analysis -- Trigger analyses automatically on every push.