FeaturesTest Coverage

Coverage Threshold Alerts

Set minimum coverage thresholds per repository and receive Slack notifications when coverage drops below them.

Coverage threshold alerts notify your team via Slack when a repository's test coverage drops below a configured minimum. This provides an early warning system so coverage regressions are caught and addressed quickly.

How threshold alerts work

You configure a minimum coverage percentage per repository. Koalr monitors coverage reports received from Codecov. When a new coverage report arrives for a repository and the reported coverage percentage is below the configured threshold, Koalr sends a Slack notification to the configured alert channel.

Alerts are sent once per breach event — if coverage stays below the threshold, Koalr will not spam the channel with repeated notifications. A new alert fires when:

  • Coverage drops below the threshold for the first time
  • Coverage recovers above the threshold and then drops below it again

Configuring a threshold per repository

  1. Go to Integrations → Codecov → Settings.
  2. You will see a list of all repositories with Codecov data.
  3. Click the row for the repository you want to configure.
  4. Set the Minimum coverage % field to your desired threshold (e.g., 80).
  5. Optionally select a Slack channel for alerts. If no channel is selected, the alert goes to the default coverage alert channel.
  6. Click Save.

Prerequisites for threshold alerts

  • Codecov must be connected — thresholds only apply to repositories with active Codecov data. See Codecov Integration.
  • Slack must be connected — Slack is required to receive threshold alerts. See Slack Integration.

Alert format

When coverage drops below the threshold, Koalr posts a Slack message to the configured channel in the following format:

⚠️  Coverage Alert — my-org/payments-service

Coverage has dropped below your configured threshold.

Current coverage:   72.3%
Configured minimum: 80.0%
Drop:              -7.7%

Most recent commit: abc1234 by @alice
  "Add refund flow for credit card payments"

View coverage dashboard → https://app.koalr.com/coverage

The message includes:

  • Repository name (with link to GitHub)
  • Current coverage percentage and the configured threshold
  • How far coverage has dropped below the threshold
  • The most recent commit that likely caused the drop (the commit SHA, author, and message from the Codecov report's head commit)
  • A direct link to the coverage dashboard for that repository

Configuring the Slack channel for alerts

Coverage alerts can be routed to different Slack channels per repository. Common patterns:

  • Team-specific channels — route alerts for payments-service to #team-payments and alerts for auth-service to #team-auth
  • Central alert channel — route all coverage alerts to a shared #eng-alerts channel
  • Mixed — configure team channels for critical services and a central channel as a catch-all for other repositories

To route alerts to a private Slack channel, you must first invite the Koalr bot to that channel. See Slack Integration — private channels for instructions.

Choosing a threshold value

Common threshold values used by engineering teams:

Coverage targetThreshold to set
No regressionsSet threshold equal to current coverage. Any drop triggers an alert.
80% minimum (common standard)80
70% minimum (less mature codebase)70
90% minimum (critical services)90

For repositories with high existing coverage (e.g., 90%+), setting the threshold close to current coverage (e.g., 88) provides an early warning before coverage degrades significantly. For repositories actively improving coverage, set the threshold just below the current level so it alerts only on regressions, not on days where the trend fluctuates slightly.

Disabling alerts for a repository

To disable alerts for a specific repository, set the Minimum coverage % to 0 or toggle the alert off in the coverage settings for that repository. The threshold configuration is retained so you can re-enable it later.

Coverage Threshold Alerts | Koalr Docs