Repository navigation
Bound a Section Whose Summary Shares Its Details Line in pr_review.py - #3204
Conversation
A <summary> on the line of the <details> opening it was not a heading line, so a sibling section opened that way never bounded the block before it. A suppressed block then ran on into a following previously-missed section and printed its findings twice, while each reader still found its own section and nothing reported the shape. HEADING now admits a <details> opener ahead of the summary. Fixes #3201
HEADING admitted a <details> opener ahead of the summary while heading_of kept it, so a count opening such a heading went unread. The section then read as one finding and its sibling never bounded, where the base reported the body as unrecognized. Both now share one DETAILS_OPENER pattern.
DETAILS_OPENER ended in \s*, so heading_of read past an opener standing on its own line too. It now stops at the line, and heading_of reads past it only where a summary follows, so every other first line reads as it did before.
|
A recorded local strict-review pass covers head |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
🔵 Needs a closer look
Restrict the shared opener pattern to the parser’s valid whitespace.
No open issues 🎉
What changed in this PR
Fixes parsing for <details><summary> sections that share a line, preventing duplicated findings and incorrect section boundaries.
Changes:
- Shares opener detection between heading parsing and extraction.
- Updates heading extraction for same-line sections.
- Adds regression tests for count formats and sibling boundaries.
| File | Description |
|---|---|
tests/test_pr_review.py |
Adds regression coverage for one-line details sections. |
scripts/pr_review.py |
Handles same-line details headings and section bounds. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3204 +/- ##
===========================================
+ Coverage 65.48% 65.49% +0.01%
===========================================
Files 17 17
Lines 9754 9758 +4
===========================================
+ Hits 6387 6391 +4
Misses 3367 3367
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DETAILS_OPENER, SUMMARY, FOLD_OPENER, and FOLD_STOP took Python's \s after a tag name, which admits a no-break space and the other Unicode spaces that do not separate an HTML tag's attributes. Each now uses [ \t\n\f\r], the set DETAILS_OPEN already uses.
The test covered HEADING and SUMMARY only, so reverting FOLD_OPENER and FOLD_STOP to \s passed it. It now asserts a tab after <summary folds and a no-break space does not, for both.
|
A recorded local strict-review pass covers head |
|
Answering the headline of Copilot's round on 2c7f7b32, which opened no thread and counted 0 findings ( Fixed in b84ce5d, with the test extended in 6c65dd0. The separator after the tag name was Python's |
|
@coderabbitai review |
✅ Action performedReview finished.
|
) - #3204 makes `pr_review.py` bound a section whose `<summary>` shares its line with the `<details>` that opens it. A suppressed block used to run on into a following previously-missed section opened that way and print its findings twice, with nothing reporting the shape. `heading_of` reads past the same opener, so a count opening such a heading is read. The attribute separator after a tag name in `DETAILS_OPENER`, `SUMMARY`, `FOLD_OPENER`, and `FOLD_STOP` is now HTML whitespace rather than Python's `\s`. The change is to scripts and tests only, so no installed Skill changes at release. Closes #3201 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
A section whose
<summary>shares its line with the<details>that opens it was not a heading line tosibling_heading, so a sibling opened that way never bounded the block before it. A suppressed block then ran on into a following previously-missed section and printed its findings twice, under the suppressed banner. Each kind's reader still found its own section, so the vetted-but-unread check had nothing to report.HEADINGadmits a<details>opener ahead of<summary>on the same line, through a sharedDETAILS_OPENERpattern.heading_ofreads past that opener where a summary follows it on the line. Without that, a count opening such a heading (<strong>2 previously missed issues</strong>) went unread: the section counted as one finding and its sibling never bounded, where the base had reported the body as unrecognized. The local strict review found this regression in the first cut.Tests
test_a_section_opening_on_its_details_line_bounds_the_one_beforeruns a count-closing and a count-opening previously-missed heading after a one-line suppressed section. Both subtests fail on the base. With only theheading_ofchange reverted, the count-opening one fails.Local review
Three recorded passes at the
frontiertier. The first two raised findings that were fixed in this branch, and the third raised none.Refs #3201
🤖 Generated with Claude Code
Summary by CodeRabbit
<details>sections, including headings that share a line with the opening tag.