You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Read a Section Heading Through One Reduction in pr_review.py #3174
#3172 taught pr_review.py the count-first overview summaries, and its local review left two findings on the same root, deferred here by the maintainer's choice rather than fixed in a fifth round. Neither is an observed shape.
A count compared where an identity is needed.unrecognized_in reports a vetted previously-missed summary that no reader finds by comparing how many such summaries the body carries with len(previously_missed_blocks(body)). marker_blocks returns at most one block per region, so two previously-missed sections nested in one Review details wrapper read as one block holding both, the way develop reads them, while the check reports an unread shape and the loop exits 43. The reverse also holds: a bare (N) line qualifying in one region can stand in for a summary missed in another, so the counts match and the miss goes unreported.
A heading's text is reduced in three places.normal reduces a severity badge to its word and drops emphasis before vetting, unwrap does the same before printing, and heading_count composes it a third time before reading a count. The leading count is also defined twice, normal's ^\d+(?= ) and LEADING_COUNT, and the two already differ: a summary <strong>2 then a form feed then open findings</strong> is vetted as the open-findings section while heading_count reads no count.
Expected
The check compares which vetted summaries were read, such as the set of summary lines marker_blocks matched, rather than how many.
One reduction primitive serves normal, unwrap, and heading_count, and one leading-count rule serves both vetting and counting, so the role a summary is vetted with and the count read from it cannot disagree.
Related: #3173, the finding-entry class from the same review.
Activity
Read Copilot's Count-First Overview Sections in pr_review.py (#3172)
Promote the Incidental Counts Rule and the Count-First Overview Reade…
Read a Section Heading Through One Reduction in pr_review.py (#3179)