Skip to content

pr_review.py Has No Reader for Two Copilot Review Summary Shapes #1701

Closed

Description

@ptr727

Problem

scripts/pr_review.py wait returned status=UNRECOGNIZED_REVIEWER_OUTPUT with shapes=UNRECOGNIZED, naming two summary shapes it has no reader for. Per pr-review-conduct "Merge Gate" item 4 an unrecognized shape blocks the gate on its own, so filing this is the prescribed step rather than guessing what the wording meant.

Observed on ptr727/ESPHome-Config#153, head c7283c9c, round 3, with review_on_head=yes coverage=full effort=lite effort_source=explicit.

Shape 1, a counted section heading

summary: Previously missed (N)

Quoted exactly as the digest reported it, including the literal (N) rather than a number. Either Copilot emits the letter N as a placeholder, or the script's own reader substitutes it while counting. Both readings matter for a fix and I cannot tell them apart from the digest alone.

The semantics look load-bearing: a section that enumerates findings from an earlier round which the current round considers still open would need to be triaged under Merge Gate item 3 exactly as any other finding does. If it is instead a informational recap of findings already answered, it needs no triage. Treating the two the same is the risk.

Shape 2, a severity badge rendered as an inline picture element

summary: <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture> Overstates I2C bus requirement for all board templates

The finding text is real and was actionable: the claim it names was wrong and is fixed in be5016f. The unreadable part is the presentation. The severity now arrives as a theme-switched picture element whose only textual carrier is alt="Low severity", with the finding title following the closing tag.

A reader keying on a text severity marker gets nothing. The parse that survives this shape is to take severity from the alt attribute and the title from the text after </picture>. Note the filename also carries low-v2, which suggests the icon set is versioned and has already changed once.

Why this is worth fixing rather than tolerating

The digest is otherwise trustworthy and is what the loop reads to decide the Merge Gate. Under an unrecognized shape the script correctly refuses to let the loop close, which is the right failure mode, but it means any Copilot review carrying a severity badge now blocks every pull request's gate until a maintainer overrides it. That converts a routine review into a manual decision each time.

In this instance the blocked gate was benign, because the finding behind the badge was real and got fixed. The hazard is the reverse case, where the unreadable shape hides a finding nobody triages, which is precisely what item 4 exists to prevent.

Suggested direction

Add readers for both shapes, and prefer extracting severity from alt text over matching a literal marker, since a theme-switched picture is stable in its alt and unstable in everything else. If Previously missed (N) is Copilot's own placeholder rather than the script's, that is worth confirming against a second repository's review before writing a reader for it.

