Repository navigation
Description
stated_total reads only the first number on a ccr-overview-v2 round's **Findings:** line, and that line states a count per severity rather than one total. The reading feeds unlisted_findings, whose whole purpose is to catch a finding a round states and opens no thread for, so the undercount zeroes that check in exactly the case it exists for.
The line's real shape
Measured on this repository's own corpus, badges collapsed to their severity:
1694 095da786 **Findings:** 2 [Medium] · 3 [Low] marker: findings=5, section: Open (5)
1696 9ff38fe7 **Findings:** 1 [Low] marker: findings=1, section: Open (1)
1694 8783f4ef **Findings:** None marker: findings=0
The first round states five findings as two numbers joined by a middle dot. CCR_FINDINGS is ^ {0,3}\*\*Findings:\*\*\s*(\d+|[Nn]one), anchored to the line start, so it captures 2 and never sees the 3. stated_total takes the maximum over the preamble's matches, which does not help: there is one match on that line.
Demonstrated against the function
case stated_total true
single severity 1 1
none 0 0
two severities, the shape 095da786 carried 2 5 <-- undercount
two severities, low first 1 5 <-- undercount
Why it matters, rather than being cosmetic
unlisted_findings is max(0, stated - threads). A round stating 3 [Medium] · 2 [Low], five findings, that opens three threads and withholds two is read as stated=3, threads=3, so the shortfall is 0 and FINDINGS WITH NO THREAD never prints. That is the false green the field was added to prevent, and it fires on any round carrying more than one severity.
On 095da786 itself nothing was lost, since that round opened a thread for all five, so 2 - 5 floors to zero either way. The exposure is a multi-severity round that also withholds, which this corpus has not produced yet.
Shape of the work
- Read every
count badgepair on the line and sum them, rather than the first number alone. The severities observed areMediumandLow, and the separator observed is a middle dot, but the sum should come from counting the pairs rather than from splitting on a separator, since the separator is presentation. - Keep
Noneas a stated zero, which it already is, and keep the preamble scoping and the largest-wins rule for a body stating more than one total. - A case per shape: one severity, two severities in each order,
None, and a line whose number is followed by no badge at all. - Whether the marker's own
findings=Nshould be preferred over the prose line where both are present is a separate question. On this corpus the marker agrees with the section count in every round that carries one, and the prose line is the only source when it does not.
Found while measuring #1692, which is about the same format's coverage statement rather than its finding total.
Activity
Bound the Carried Coverage Statement, and Sum the Per-Severity Findin…