Skip to content

Read Copilot's Revised Overview Shape in pr_review.py - #2482

Merged
ptr727 merged 2 commits into
developfrom
fix/copilot-count-first-resolved
Oct 7, 2026
Merged

ptr727 merged 2 commits into
developfrom
fix/copilot-count-first-resolved

Conversation

@ptr727

@ptr727 ptr727 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

On 2026-10-07 Copilot revised its ccr-overview-v2 review body, and pr_review.py misread it in two ways:

  • The resolved section opens on its count. <summary><strong>3 resolved since last review</strong></summary> matched no vetted spelling, so a round carrying it exited 43, UNRECOGNIZED_REVIEWER_OUTPUT. normal() now rewrites a count opening a marker to (N), the way it already rewrote a bracketed count, and VETTED_SUMMARIES gains (N) resolved since last review.
  • The total moved to a bare **N open findings** line, and the **Findings:** line is gone. The total went unread, printed ?, and suppressed the shortfall it is compared for. stated_total() now reads that line too, CRLF bodies included.

This is a format change rather than a side effect of the GitHub incident the same morning. The revised shape first appeared on a round ahead of the incident window, and it is still present in rounds after the incident ended.

A fixture of the revised shape, with constructed titles and ids, covers both readers. Each new test was run against the unfixed script and failed. The comments label is on this PR because the vetted-list size comment changes, and a test requires that count.

Refs #2479. The pre-existing question of whether an open-findings total counts findings an earlier round raised is filed as #2481.

Verification

  • python3 -m unittest tests.test_pr_review: 605 tests OK
  • ruff format --check, ruff check, mypy: clean on both files
  • prose_lint.py --diff origin/develop --allow-comments, with and without --check sentence-length: clean
  • repo_gate.py --check eol, spec/validate.py: clean
  • Read-only check against the live revised bodies: no unrecognized markers, totals read as stated
  • Local strict review: two passes, recorded

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Review summaries now recognize revised resolved-count wording and totals stated in the overview, including singular and plural open-finding counts. Counts embedded in unrelated text or details sections are not treated as overview totals.
  • Tests
    • Added coverage for supported count formats and for reporting unrecognized summary wording.

ptr727 and others added 2 commits October 7, 2026 09:08
Copilot's ccr-overview-v2 body changed shape on 2026-10-07. The resolved
section's summary now opens on its count, "3 resolved since last review",
which no vetted spelling matched, so a round carrying it exited 43. The
same revision drops the "**Findings:**" line and states its total as a
bare "**0 open findings**" line, which went unread and printed "?".

normal() now rewrites a count opening a marker to "(N)", the vetted
summaries gain the count-first spelling, and stated_total() reads the
open-findings line. A fixture of the revised shape covers both.

Fixes #2479

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every sibling overview pattern tolerates a carriage return before the
line end, and this one did not, so a CRLF body read no total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 7, 2026 16:14
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 7, 2026
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5a5e0b1-613e-4ce1-861d-51c44d5fda4d
📥 Commits

Reviewing files that changed from the base of the PR and between e96cb58 and a85b8c4.

📒 Files selected for processing (2)
  • scripts/pr_review.py
  • tests/test_pr_review.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The review parser recognizes a revised resolved-summary form and reads open-finding totals from the overview preamble. Tests cover summary wording, count normalization, singular and plural totals, CRLF input, and excluded count locations.

Changes

Review summary parsing

Layer / File(s) Summary
Recognize resolved-summary counts
scripts/pr_review.py, tests/test_pr_review.py
The vetted summary list adds “(N) resolved since last review,” and normalization converts a leading integer followed by a space to (N). Tests cover accepted counts and reject changed wording.
Read preamble open-finding totals
scripts/pr_review.py, tests/test_pr_review.py
stated_total reads line-starting open-finding counts in singular or plural form. Tests cover CRLF input and ignore counts embedded in sentences or details sections.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a85b8

The revised summary forms and open-finding counts are covered by tests. Whether carried-forward findings can cause a misleading diagnostic remains unconfirmed; no actionable merge-blocking risk is established.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating pr_review.py to read Copilot's revised overview format. It is concise and specific.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.48%. Comparing base (e96cb58) to head (a85b8c4).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2482      +/-   ##
===========================================
+ Coverage    58.47%   58.48%   +0.01%     
===========================================
  Files           16       16              
  Lines         8062     8065       +3     
===========================================
+ Hits          4714     4717       +3     
  Misses        3348     3348              
Flag Coverage Δ
python-3.13 58.48% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The cumulative open-findings count is not safely compared against round-local findings.

0 open findings

What changed in this PR

Updates pr_review.py to support Copilot’s revised overview format, including count-first resolved summaries and bare open-findings totals.

Changes:

  • Adds revised summary and total parsing, including CRLF bodies.
  • Adds regression fixtures and tests.
  • Requires correcting cumulative open-count handling before approval.
File Description
scripts/​pr_review.py Extends overview parsing; cumulative open counts can produce false shortfalls or missing-thread findings.
tests/​test_pr_review.py Adds coverage for revised overview formats and edge cases.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727

ptr727 commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 2a49747 into develop Oct 7, 2026
12 of 13 checks passed
@ptr727
ptr727 deleted the fix/copilot-count-first-resolved branch October 7, 2026 17:10
ptr727 added a commit that referenced this pull request Oct 7, 2026
….py, and install-tools.ps1 (#2489)

## Summary

Promotes four changes to `main`. Three are fixes from the Windows-host
lane, each verified on a native Windows 11 host.

- [#2484](#2484): the six
`test_bootstrap` tests that execute `install-tools.sh` directly now skip
off Linux instead of erroring with `WinError 193`. Linux CI still runs
them.
- [#2485](#2485):
`carry.py`'s worktree-registration check compares resolved paths instead
of strings, so it no longer refuses every registered worktree on
Windows. Its change lines print POSIX paths on every host.
- [#2486](#2486):
`install-tools.ps1` reads a winget Version token that is not a version,
such as `Unknown`, `<` or `>`, as an unread installed version. The tool
reports `unknown` rather than `outdated`, and `-Install` leaves it alone
instead of installing over it.
- [#2482](#2482):
`pr_review.py` reads Copilot's revised overview shape. Refs #2479.

Closes #2473
Closes #1117
Closes #2258

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants