Skip to content

Commit the Registry-Rendered Agent Policy Files - #1209

Merged
ptr727 merged 2 commits into
developfrom
feature/render-agent-policy
Nov 6, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/render-agent-policy

Conversation

@ptr727

@ptr727 ptr727 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Adds the files ProjectTemplate 2.0.1359 renders from this repository's registry entry, written by repo-config/configure.sh apply --checkout and scripts/agent_policy.py write.

  • .github/agent-policy.json says which review bots run, on which bases, and when. The hub's scripts/pr_review.py reads it.
  • .coderabbit.yaml and .pr_agent.toml carry the same choice to CodeRabbit and Qodo. .coderabbit.yaml also sets auto_pause_after_reviewed_commits: 0, since a repository's file replaces CodeRabbit's central and UI settings and CodeRabbit otherwise pauses after five reviewed commits.

Every bot stays on automatic review, as today. These files matter once the account-level automatic review toggles go off, since without them this repository would lose its reviews. Part of the review cutover tracked in ptr727/ProjectTemplate#3877.

Verification: the hub's agent_policy.py write --dry-run reports all three files unchanged against this branch, the policy validates against spec/agent-policy.schema.json, and editorconfig-checker passes on the files.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Automated review settings are now defined for pull requests opened against or updated on the develop branch.
    • Review automation is configured to run on pull request creation and each subsequent push, with no limit on review rounds.
    • Automatic feedback is enabled, and the configured review tools follow their respective gating settings.

Adds the files the hub renders from this repository's registry entry. They
are .github/agent-policy.json, which scripts/pr_review.py reads for when
each review bot runs, plus .coderabbit.yaml and .pr_agent.toml, which carry
the same choice to CodeRabbit and Qodo.

They keep every bot on automatic review, as today. They matter once the
account-level automatic review toggles go off: without them this repository
would lose its reviews. Written by repo-config/configure.sh apply --checkout,
so configure.sh check reads no agent-policy drift.
A repository's .coderabbit.yaml replaces CodeRabbit's central and UI settings,
so without this key CodeRabbit pauses after five reviewed commits. Rendered
by ProjectTemplate 2.0.1359.
Copilot AI lite review requested due to automatic review settings November 6, 2026 19:17
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds automated pull request review policies for Copilot, CodeRabbit, and Qodo. Also adds CodeRabbit branch settings and enables PR Agent auto-feedback.

Changes: Review configuration

Layer / File(s) Summary
Automated review policies and settings
.github/agent-policy.json, .coderabbit.yaml, .pr_agent.toml
Defines automatic review triggers and targets for Copilot, CodeRabbit, and Qodo. CodeRabbit targets ^develop$ in its configuration and uses the review command in the agent policy. PR Agent auto-feedback is enabled.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • ptr727/PlexCleaner#1064: Updates Copilot review policy behavior, which is related to the Copilot policy added here.

Suggested labels: chore

Merge Risk: Minimal · up to 1c973

No demonstrated merge-blocking issue remains in the automatic-review configuration. The changes are mergeable subject to normal configuration checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately describes the addition of registry-rendered agent policy files.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 143fc13 and 1c973d7.

Files selected for processing: 3

  • .coderabbit.yaml
  • .github/agent-policy.json
  • .pr_agent.toml

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Commit registry-rendered review bot policies

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Commit generated policies so repository-level settings preserve automatic bot reviews after
 account-level toggles are disabled.
• Define Copilot, CodeRabbit, and Qodo review triggers in the hub policy file.
• Configure CodeRabbit to avoid pausing after five reviewed commits.
Diagram

graph TD
  R(["Hub renderer"]) --> P["Agent policy"] --> H(["Hub PR review"])
  R --> C["CodeRabbit YAML"] --> CR(["CodeRabbit"])
  R --> Q["Qodo TOML"] --> QS(["Qodo"])
Loading
High-Level Assessment

Committing the registry-rendered files is appropriate for a cutover from account-level automatic review settings: the hub and vendors can read repository-local policy without duplicating a hand-maintained source of truth. Relying on account settings would not preserve reviews when those toggles are disabled.

Files changed (3) +50 / -0

Other (3) +50 / -0
.coderabbit.yamlEnable CodeRabbit auto-review without commit-based pausing +6/-0

Enable CodeRabbit auto-review without commit-based pausing

• Enables automatic reviews for the develop base branch. Sets the reviewed-commit pause threshold to zero so repository settings do not introduce CodeRabbit's five-commit pause.

.coderabbit.yaml

agent-policy.jsonDefine hub review policy for three bots +42/-0

Define hub review policy for three bots

• Adds the schema-versioned policy read by the hub's PR review script. Copilot targets the default base and gates reviews; CodeRabbit and Qodo target the default and develop bases without gating. All three use automatic, per-push review rounds.

.github/agent-policy.json

.pr_agent.tomlKeep Qodo automatic feedback enabled +2/-0

