Config Exists + CodeRabbit Collector
Enforce Config Exists using data collected by CodeRabbit Collector. Automatically check devex build and ci standards on every PR.
How CodeRabbit Collector Powers This Guardrail
The CodeRabbit Collector gathers metadata from your systems. This data flows into Lunar's Component JSON, where the Config Exists guardrail evaluates it against your standards.
When enabled, this check runs automatically on every PR and in AI coding workflows, providing real-time enforcement with actionable feedback.
Quick Start Configuration
Add both the collector and policy to your lunar-config.yml to enable this guardrail.
# Step 1: Enable the CodeRabbit Collector
collectors:
- uses: github://earthly/lunar-lib/collectors/coderabbit@v1.0.5
# with: ...
# Step 2: Enable the CodeRabbit Guardrails
policies:
- uses: github://earthly/lunar-lib/policies/coderabbit@v1.0.5
include: [config-exists]
# with: ...
What CodeRabbit Collector Collects
This collector gathers the following data that the Config Exists guardrail evaluates.
code-reviewer
Detects CodeRabbit check-runs on pull requests by querying the GitHub check-runs API for the coderabbitai app. Waits for scan completion and writes a normalized entry to ai.code_reviewers[].
config
Detects CodeRabbit configuration files (.coderabbit.yaml or .coderabbit.yml) in the repository root. Records config file presence and path.
Example Data Flow
Here's an example of the data that CodeRabbit Collector writes to the Component JSON, which Config Exists then evaluates.
{
"ai": {
"code_reviewers": [
{
"tool": "coderabbit",
"check_name": "coderabbitai",
"detected": true,
"last_seen": "2024-01-15T10:30:00Z"
}
],
"native": {
"coderabbit": {
"config_file": ".coderabbit.yaml",
"config_exists": true
}
}
}
}
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 200+ built-in guardrails.