Skip to main content
| Merge Risk is CodeRabbit’s rating of how risky it is to merge a pull request as it stands. CodeRabbit assigns it at the end of each review, from the findings that remain and the context of the whole change, and shows it in the summary comment with a short explanation. You choose how CodeRabbit acts on the rating. A merge risk limit sets the highest level at which CodeRabbit may approve the pull request.

What Merge Risk measures

Merge Risk counts concrete risk that the pull request introduces or makes worse: in correctness, data integrity, security, availability, runtime and deployment behavior, permissions, and how hard the change is to roll back. Parts of the change that the review could not cover also count. It does not count how important the touched code is, general uncertainty about rolling out a change, design debt that existed before the pull request, tradeoffs the change makes on purpose, or the mere possibility of undiscovered bugs. Your merge risk instructions can make importance count for your codebase, for example by marking billing changes as high risk. The rating covers the whole pull request, not only the latest push. A risk that an earlier commit introduced keeps counting until a later commit resolves it.

Risk levels

Any remaining risk raises Merge Risk to at least Low.

Where you see it

CodeRabbit shows Merge Risk in its summary comment. The Merge Risk line gives the level and the first five characters of the commit SHA that the rating covers, followed by a paragraph that explains the risk. On Git providers that support collapsible sections, it appears as a collapsed Merge Risk section. Triage doesn’t show Merge Risk. Its cards, filters, and rule conditions use Triage’s own Risk score instead. See Related assessments.

Which commit it covers

Each completed review produces a new rating for the commit it reviewed. After you push, the rating still describes the earlier commit until CodeRabbit reviews the new one, and approval waits until the new commit has its own rating. Approval risk limits use only a rating of the current commit.

When Merge Risk is unavailable

CodeRabbit produces no rating for a commit in cases such as these:
  • The review did not complete, for example because some files failed to review or were too large to review.
  • The new commit has nothing for CodeRabbit to review, for example because path filters exclude every changed file.
  • CodeRabbit could not finish the final assessment of the review.
  • CodeRabbit could not load the pull request’s earlier risk history, or a dependency security scan did not finish.
  • On Azure DevOps, files were excluded for size or their diffs were unavailable.
In these cases, a merge risk limit treats the risk as unknown and CodeRabbit withholds its approval. A rating that CodeRabbit still shows from an earlier commit does not count.

Guide Merge Risk

Use merge_risk_instructions to describe what makes a pull request more or less risky to merge in your codebase. CodeRabbit treats your instructions as part of its definitions of the risk levels and chooses the level from both together.
.coderabbit.yaml
How CodeRabbit applies your instructions:
  • A statement about a kind of change applies when the pull request makes that change, including when it moves or restructures that code. CodeRabbit applies it only where the pull request shows evidence for it.
  • When an applicable statement calls a change risky, Merge Risk counts that change as a risk and quotes your statement, even when the review found no defect in it.
  • A statement that names a level, such as “billing changes are high risk”, guides the level CodeRabbit chooses. It doesn’t set the level on its own.
  • A statement that lowers or discounts a risk changes only how much the risks it describes weigh. It never removes a risk the review found.
  • Your instructions never change which review comments CodeRabbit posts.
The text holds up to 3,000 characters. Like other text settings, the most specific configuration that sets it wins: a repository’s text replaces the organization’s, and blank text leaves inherited text in place. Pull request descriptions and @coderabbitai review --with-config cannot change it. A pull request that a collaborator opens from a branch in the same repository is reviewed with that branch’s .coderabbit.yaml, including its instructions; see Where limits come from for how to use the default branch’s configuration instead.

Lower Merge Risk

Beyond your instructions, you cannot adjust how CodeRabbit scores Merge Risk. To lower the rating, address the risk that the explanation describes, then let CodeRabbit review the new commit. Merge Risk is not the same as these other assessments:
  • Security architecture risk rates the security impact of architecture-level changes. It comes from a Security Architecture Review and has its own approval limit.
  • Review depth in Triage recommends Light, Standard, or Thorough review, or Later when review can wait. It accounts for estimated effort, risk, and the need for human judgment.
  • Risk in Triage is a Low, Medium, or High score that combines review evidence with review effort. Triage shows it on cards and uses it in filters and rules. It does not affect approval limits.
  • Merge readiness in Change Stack is a separate score that Change Stack places in the bands Ready, Caution, Risky, or Blocked.

What’s next

Approval risk limits

Set the highest Merge Risk at which CodeRabbit may approve a pull request.

PR Walkthroughs

See what else CodeRabbit’s summary comment contains.