Skip to content

Count Carried-Over Open Findings in pr_review.py's Shortfall Comparison - #2618

Merged
ptr727 merged 5 commits into
developfrom
feature/auto-2481
Oct 9, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/auto-2481

Conversation

@ptr727

@ptr727 ptr727 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

pr_review.py compared a Copilot round's preamble finding total against only the threads that round opened. A later round's total counts findings still open across rounds, and its Open (N) section links threads an earlier round opened. So the digest printed a standing FINDINGS WITH NO THREAD block about findings that already have threads.

  • carried_open_threads counts each open entry standing for a thread on this pull request that an earlier round opened, and the comparison counts it beside the round's own threads. M in overview=T/M still reads the threads the round itself opened.
  • An entry stands for its title anchor, its first link, and is carried only where that anchor is a known thread and the entry links none this round opened. So a back-reference cancels no shortfall, and two entries standing for one earlier thread count once. read_overview now keeps each section's thread ids per entry for this.
  • The block names how many threads it counted that way, so a reader sees why the comparison moved.
  • An entry linking no thread on the pull request is still unthreaded_entries's to count, and a carried finding no entry links still reads as a shortfall.
  • round_threads, read_overview, the module docstring, and scripts/README.md now say the above.

Tests

Constructed fixtures cover:

  • a later round restating an earlier round's two open findings with no thread of its own, which prints no block
  • a mixed round where an entry linking the round's own thread is not counted twice
  • an entry linking no thread
  • a back-reference on the round's own finding
  • two entries standing for one earlier thread, with a back-reference id that sorts first
  • an entry whose title links no thread, beside a back-reference to an earlier one

Reverting each fix fails the case written for it.

Remaining Local Review Finding

The first push's local strict-review budget ran out with one introduced finding open, listed here for this pull request's review loop to dispose of.

  • introduced: carried_open_threads keyed an entry by the first link matching a known thread rather than by its title anchor, so an entry whose title named no thread could count as carried while unthreaded_entries also counted it. Outcome: fixed in 5491dd4, with a test for that shape.

Closes on promotion: #2481

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 8, 2026 21:16
A preamble finding total counts what is still open across rounds, so a
later round that opened no thread of its own could state findings an
earlier round raised, and the digest printed them as findings with no
thread. Each open-section entry linking a thread an earlier round opened
is now counted beside the round's own threads before the two are
compared, and the block names how many it counted that way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
One entry can link a thread beside its own, so counting carried links
let a back-reference on a round's own finding cancel a real shortfall.
An entry now stands for an earlier round's thread only where it links
none this round opened. The exception list in the docstring and README
now names the carried credit beside the count-first section.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keying by the smallest id made the dedupe depend on how ids sort, so a
back-reference on a second entry could count one earlier thread twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 9, 2026 04:24
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fcae33c5-7357-48ac-b2e3-0f9f4d26d1d6
  • 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 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.30%. Comparing base (127de64) to head (1fd8d8e).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2618      +/-   ##
===========================================
+ Coverage    59.25%   59.30%   +0.05%     
===========================================
  Files           16       16              
  Lines         8263     8274      +11     
===========================================
+ Hits          4896     4907      +11     
  Misses        3367     3367              
Flag Coverage Δ
python-3.13 59.30% <100.00%> (+0.05%) ⬆️

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 cross-round counting logic warrants human signoff, and two minor diagnostic and documentation issues remain.

2 open findings
What changed in this PR

This PR updates pr_review.py so its digest does not report carried-over open findings as missing threads when their entries link to threads from earlier rounds.

Changes:

  • Count linked, carried-over threads alongside threads opened by the current round when checking for a shortfall.
  • Add fixtures for carried findings, mixed rounds, and unlinked entries.
  • Update the digest documentation.
File Description
tests/​test_pr_review.py Adds fixtures for the shortfall comparison.
scripts/​README.md Explains how carried-over findings affect the digest.
scripts/​pr_review.py Implements the count and updates its diagnostic and documentation.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/pr_review.py Resolved
Comment thread scripts/pr_review.py Resolved
ptr727 and others added 2 commits October 8, 2026 21:31
An entry whose title names no thread fell through to a back-reference
and counted as carried while unthreaded_entries also counted it, which
could read the shortfall one low. The digest now says how many threads
an earlier round opened, and round_threads no longer says a carried
entry prints a standing shortfall.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The README and module docstring described the credit as any entry
linking an earlier thread, and round_threads said the shortfall adds
carried entries where the comparison counts them beside M.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 1fd8d8ea7ece7cc4b9fffa1307ddf9472fa7b394, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 9099131 into develop Oct 9, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/auto-2481 branch October 9, 2026 04:38
ptr727 added a commit that referenced this pull request Oct 9, 2026
…w.py (#2619)

## Summary

Promotes develop to main.

- #2618: count an open entry standing for an earlier round's thread
beside the threads a Copilot round opened, so `pr_review.py` no longer
prints a standing `FINDINGS WITH NO THREAD` block for findings carried
over from an earlier round.

Fixes #2481

🤖 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants