From 313eead2290767d6c5fa59c6a6c73349d7b7c1cc Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 26 Oct 2026 18:11:14 -0700 Subject: [PATCH] Teach the Copilot Reader the Unresolved Findings Label Copilot's overview now introduces its remaining findings under an "Unresolved findings:" label, which the reader listed in neither its labels nor its finding lists, so the part read as unplaced and a finding present only in the body went uncounted as unthreaded. Add the spelling to both lists, as "open findings remain:" is, with a case per top-level finding-list spelling built from a constructed body. Closes #3513 Co-Authored-By: Claude Opus 5.5 --- scripts/reviewers/copilot.json | 10 ++++++++-- tests/test_pr_review_copilot.py | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/reviewers/copilot.json b/scripts/reviewers/copilot.json index 34bcebac..56abc331 100644 --- a/scripts/reviewers/copilot.json +++ b/scripts/reviewers/copilot.json @@ -42,8 +42,14 @@ ] }, "closed_badges": [], - "labels": ["changes:", "review findings:", "findings:", "open findings remain:"], - "finding_lists": ["review findings:", "open findings remain:"], + "labels": [ + "changes:", + "review findings:", + "findings:", + "open findings remain:", + "unresolved findings:" + ], + "finding_lists": ["review findings:", "open findings remain:", "unresolved findings:"], "effort": "review effort(?: level)?:? *(?:default *\\( *(?Plite|balanced|max) *\\)|(?Plite|balanced|max))", "table_header": "file", "discussion_link": "#discussion_r(?P\\d+)$" diff --git a/tests/test_pr_review_copilot.py b/tests/test_pr_review_copilot.py index b927dcad..ed18e622 100755 --- a/tests/test_pr_review_copilot.py +++ b/tests/test_pr_review_copilot.py @@ -330,6 +330,18 @@ def test_a_findings_list_longer_than_the_threads_is_unthreaded(self) -> None: ) self.assertEqual(1, found.unthreaded) + def test_each_top_level_findings_list_spelling_is_placed_and_counted(self) -> None: + for label in ("Review findings:", "Open findings remain:", "Unresolved findings:"): + with self.subTest(label=label): + listed = f"**{label}**\n- P1 moderate: one.\n- P2 nit: two.\n- P2 nit: three." + found = adapter.read( + body(sections=f"{open_section()}\n\n{listed}\n\n{what_changed()}"), + threads=("101", "102"), + ) + self.assertEqual(1, found.unthreaded) + self.assertEqual((), found.notes) + self.assertEqual((), found.unplaced) + def test_a_nested_back_reference_is_not_an_entry(self) -> None: nested = open_section().replace( "\u00b7 New\n- ", "\u00b7 New\n - see [earlier](#discussion_r999)\n- ", 1