Skip to content

Count a CodeRabbit Clean Pass Its Summary Alone Records - #4351

Merged
ptr727 merged 3 commits into
developfrom
burndown/r4-reviewer-clean-pass
Nov 22, 2026
Merged

ptr727 merged 3 commits into
developfrom
burndown/r4-reviewer-clean-pass

Conversation

@ptr727

@ptr727 ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

A clean CodeRabbit pass can leave no pull request review object. It then shows only in CodeRabbit's summary comment, as the line "No actionable comments were generated in the recent review", beside the commit range its review details print. side_answered and side_rounds in scripts/pr_review_side.py counted review objects alone. So wait read a head CodeRabbit had passed clean as unanswered and spent another @coderabbitai request on it, and a rounds: once or maxRounds cap missed that round.

  • clean_pass reads CodeRabbit's summary comment and returns the commit a clean pass read. It counts only where the comment carries that line and prints at least one range, all ending at the same commit. It never counts a comment carrying a rate-limit notice, since that notice prints the range it would read.
  • side_answered treats a clean pass on the head as CodeRabbit's answer there, so no further ask is sent for it.
  • side_rounds counts the clean-passed commit as a round where no CodeRabbit review covers it. So a rounds: once cap still counts the pass after a later push, until CodeRabbit's next pass rewrites the summary.
  • Tests in tests/test_pr_review_policy.py drive the reader, the round count, the ask, and the cap after a push with constructed summaries. Each new test fails against the previous code.
  • docs/pr-reviewer-reference.md and scripts/README.md say what wait now reads.

What remains of #3929

  • The digest's other_reviewed field in scripts/pr_review_digest.py still counts review objects alone, so a digest reader still cannot tell a clean CodeRabbit pass from no pass. That file is outside this change's scope.

This change is the gate half of #3929, which stays open for the digest item above. clean_pass is the reader that item can reuse.

Closes on promotion: none

Verification

  • python -m unittest discover -s tests with tests/requirements.txt installed: all pass.
  • ruff format --check ., ruff check ., mypy: clean.
  • Prose gate on the diff, markdownlint, cspell, and editorconfig-checker: clean.
  • scripts/pr_review_side.py stays under its 350-line ceiling.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 22, 2026 14:53
A clean CodeRabbit pass can leave no review object, only its summary
comment saying no actionable comments were generated. side_answered and
side_rounds counted review objects alone, so wait read such a head as
unanswered and spent another request on it, and a rounds cap missed the
round. Both now also read the summary, where every commit range it
prints ends at the head and it carries no rate-limit notice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The summary's clean pass counted only while its commit was the head,
where wait never consults the cap, so a rounds: once CodeRabbit was asked
again after a push. clean_pass now returns the commit the summary read,
and side_rounds counts it wherever no review covers that commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 22, 2026 23:05
@ptr727

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 5d08854cb02ead6f78a208f6bc5a726e7bf8d94d, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 45994bb and 5d08854.

Files selected for processing: 4

  • docs/pr-reviewer-reference.md
  • scripts/README.md
  • scripts/pr_review_side.py
  • tests/test_pr_review_policy.py
  • 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unresolved findings remain, including a critical issue where raw Markdown parsing can accept PR-controlled text as a clean pass and suppress necessary review requests.

2 open issues
What changed in this PR

This PR updates CodeRabbit side-review bookkeeping so clean passes recorded only in summary comments count toward answered heads and round caps.

Changes:

  • Adds clean-pass detection for qualifying CodeRabbit summary comments and commit ranges.
  • Integrates clean passes into answer and round calculations.
  • Adds regression tests and documents the updated review behavior.
File Description
tests/​test_pr_review_policy.py Adds coverage for clean-pass detection, round counting, duplicate-request prevention, and cap handling.
scripts/​README.md Documents clean-pass handling in the review policy and wait behavior.
scripts/​pr_review_side.py Detects CodeRabbit clean-pass summaries and incorporates them into answer and round calculations.
docs/​pr-reviewer-reference.md Documents how CodeRabbit summary-based clean passes affect review tracking.

Review effort: Lite

Comment thread scripts/pr_review_side.py Resolved
Comment thread scripts/pr_review_side.py Resolved
@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.57%. Comparing base (b38e084) to head (5d08854).
⚠️ Report is 290 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4351      +/-   ##
===========================================
- Coverage    81.60%   79.57%   -2.04%     
===========================================
  Files           26       45      +19     
  Lines         9070    15934    +6864     