Activity

  1. ptr727 commented on Sep 19, 2026

    @ptr727
    OwnerAuthor

    Decoded the two shapes by reading the review body directly, which narrows the fix and shows the structure the reader needs.

    Review 5257085641 on ptr727/ESPHome-Config#153, head c7283c9c, with the <picture> badges collapsed to [SEVERITY-BADGE]:

    <!-- ccr-overview-v2 -->
    
    ## Copilot review overview
    
    ### 🔵 Needs a closer look
    
    OPERATIONS.md contains an overbroad statement about I2C conventions ...
    <!-- fleet-review: reviewed=13 changed=13 findings=1 -->
    
    **Review effort:** Lite
    **Findings:** None
    
    <details>
    <summary><strong>Resolved since last review (2)</strong></summary>
    
    - [SEVERITY-BADGE] [Capitalized package key breaks copy-paste example](#discussion_r4054187627)
    - [SEVERITY-BADGE] [Uppercase package keys won&#39;t match ESPHome config](#discussion_r4054187609)
    </details>
    
    <details>
    <summary><strong>Previously missed (1)</strong></summary>
    
    In code that hasn't changed since last review
    
    <details>
    <summary>[SEVERITY-BADGE] Overstates I2C bus requirement for all board templates</summary>
    
    `OPERATIONS.md:220`
    
    The last sentence in this bullet is too broad ...
    </details>
    </details>
    

    Four things a reader needs, that the digest could not surface:

    1. Previously missed (N) carries a real count and real findings, and the N in my original report was the script's own placeholder rather than Copilot's literal text. Here it is (1). The section wraps one nested <details> per finding, each <summary> holding the badge and title, with the path and body inside. So it does need item 3 triage, and a reader keying only on reviewThreads misses it, since these appear in the body.

    2. The section's own subtitle states its scope: "In code that hasn't changed since last review". That is the distinguishing text between a still-open carry-over and a recap, and it is inside the details rather than in the summary.

    3. Coverage already arrives machine-readable in an HTML comment the digest does not appear to read: <!-- fleet-review: reviewed=13 changed=13 findings=1 -->. That is a stronger coverage signal than the prose, and it reported coverage=full correctly here, so this may already be the source. Worth confirming, because it also contradicts the line below it.

    4. **Findings:** None sits four lines under findings=1. The prose counts only new findings on changed code, while the marker counts the carry-over too. A reader trusting the prose line would report a clean review over an open finding.

    On severity: alt="Low severity" is the only stable textual carrier, and the icon path is versioned (low-v2), so keying on the alt attribute rather than the filename or a text marker is the parse that survives.

    For what it is worth on the blocking question, the gate held correctly here but the concealed content was benign: the one hidden finding was real, I read it and fixed it in be5016f, and nothing else was hiding. So for this pull request the unreadable shape cost a round rather than a missed defect.

  2. ptr727 commented on Sep 19, 2026

    @ptr727
    OwnerAuthor

    Third shape, and this one is a one-line fix: the coverage marker's position varies, and the reader only handles one of the two.

    Two consecutive Copilot reviews on the same pull request, ptr727/ESPHome-Config#153:

    Round 3, head c7283c9c, marker on its own line, and the digest read coverage=full:

    OPERATIONS.md contains an overbroad statement about I2C conventions for "every board template" that should be corrected for accuracy.
    <!-- fleet-review: reviewed=13 changed=13 findings=1 -->
    

    Round 4, head be5016ff, marker appended inline to the end of the prose sentence, and the digest read coverage=unstated:

    The changes are consistent across templates (notably the `i2c:` list-entry merge behavior), and the new Heltec board/overlay templates appear internally coherent and compile-testable as added. <!-- fleet-review: reviewed=13 changed=13 findings=0 -->
    

    Same marker, same reviewed=13 changed=13, same repository, one round apart. The only difference is a newline. So coverage=unstated on round 4 is a false negative, and under Merge Gate item 2 a false unstated is the expensive direction: it sends the loop round again for a review that already stated full coverage, which is what happened here.

    Suggested fix: match the fleet-review comment anywhere in the body rather than anchored to line start.

    For completeness, round 4's full overview, badges collapsed, since it is the clean case and shows the shape when there is nothing to report:

    <!-- ccr-overview-v2 -->
    
    ## Copilot review overview
    
    ### 🟢 Approval recommended
    
    The changes are consistent across templates ... <!-- fleet-review: reviewed=13 changed=13 findings=0 -->
    
    **Review effort:** Lite
    **Findings:** None
    

    Note that here **Findings:** None and findings=0 agree, where in round 3 the prose said None while the marker said 1. So the prose line is only reliable when there is no carry-over section, which is the same conclusion as my earlier comment but now with both cases side by side.

  3. ptr727 commented on Sep 21, 2026

    @ptr727
    OwnerAuthor

    Both shapes recurred on a second pull request, ptr727/ESPHome-Config#165, a two-file documentation change reviewed over six rounds. New evidence below, rather than a restatement of what the issue and the first comment already establish.

    The block is per round, not per pull request

    The gate blocked on two separate heads in one review loop, 04b97bf2 and 249de868, each needing its own maintainer reading. The cost estimate in "Why this is worth fixing" holds, and it compounds with round count rather than with pull request count.

    Previously missed carried findings raised for the first time, not carry-overs

    Both occurrences named a finding no earlier round had raised, against lines the current push had not touched:

    • Round on 04b97bf2, against OPERATIONS.md:220, which the previous commit had edited two rounds earlier: "Clarify api_reboot_timeout comparison to run_duration".
    • Round on 249de868, against templates/apollo-plt-1b.yaml:15: "Add missing that in condition wording".

    Both were real and both were fixed. This sharpens point 1 of the first comment: the section is not a recap of findings already answered and not only a carry-over of ones still open, it is also where the reviewer puts a finding it raises for the first time against unchanged lines. All three readings need item 3 triage, so a reader can treat the section uniformly, but the third one means the count can grow on a round where nothing new was pushed.

    A single finding can name more than one location

    The 249de868 entry ends with "This issue also appears on line 35 of the same file", inside the nested details body rather than as a second entry. A reader counting entries undercounts locations, and a reply that fixes only the named line leaves the other one open.

    The marker count does not follow a rule I could fit

    Six rounds, read from the review bodies. marker is findings= inside the fleet-review HTML comment, prose is the **Findings:** line, and the sections are the details blocks in body order.

    head marker prose sections
    9a6fe0ef 1 1 Open (1)
    98ecd548 first round absent None Resolved since last review (1)
    98ecd548 second round 1 1 Open (1)
    d8f823c8 2 1 Open (1), Resolved (1)
    04b97bf2 1 None Resolved (1), Previously missed (1)
    249de868 3 1 Open (1), Previously missed (1)

    d8f823c8 fits "open plus resolved". 04b97bf2 does not, since two entries yield a marker of 1. 249de868 fits neither, and only reaches 3 if the second location inside the previously-missed entry counts separately. One round emitted no marker at all. I did not find a rule that fits all six, which is the thing worth knowing before keying a reader on that number.

    Marker placement also varied within the same pull request, inline at the end of the summary sentence on 9a6fe0ef, 98ecd548 and 04b97bf2, and on its own line on d8f823c8 and 249de868. #1722 covers what that does to coverage reading, and these rounds are consistent with it.

    Status

    ptr727/ESPHome-Config#165 is held on this. Its own content is settled, every thread is resolved and the body findings are answered, and the loop does not close because the digest cannot be trusted while a shape is unread. It is waiting on a reader for these shapes rather than on anything in the pull request.

  4. ptr727 commented on Sep 21, 2026

    @ptr727
    OwnerAuthor

    Correcting my own claim above, with a further round of evidence.

    I wrote that the block is per round. It is per pull request and sticky. The shapes accumulate across the whole review history rather than being read from the round covering the head, so once either shape appears on any round, every later digest for that pull request carries it.

    Round 7 of ptr727/ESPHome-Config#165, head d5c79c77, is completely clean on its own terms:

    review_on_head=yes coverage=full shapes=UNRECOGNIZED refusal=no threads=4 unresolved=0 suppressed=0
    

    with the review body reporting <!-- fleet-review: reviewed=2 changed=2 findings=0 -->, **Findings:** None, and one Resolved since last review (1) section. No Previously missed block and no open finding.

    The digest still reports UNRECOGNIZED REVIEWER OUTPUT (4), and names the round each shape came from:

    summary: Previously missed (N)  (round 04b97bf2)
    summary: [severity badge] Clarify api_reboot_timeout comparison to run_duration  (round 04b97bf2)
    summary: Previously missed (N)  (round 249de868)
    summary: [severity badge] Add missing "that" in condition wording  (round 249de868)
    

    Both cited rounds are two and three heads back. So a loop cannot clear this by driving the pull request to a clean round, which is the remedy the status text otherwise implies when it says to file this issue before closing the review loop. The only exits are the reader landing or the maintainer overriding.

    Whether that accumulation is intended is worth deciding alongside the reader. Reading shapes only from the round covering the head would let a clean round close the loop, at the cost of losing an unread shape from an earlier round that may have hidden a finding nobody triaged. Keeping the accumulation is defensible for exactly that reason, and if it stays, the status text could say the block is not clearable by another round.

  5. added a commit that references this issue on Sep 21, 2026
    f9b53ef
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions