Skip to content

Read Every Section of a Kind When Sections Alternate in One Wrapper in pr_review.py - #3194

Merged
ptr727 merged 3 commits into
developfrom
fix/3180-interleaved-sections
Oct 18, 2026
Merged

ptr727 merged 3 commits into
developfrom
fix/3180-interleaved-sections

Conversation

@ptr727

@ptr727 ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

For #3180. marker_blocks followed its chain of section bounds only while each bound matched its own marker. So one wrapper holding a suppressed section, then a previously-missed one, then a second suppressed one left the third section unread. The digest counted one suppressed finding of three under shapes=ok.

  • The walk now visits every bound sibling_heading returns. It opens a block only where the marker matches and skips a sibling of the other kind to that sibling's own bound. Prose past a bound is still never scanned, since only bound lines are visited.
  • outside_diff_blocks is unchanged in behavior, because CodeRabbit's marker matches no section bound.

Verification

  • The new test test_sections_alternating_in_one_wrapper_are_each_read builds the issue's body from vetted summary spellings. It asserts two suppressed blocks, suppressed=3, shapes=ok, and each finding printed once. It also covers the swapped kinds, where it asserts no unrecognized shape.
  • With develop's pr_review.py, the test fails at 2 != 1. With the fix it passes.
  • The full tests.test_pr_review suite passes, and ruff, mypy, the prose gate, and the eol gate are clean.
  • The local strict review took two rounds. Round 1 found that the test's docstring claimed shapes=ok for a body whose Markdown heading is unvetted, and fcbc3de fixes that. It also found a pre-existing gap, filed as Check Suppressed Summaries for a Vetted-but-Unread Section in pr_review.py #3193: the vetted-but-unread check covers previously-missed summaries only. Round 2 found nothing.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 17, 2026 16:35
…n pr_review.py

marker_blocks followed its chain of bounds only while each bound matched
its own marker, so a suppressed section, then a previously-missed one,
then a second suppressed one in the same wrapper left the third section
read by nobody. The walk now visits every bound, opening a block only
where the marker matches and skipping a sibling of the other kind to its
own bound. Prose past a bound is still never scanned.

Fixes #3180

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Markdown previously-missed heading the test used is no vetted
spelling, so the old digest reported that body as unrecognized rather
than silently undercounting it. Spelled as vetted summaries, the body is
the silent shape the test describes, and it now asserts shapes=ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 17, 2026 23:40
@ptr727

ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7bf11be6-f528-454b-b4e2-f76a6b16fb1a
  • 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

Comment @coderabbitai help to get the list of available commands.

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.

🟢 Approval recommended

The remaining test assertion nit is minor and does not block approval.

1 open issue
What changed in this PR

This pull request fixes alternating section traversal in pr_review.py and adds regression coverage.

Changes:

  • Traverses all sibling section bounds while matching markers.
  • Tests alternating suppressed and previously missed sections.
File Summary
tests/​test_pr_review.py Adds alternating-section regression tests.
scripts/​pr_review.py Fixes section-bound traversal.

Review effort: Lite

Comment thread tests/test_pr_review.py
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.47%. Comparing base (0b5954f) to head (d8ef960).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3194      +/-   ##
===========================================
+ Coverage    65.44%   65.47%   +0.02%     
===========================================
  Files           17       17              
  Lines         9750     9751       +1     
===========================================
+ Hits          6381     6384       +3     
+ Misses        3369     3367       -2     
Flag Coverage Δ
python-3.13 65.47% <100.00%> (+0.02%) ⬆️

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.

… in pr_review.py

The test checked the first and third suppressed findings but never the second, which shares the third's block. It now asserts the second sits in that block and prints once in the digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit c41e5c0 into develop Oct 18, 2026
13 checks passed
@ptr727
ptr727 deleted the fix/3180-interleaved-sections branch October 18, 2026 00:00
ptr727 added a commit that referenced this pull request Oct 18, 2026
…o Main (#3195)

- #3194 makes `marker_blocks` in `pr_review.py` visit every section
bound in a wrapper, opening a block only where its own marker matches. A
suppressed section after a previously-missed one in the same wrapper
used to go unread under `shapes=ok`. The suppressed reader's missing
vetted-but-unread check, which kept that silent, is #3193.
- #3192 makes `test_spec_validate`'s corpus test skip when the `node`
probe times out, the same way it skips when `node` is missing, so a slow
hosted runner no longer reads as an engine disagreement. A new test pins
the skip and proves that `node` refusing a pattern still errors.

The change is to scripts and tests only, so no installed Skill changes
at release.

Closes #3180
Closes #3182

🤖 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