Keep Qodo automatic feedback enabled

• Adds Qodo's repository-level configuration with automatic feedback left enabled.

.pr_agent.toml

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (1) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. CodeRabbit may skip default-branch PRs 📎 Requirement gap ≡ Correctness
Description
The rendered .coderabbit.yaml sets reviews.auto_review.base_branches to only ^develop$, while
.github/agent-policy.json also selects @default for CodeRabbit and the repository’s default
branch is main. If CodeRabbit does not implicitly include the default branch when this filter is
set, automatic review will skip develop -> main promotion PRs, leaving them without those reviews
once account-level toggles go off.
Code

.coderabbit.yaml[R4-5]

+    base_branches:
+      - "^develop$"
Evidence
The registry-rendered policy selects both @default and ^develop$ as CodeRabbit bases, but the
rendered .coderabbit.yaml lists only ^develop$; repository documentation identifies main as
the default branch and develop -> main as the promotion path. CodeRabbit’s handling of
default-branch PRs when base_branches is set has not been verified, so the runtime impact remains
conditional.

Policy-driven bot review configuration
.coderabbit.yaml[4-5]
.github/agent-policy.json[18-21]
.github/agent-policy.json[16-23]
.coderabbit.yaml[1-6]
WORKFLOW.md[77-79]
GOVERNANCE.md[60-63]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The rendered CodeRabbit configuration lists only `^develop$` under `reviews.auto_review.base_branches`, although the agent policy also selects `@default`. Confirm whether CodeRabbit automatically reviews PRs targeting the default branch when this filter is set; if it does not, `develop -> main` promotion PRs are excluded.
## Fix Focus Areas
- .coderabbit.yaml[4-5]
- .github/agent-policy.json[16-23]
## Recommended Fix
If CodeRabbit does not implicitly include the default branch, update the registry entry or hub renderer source so the generated CodeRabbit base-branch list includes `main` as well as `develop`, matching the policy. Regenerate with `scripts/agent_policy.py write` and `repo-config/configure.sh apply --checkout`, then confirm `agent_policy.py write --dry-run` reports `unchanged`. Do not hand-edit the rendered files.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, including the required CodeRabbit coverage for the default main branch.

No open issues 🎉

What changed in this PR

Adds rendered repository agent-policy files to preserve automatic Copilot, CodeRabbit, and Qodo reviews when account-level settings change.

Changes:

  • Adds the central automatic review policy and branch coverage.
  • Configures CodeRabbit for automatic reviews without a reviewed-commit pause limit.
  • Enables automatic Qodo feedback.
  • CodeRabbit’s configuration must include the repository’s default main branch in addition to develop.
File Summary Findings
.pr_agent.toml Enables automatic Qodo/PR-Agent feedback. None
.github/​agent-policy.json Defines automatic review triggers, branch scopes, review rounds, and Copilot gating. None
.coderabbit.yaml Configures automatic CodeRabbit reviews and disables the reviewed-commit pause limit. P1 / Moderate: Add ^main$ to base_branches so pull requests targeting the default branch receive CodeRabbit reviews. (1 vote)

Review effort: Lite

@ptr727

ptr727 commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Declined, disproved.

@qodo-free-for-open-source-projects please dismiss finding 1, "CodeRabbit may skip default-branch PRs". It is disproved: CodeRabbit's reviews.auto_review.base_branches lists bases in addition to the default branch, which is always reviewed. Its docs (https://docs.coderabbit.ai/configuration/auto-review) state "The default branch is always included." So ^develop$ alone covers both @default and develop.

The Copilot round's file-table finding asking to add ^main$ to base_branches is the same claim, declined on the same evidence.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Declined, disproved.

@qodo-free-for-open-source-projects please dismiss finding 1, "CodeRabbit may skip default-branch PRs". It is disproved: CodeRabbit's reviews.auto_review.base_branches lists bases in addition to the default branch, which is always reviewed. Its docs (https://docs.coderabbit.ai/configuration/auto-review) state "The default branch is always included." So ^develop$ alone covers both @default and develop.

The Copilot round's file-table finding asking to add ^main$ to base_branches is the same claim, declined on the same evidence.

I can't dismiss finding 1 ("CodeRabbit may skip default-branch PRs") right now. The findings index for this PR is empty, so I have no stable ID to match it to, and I don't want to close the wrong item.

Could you confirm the finding in one of these ways?

  • Re-run the review so the findings index refreshes, then ask me to dismiss finding 1 again.
  • Dismiss it in the Qodo portal if the index still doesn't list it.

I also haven't checked the CodeRabbit docs you cited. If you want that verified, I can look at the .coderabbit.yaml and .github/agent-policy.json diff in this PR.

@ptr727
ptr727 merged commit 2bee72a into develop Nov 6, 2026
16 checks passed
@ptr727
ptr727 deleted the feature/render-agent-policy branch November 6, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants