From 3dbbe671c555484d6c158b846697a80842d89052 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 26 Oct 2026 18:24:30 -0700 Subject: [PATCH] Teach the Copilot Reader the Unresolved Findings Label (#3514) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Copilot's review overview now introduces its remaining findings under an `Unresolved findings:` label. The Copilot reader in `scripts/reviewers/copilot.json` listed that spelling in neither `labels` nor `finding_lists`. As a result, `pr_review.py status` reported the part as unplaced, and a finding that appeared only in the body was not counted as `unthreaded`. ## Changes - Add `unresolved findings:` to both `labels` and `finding_lists`, the same way `open findings remain:` is listed. Adding it to `labels` alone, which is what #3513 proposed, would only silence the notice. The body-only finding would still be missed, because `finding_lists` is what counts listed items against linked threads. - Add one test that runs each top-level finding-list spelling through a constructed body. Each case asserts one unthreaded finding, no notes, and nothing unplaced. Before the fix, the test failed only on the new spelling, with `unthreaded` at 0 where 1 was expected. ## Verification - The full suite passes under `uv run --no-project --with-requirements tests/requirements.txt python -m unittest discover -s tests`: 3037 tests OK, 7 skipped. - The hub's `.husky/pre-commit` gates pass: ruff format and lint, mypy, the prose gate, and eol. - A local strict review ran at the `frontier` tier over this diff with zero findings. It is recorded as `agent-skill` against `develop`. Refs #3513, which the promotion pull request closes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 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