Skip to main content
Validate a change to catch typos and wrong types, then test it to see how reviews behave. Validation checks the file against the schema. Testing runs a review with the new configuration.

Before you start

Validate in your editor

Put the schema comment on the first line of the file so editors that use the YAML language server autocomplete keys and flag mistakes.
.coderabbit.yaml
The published V2 schema declares no version property and rejects unknown top-level keys. Your editor flags version (including version: 2) and remote_config, and it flags every V3 file. CodeRabbit itself accepts version: 2 and an absent version at review time.

Validate with the CLI

Run the validator in a repository that has a .coderabbit.yaml or .coderabbit.yml file:
The command prints line-numbered errors and exits with code 1 when validation fails. Add --json or --agent for machine-readable output, for example in CI.
The command downloads the schema from www.coderabbit.ai, so allow that host on restricted networks. It needs CLI 0.7.1 or later and doesn’t appear in --help. It validates against the V2 schema only, so a file with version or remote_config fails.

Validate in the web interface

The YAML editor view of the settings page validates YAML as you type and blocks saving until you fix the errors. It checks against the V2 schema that ships with the web app, and an unknown key is an error, so a version key is flagged there too. Organizations in the V3 limited preview get a separate V3 editor that checks against the V3 schema. A custom Configuration source is validated when you save it: if CodeRabbit can’t read the branch or its YAML is invalid, the previous source stays active.

Validate in the browser

Paste a configuration into the editor below to check its YAML before you commit it.

Type-check a TypeScript configuration

With the SDK installed and the file in your TypeScript project, run the compiler in CI:
Unknown keys, misspelled options and invalid values are type errors. At review time, CodeRabbit validates the evaluated output against the same schema as YAML. See TypeScript configuration.

Fix version errors

CodeRabbit doesn’t retry a file that fails V3 validation as V2. The file yields no settings, and the review uses the next layers. Fix the error or restore the V2 file.

Test in the pull request that changes the file

1

Change the file on a branch

Edit .coderabbit.yaml and open a pull request.
2

Read the review

Check Source mode and Commit in Run configuration first. The review uses your edit only for a trusted pull request under Auto, or under Default branch with Allow configuration changes from trusted PRs on. Otherwise, run a preview review. It needs a draft pull request from a branch in the same repository and write access, so ask a collaborator with write access when you don’t have it. Then check the pull request summary for a parsing warning, and judge the review against what you changed.
3

Merge when it looks right

Other pull requests keep their current configuration until the change merges.
Whether the pull request’s own file applies depends on the repository’s configuration source. A trusted pull request comes from a branch in the same repository, and its author meets your Git provider’s trust rule. If the selected source can’t be read, the review falls back to Auto and shows a warning.

Run a preview review from a draft pull request

Comment exactly this on a draft pull request:
CodeRabbit runs an isolated full review with the configuration not yet merged from the pull request branch. The result is labeled non-authoritative, automatic approvals stay off, and the pull request’s review state and status don’t change.
You need write access. The pull request must be a trusted draft from a branch in the same repository, and its configuration must parse. Help lists the command for GitHub and GitHub Enterprise Server only.

Compare before and after in the web interface

When you select Apply changes in a repository’s settings, the Review changes dialog opens before anything is saved.
  • Your changes lists each edited setting with its saved value, your edit and its impact.
  • On GitHub Cloud, a Current and After submit toggle shows the effective YAML before and after the change, with a full YAML comparison and the configuration sources before and after. Other platforms show the list of changes only.
Select Submit changes to save, or Back to editing. Organization defaults and global overrides skip this dialog: they save after Apply changes in a confirmation dialog, without a before-and-after comparison. See Save and review changes.

Try a setting on one review

Add a fenced YAML block after the command to apply it to a single review:
Without inheritance: true, the block replaces the resolved repository configuration, and omitted keys take schema defaults. It can’t change approval policy or risk instructions. See Change settings for one pull request.

Preview through the API

preview_repository_configuration resolves the effective YAML for settings you supply and saves nothing. See Automate configuration with the API, MCP and CLI.

Check the result

Comment @coderabbitai configuration on the pull request and confirm the layers and values you expect. See Check which configuration a review used.

What’s next

Check the configuration used

See which layer supplied each value.

Change one pull request

Override settings for a single review.

Fix settings not applied

Diagnose a change that has no effect.