===========================================
+ Hits          7402    12680    +5278     
- Misses        1668     3254    +1586     
Flag Coverage Δ
python-3.13 79.57% <100.00%> (-2.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit fecf00d into develop Nov 22, 2026
15 checks passed
@ptr727
ptr727 deleted the burndown/r4-reviewer-clean-pass branch November 22, 2026 23:21
ptr727 added a commit that referenced this pull request Nov 23, 2026
…afe Commands, and Workflow Input Check (#4368)

Promotes the eleven pull requests that landed on develop since the last
promotion.

- #4348: Say where a reviewer's clean pass leaves its record.
`pr-review-conduct` "Silence is not evidence" now states that a clean
pass can leave an empty-bodied review or, for CodeRabbit, only a summary
comment line.
- #4351: Count a CodeRabbit clean pass its summary alone records.
`side_answered` and `side_rounds` read the summary comment, so `wait`
stops re-requesting a head CodeRabbit already passed.
- #4346: Detect and report a one-off rather than correct it by code, and
let a rollback carry a `Reopens on promotion:` line (operational
repositories). `add-host-tool` now reports a shadowing copy instead of
removing it.
- #4349: Declare a `publicInteraction` policy per repository in the
registry and apply and check it from `repo-config/configure.sh` (GitHub
interaction limit, Discussions off by default).
- #4352: The PowerShell install stops on a refusal, a tool with no
Microsoft feed fails alone while the run continues, and an unmanaged
`gh` or `op` in install mode says `--upgrade` moves it.
- #4353: Copy-and-run commands in Markdown are paste-safe, with a new
"Copy-and-Run Commands" rule, a generated include in
`comment-and-doc-style`, and a default `paste-safe` prose gate rule.
- #4350: Register every Claude Code hook the host-safety kit installs in
exec form on all platforms, and rewrite shell-form registrations. This
edits the agent's own guard.
- #4354: A new repo-gate check, `workflow-inputs`, compares each
reusable-workflow call's `with:` keys against the callee at the caller's
pin.
- #4357: Quote the remaining paste-safe commands in the repo-config docs
and update the stale PowerShell feed comment, the fix for the
promotion's own lint failure and Copilot thread.
- #4358: Keep the tilde outside the quotes in the base-clone
placeholders and keep the probe executable and arguments as separate
tokens, the fix for the five Copilot findings on this promotion, plus
the AUDIT.md interaction-check coverage and the repo-gate docstring
wrap.
- #4359: Keep the tilde outside the quotes in the remaining base-clone
placeholders, the sibling sweep of the same defect.

## Owed by the maintainer before rollout

From #4349:

- Run the live `repo-config/configure.sh apply` on each repository.
Until it runs, `configure.sh check` and the audit flag the public
repositories.
- Confirm that Copilot, CodeRabbit, Qodo and Dependabot still work under
the interaction limit.
- Update other repositories' README links to Discussions, since
Discussions go off by default.

From #4353: it changed carried text, so a fleet resync is owed.

## Local-pass findings

Class and disposition for the four findings the recorded local pass
raised on the earlier head:

- `host-setup/linux/install-tools.sh` removal code
(`powershell_remove_non_apt`, `remove_unowned_command`,
`op_remove_download`, docker and shadow removals) against the one-off
rule, class `introduced`: tracked by #4347, not this pull request.
- `Reopens on promotion:` exists for operational repositories only,
class `introduced`: declined under the maintainer's answer on #4175,
which places the rule in "Operational Repositories".
- `AUDIT.md` does not list the interaction-limit check, class
`introduced`: fixed in #4358.
- `repo_gate.py` `check_workflow_inputs` docstring lines over the line
length, class `introduced`: fixed in #4358.

Fixes #4170
Fixes #4175
Fixes #4329
Fixes #4172
Fixes #4124
Fixes #2596
Fixes #4040
Fixes #2822
Fixes #3896

Supersedes #4356 because of the `.github/workflows/validate-task.yml`
Dependabot conflict (the `astral-sh/setup-uv` pin bump on main beside
the `if:` condition #4354 changed on develop), resolved from develop's
side as a strict superset of main's. The merged tree equals develop's.
This also carries #4365, #4366 and #4367, the fixes for findings raised
on #4356; none of them closes an issue.

## Findings on this promotion's head

Local pass over the whole `main` diff (four findings) and the Copilot
round (two threads):

- `configure.sh` `publicInteraction` lookup matches the registry name
exactly while apply's guard matches case-insensitively, class
`introduced` (#4349): declined with evidence. A name differing only in
letter case makes `spec/resolve_description.py` exit 1 at `configure.sh`
line 331, before `cmd_apply` or any `gh api --method` call, so no limit
is written on the wrong value. Checked by running the lookup on sample
JSON, and no write is reachable.
- The ungrammatical `hook the host keeps of its own` phrase (Copilot
thread), class `introduced` (#4350): fixed in #4369 into develop.
- Copilot's README Discussions thread: declined with evidence, the
canonical-link list names a link when present and does not require it,
and #4349 turned Discussions off.
- `Reopens on promotion:` scoped to operational repositories, class
`introduced`: declined under the maintainer's answer on #4175, which
places the rule in "Operational Repositories".
- `add-host-tool` detect-and-report against the installer's removal
code, class `introduced` (#4352 and #4346): tracked by #4347, not this
pull request.
- The interaction-limit precondition is not enforced by `apply`: tracked
by #4364.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
ptr727 added a commit that referenced this pull request Nov 24, 2026
…wed (#4396)

## Summary

A clean CodeRabbit pass leaves no pull request review object, only its
summary comment. The digest's `other_reviewed` field counted review
objects alone, so it could not tell a clean pass from no pass. This
finishes the remaining item of #3929. #4351 taught `wait` to read the
summary, and #4337 documented the head-branch config read.

- `CLEAN_PASS`, `REVIEWED_UP_TO`, and `clean_pass` move unchanged from
`scripts/pr_review_side.py` into a new reader module,
`scripts/pr_review_summary.py`. `pr_review_side.py` sat at its size
ceiling, and the digest, a reader module, may not import it. The new
module adds `summaries`, CodeRabbit's comments in view that print a
reviewed range, and `clean_pass` builds on it.
- `scripts/pr_review_digest.py` names CodeRabbit under `other_reviewed`
where `clean_pass` reads the current head, never an earlier head.
- A new `other_unknown=coderabbitai` field keeps the blind state apart
from no pass. It prints only where the review policy covers CodeRabbit
on the base and neither a review on the head nor any summary is in view.
Older comments must also sit behind the comments window. CodeRabbit
edits one summary in place, so a summary in view, clean or not, decides.
Coverage reads through `pr_review_payload.bot_entry(...).covers(...)`,
the primitive `side_reviewers` uses.
- The reader-import guard and the size test cover the new module. No
existing ceiling moves.
- The `status` help text, `docs/pr-reviewer-reference.md`, and
`scripts/README.md` describe the fields and the module.
- Tests cover a clean pass on the head, no pass, a summary with
findings, and a clean pass on an earlier head. They also cover the blind
window with and without a summary in view, and a base the policy does
not cover. The pinned crowded digest gains `other_unknown=coderabbitai`,
since that case has older comments and no summary in view under the
default policy.

## Findings from the local pass

The opening push spent its pass's edit budget, so these `introduced`
findings were listed here. a9e2a09 fixed four of them and 1846462
fixed the fifth. A fresh pass over each head raised none.

- `scripts/pr_review_summary.py` `summaries`, `introduced`, fixed in
a9e2a09: it keyed the summary on a printed range alone. It now also
counts CodeRabbit's summary marker, so a pass still running or skipped
reads as a summary in view.
- `scripts/pr_review_digest.py` CodeRabbit-on-head check, `introduced`,
consolidation, fixed in a9e2a09: `rabbit_on_head` now serves both
`side_answered` and the digest.
- `scripts/pr_review_digest.py` blind check, `introduced`,
consolidation, fixed in a9e2a09: `summary_blind` names it, in the shape
`qodo_comments_blind` has.
- `scripts/pr_review.py` help text, `introduced`, fixed in a9e2a09: it
now names the pair `other_unknown` reads.
- `scripts/pr_review_digest.py` policy coverage, `introduced`,
consolidation, fixed in 1846462: `covering_bot` in
`scripts/pr_review_payload.py` now serves the digest and
`pr_review_side.side_reviewers`. `pr_review_rounds.promotion` is a
partial match and stays as it is, since it keeps its own
unread-default-branch fallback and Copilot `gate` check.

Closes on promotion: #3929

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* CodeRabbit summaries that confirm a clean review of the current pull
request are now counted as reviews.
* When CodeRabbit is covered by the review policy but its review status
can’t be determined from the visible comments, the status is reported as
unknown rather than unanswered.
* CodeRabbit is not required when the review policy excludes the pull
request’s base branch.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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