> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qodo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Assess pull request risk with Merge Risk

> Understand how Qodo assesses pull request risk and configure Merge Risk assessments and labels.

GitHubGitLabAzure DevOps

> [!NOTE]
>
> Starting with version 3.3, Merge Risk replaces the previous Blast radius feature. Blast radius is now one of the three Merge Risk factors. The Blast radius feature is off by default.
>
> Existing customers who have it enabled will continue to see both configurations until they turn it off in the Qodo portal. Both Blast radius configurations are then hidden, leaving only the Merge Risk configuration.

Qodo assesses the potential consequences of merging a pull request and assigns an overall risk level to help teams prioritize their reviews.
Qodo makes this classification available as a native pull request tag (Azure DevOps) or label (GitHub, GitLab), so you can triage which pull requests need the closest review directly from your Git provider’s pull request list.

Each pull request receives one of three risk levels: **Low**, **Medium**, or **High**. The assessment considers the full pull request and evaluates three factors:

* **Blast radius:** How broadly a failure could affect functionality.
* **Behavioral complexity:** How difficult the changed behavior and its interactions are to reason about.
* **Potential damage:** How severe the consequences could be and what recovery would require.

The assessment explains the reasoning behind each factor and provides supporting evidence, including identified risks and recommended areas to investigate. Use this information to understand the potential impact of a change and focus your review on the areas that need the most attention.

![Merge Risk labels on a pull request](https://mintcdn.com/qodo/NZUIEXi4hbouq-lg/images/code-review/merge-risk-labels-in-pr.png?fit=max\&auto=format\&n=NZUIEXi4hbouq-lg\&q=85\&s=6051cbc8a9c7713f302a273d4e227bd9)

## How Merge Risk is calculated

Qodo analyzes the full pull request to assess its potential impact, rather than relying only on the size of the diff. The assessment considers the nature of the changes, the functionality they affect, and the potential consequences of merging them.

The assessment evaluates three factors:

### Blast radius

Estimates how broadly a failure caused by the change could affect the codebase or product functionality. Changes affecting shared components or widely used functionality can have a broader blast radius than changes isolated to a specific area.

### Behavioral complexity

Evaluates how difficult the changed behavior is to understand and reason about, including interactions between components and dependencies. Changes involving complex logic or multiple interacting parts can be harder to validate.

### Potential damage

Estimates the severity of the consequences if the change causes a failure, including the effort and complexity involved in recovering from it. Changes that could cause significant data loss, service disruption, or other serious consequences can carry higher potential damage.

### Understanding the assessment

Each factor includes an explanation of its assigned risk level and supporting evidence. The assessment also identifies risks and recommends areas to investigate during review.

The overall risk level provides a summary of the pull request's potential consequences. Use the individual factor assessments to understand what contributes to that rating and where to focus additional attention.

## Configure Merge Risk

### Configure Merge Risk in the Qodo portal (Recommended)

Merge Risk is disabled by default. Enable it in the Qodo portal to assess pull requests automatically and optionally publish the results as native pull request labels or tags.

**1. Log in to the Qodo portal.**

**2. Navigate to Configurations > Workflows.**

**3. Open the Merge Risk section.**

**4. Enable Merge Risk.**

**5. Configure the assessment and labeling options as needed.**

| Setting | Description | Default |
| - | - | - |
| **Merge Risk** | Enables merge risk assessment for pull requests. | Enabled |
| **Re-assess on every push** | Reassesses merge risk after each push, analyzing only the new commits. Available only when Merge Risk is enabled. | Enabled |
| **Show risk in pull request summary** | Adds the overall risk rating and the three factor assessments to the pull request summary comment. The assessment is not displayed when the summary is published in the pull request description. | Enabled |
| **Add Merge Risk label** | Label the pull request with its overall risk level. | Disabled |
| **Factor labels** | Also label the pull request with the level of each selected risk factor. | Disabled |

#### Publish merge risk labels

You can publish the overall risk assessment as a native pull request label (GitHub and GitLab) or tag (Azure DevOps). This makes it easier to identify and prioritize pull requests directly from your Git provider.

Enable **Add Merge Risk label** to apply the overall risk level, for example, `Merge Risk: High`.

You can also select individual factors under **Factor labels** to publish their assessments separately:

* **Blast radius**
* **Behavioral complexity**
* **Potential damage**

For example, a pull request might receive the overall label `Merge Risk: High` and an individual factor label such as `Blast radius: High`.

Factor labels are optional and are available only when **Add Merge Risk label** is enabled.

### Configure merge risk in `.pr_agent.toml`

```toml theme={null}
[pr_risk]
enabled = true
assess_every_push = true
publish_comment = false
publish_labels = false
```

## Related resources

* [Anatomy of a Qodo Code Review](https://docs.qodo.ai/code-review/comment-anatomy.md): Understand the components of a Qodo pull request review.
* [Generate labels automatically](https://docs.qodo.ai/code-review/generate-pr-labels.md): Add custom, content-based labels to pull requests.
* [Optimize AI effort with Review effort mode](https://docs.qodo.ai/code-review/use-qodo-in-prs/control-review-effort.md): Match review depth to the requirements of each change.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.