Skip to content

Read CodeRabbit's Outside-Diff Section in Its Bold-Line Shape - #4226

Merged
ptr727 merged 5 commits into
developfrom
fix/cr-outside-diff-bold-heading
Nov 16, 2026
Merged

ptr727 merged 5 commits into
developfrom
fix/cr-outside-diff-bold-heading

Conversation

@ptr727

@ptr727 ptr727 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

CodeRabbit now writes its outside-diff section with the count on a bold line of its own, **Outside diff range comments (N)**, followed by one <details> per finding and no wrapper. The reader built a previously_missed section only from a <details> summary. Its paragraph pass matched the bold line but kept only an open count, so cr_outside_diff= never printed and merge did not hold the finding.

  • headed() in scripts/pr_review_copilot.py turns a paragraph spelled as a counted section, other than open or vetted, into a section. The section covers the <details> siblings following the paragraph. Only blank lines at the paragraph's quote depth may separate them, and a sibling spelled as a section of its own ends the run. So a following suppressed or previously-missed section keeps its count, and a finding sharing an HTML block with the one before it is still read.
  • A reader vetting its layout (Copilot with its marker) skips the pass, so an unknown <details> there stays a loud note rather than a counted finding.
  • spelled() and unquoted() replace the copies of the label-to-kind lookup and the quote-stripped section text at every site.

Verification

  • New fixture cr_outside_diff_bold_body, in the new shape with a tight variant, beside the old one. Each new test fails against the reader it fixes and passes now: status output, the merge refusal, the acknowledgment, the run's boundaries, a spelled neighbour, back-to-back findings, and the vetting reader's note.
  • python -m unittest discover -s tests -p 'test_pr_*.py': 970 tests, OK. ruff, mypy, and the prose gate pass through the hub's pre-commit hook.
  • Five recorded local-strict-review passes. Their findings are fixed in 85e7436f, f570f339, 5b37b2a6, and 8c80af74, and the fifth pass raised none.

Closes on promotion: #4219

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 16, 2026 09:05
CodeRabbit now states its outside-diff count on a bold line of its own, with each finding in a
`<details>` of its own and no wrapper, so the reader matched the line and then dropped it. A
paragraph spelled as a counted section other than open or vetted now heads a section of the
`<details>` run following it, so `cr_outside_diff=` reads it and `merge` holds it until answered.

Closes #4219

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A bold-line section's `<details>` run now stops at an element spelled as a section of its own, so
a following suppressed or previously-missed section keeps its count. It also ends at its last
finding's close rather than at the HTML block holding the next element's opening. The label-to-kind
lookup and the quote-stripped section text are each one helper now, used at every site.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s Out

A run is now the `<details>` siblings following the bold line, each separated from the last by
blank lines at the line's own quote depth alone. So a finding sharing an HTML block with the one
before it is read and claimed. A reader vetting its layout skips the pass, keeping its loud note on
an unknown `<details>` rather than counting it as a finding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 16, 2026 17:27
@coderabbitai

coderabbitai Bot commented Nov 16, 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 43 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 a7749d1 and 8c80af7.

Files selected for processing: 3

  • scripts/pr_review_copilot.py
  • tests/test_pr_merge.py
  • tests/test_pr_review.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

@ptr727

ptr727 commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f570f3399a59131ac72c6535a40ba7be3f73807c, the content this pull request carries at that commit against develop, and it recorded 1 finding.

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

An active documentation inconsistency remains: the docstring claims paragraph counts include both open and vetted headings, but the implementation only counts open paragraphs.

1 open issue
What changed in this PR

Updates review-body parsing so CodeRabbit's bold-line outside-diff sections are counted and enforced by merge checks.

Changes:

  • Adds parsing for counted paragraph headings followed by sibling <details> findings.
  • Consolidates section-matching and quote-stripping helpers.
  • Adds fixtures and parser, status, and merge-gate tests for the new format and related boundaries.
File Description
tests/​test_pr_review.py Adds fixtures and parser/status coverage for CodeRabbit's bold-line outside-diff layout.
tests/​test_pr_merge.py Verifies bold-line outside-diff findings block merging until acknowledged.
scripts/​pr_review_copilot.py Adds paragraph-headed section parsing for bold-line outside-diff findings and consolidates shared parsing helpers.

Review effort: Lite

Comment thread scripts/pr_review_copilot.py Resolved
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.11%. Comparing base (a7749d1) to head (8c80af7).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4226      +/-   ##
===========================================
+ Coverage    78.05%   78.11%   +0.05%     
===========================================
  Files           42       42              
  Lines        15319    15360      +41     
===========================================
+ Hits         11958    11999      +41     
  Misses        3361     3361              
Flag Coverage Δ
python-3.13 78.11% <100.00%> (+0.05%) ⬆️

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 16, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727

ptr727 commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 16, 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 fcb8db6 into develop Nov 16, 2026
9 checks passed
@ptr727
ptr727 deleted the fix/cr-outside-diff-bold-heading branch November 16, 2026 17:56
ptr727 added a commit that referenced this pull request Nov 16, 2026
## Summary

Promotes `develop` to `main`. It carries two changes:

- [#4226](#4226):
`pr_review.py` reads CodeRabbit's outside-diff section in its bold-line
shape. That shape has the count on a bold line of its own and one
`<details>` per finding, with no wrapper. Before this change, such a
finding printed no `cr_outside_diff=` field and `merge` did not hold it.
A reader vetting its layout, Copilot with its marker, keeps flagging an
unknown `<details>` rather than counting it.
- [#4222](#4222):
registers `ptr727/homeassistant-vantage-diagnostics` in the fleet
catalog, so its standup can be measured against the hub.

Closes #4219

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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