Skip to content

Bound a Suppressed Block at a One-Line Previously-Missed Section in pr_review.py #3201

Closed

Description

@ptr727

The shape

sibling_heading bounds a block only on a line HEADING.match accepts. A section whose <details><summary> opens on one line is not such a line, so a suppressed block followed in the same wrapper by a previously-missed section written that way runs on into it.

The previously-missed reader still opens its own block for that section, so each kind's vetted summaries match what its reader read, and unrecognized_in reports nothing. The counts come out right. The previously-missed findings print twice in the digest, the second time under the suppressed banner, which asserts the opposite triage about them.

A constructed case: a Review details wrapper nesting <details><summary>Suppressed comments (1)</summary> and then <details><summary>Previously missed (1)</summary>, each on one line. suppressed_blocks returns one block holding the previously-missed heading, previously_missed_blocks returns one block, and unrecognized_in returns [].

Expected

A section opening on a one-line <details><summary> bounds the block before it as a heading line does, or the cross-kind over-run is reported as an unread shape. A test pins it with the constructed case above.

Found by the local strict review on the #3193 fix, where it predates that branch and lies outside its diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions