What is Bug Ratio
Bug Ratio is the percentage of closed pull requests that are bug fixes. It shows how much of your delivery goes to fixing issues instead of building features. In the Cockpit, it’s the Bug Ratio card on the Productivity tab. It is not DORA’s change failure rate: it counts bug-fix PRs, not failed deployments.How We Calculate It
A background job asks an AI model to classify each pull request from its title alone as Bug Fix, Feature, Refactor or Test. The PR description, labels and diff are not used, and there is nothing to configure.Reading the card
The card shows the percentage, a level badge, and the value for the previous period of the same length with the percentage change (lower is better). The footer reads “Last 2 weeks was …” whatever range is selected; the number is for the previous period. Hover the badge to see the levels:Why PR Titles Matter
Because only the title is read, a descriptive title gives a more accurate ratio.How to Improve
- Test more at the unit, integration and end-to-end levels
- Use linters and static analyzers before production
- Break large features into smaller, testable pieces
- Use feature flags for safer deployments
- Run post-incident reviews to prevent recurrence