Skip to content

Count Every Unresolved Review Thread in pr_review.py - #2693

Merged
ptr727 merged 3 commits into
developfrom
feature/auto-1404
Oct 10, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/auto-1404

Conversation

@ptr727

@ptr727 ptr727 commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

pr_review.py filtered open review threads by a set of known reviewer logins before counting them. A thread opened under a login outside that set dropped out of unresolved=, so status and wait printed a digest that read clean while a finding sat open. This implements the disposition recorded on #1404, direction 1: count every unresolved thread whoever opened it, and use the known logins only to attribute a thread in the breakdown.

  • open_reviewer_threads becomes open_threads, which keeps every unresolved thread regardless of author.
  • The breakdown beside unresolved= names any author outside the known set as other. It prints whenever more than one group contributes, or whenever other contributes at all, since that is the count a reader cannot assume.
  • unresolved_threads(), the reply command's paginated walk, now reuses open_threads instead of repeating the same filter.
  • The module docstring, the threads_truncated docstring, and the test summary in scripts/README.md now describe the new rule.

Callers re-checked

  • digest() counts and lists every open thread. Both of its callers, status and wait, throw away the count it returns, so no wait exit code changes. Exit 0 still means a review covers the head, not that the merge gate passed.
  • uncounted_verdict() (exit 50) now holds off while any thread is open, whoever opened it. Before, it held off only for a known reviewer's thread. It reports again once the thread is resolved, as it already did.

Tests

  • A thread from an unknown login is counted and shows as unresolved=1 (other=1). The digest that status and wait print carries it.
  • A thread from a deleted account is counted as other.
  • A maintainer's own open thread is counted and listed. The old test asserted the opposite and has been turned around.
  • uncounted_verdict holds off for an unknown login's open thread.
  • With the old filter put back, all six affected cases fail.

Closes on promotion: #1404

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Review digests now count all open review threads, including those from unknown or missing authors, and attribute them to the appropriate reviewer category.
    • Verdict checks now use the same all-thread counting rules, preventing uncounted-verdict alerts when a thread’s author is unknown.

ptr727 and others added 3 commits October 9, 2026 21:38
`unresolved=` filtered open threads by a set of known reviewer logins, so a
thread from an author outside that set dropped out of the count and the digest
read clean while a finding sat open. Count every open thread whoever opened it,
and use the known logins only to attribute a thread in the breakdown, where
any other author reads as `other`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 10, 2026 04:45
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →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: 4ef94aea-63c0-4e85-9043-d60c5fc5ee0d

📥 Commits

Reviewing files that changed from the base of the PR and between a762b07 and b662552.


📒 Files selected for processing (3)
  • scripts/README.md
  • 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

Open review threads now contribute to unresolved counts regardless of author. Known reviewer identities determine attribution; unmatched or null authors are grouped as other. The uncounted-verdict check and paginated retrieval also use the author-independent rule.

Changes

Open review thread counting

Layer / File(s) Summary
Use all open threads
scripts/pr_review.py, tests/test_pr_review.py
The uncounted-verdict check and paginated thread retrieval include unresolved threads regardless of author.
Attribute digest counts
scripts/pr_review.py, scripts/README.md, tests/test_pr_review.py
The digest counts all unresolved threads and attributes counts to known reviewers or other. Documentation and tests cover status and wait output.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes


Merge Risk: ⚪ Minimal · up to b6625

No actionable merge-blocking issue is identified; merge after normal checks.

Pre-merge checks | Passed 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 and concisely describes the primary change: counting every unresolved review thread in pr_review.py.
Docstring Coverage Passed Docstring coverage is 81.25% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 2 files. (1 skipped: 1 …
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

  • Autofix · 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.

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.

🟢 Approval recommended

The focused change matches the stated behavior and has targeted regression coverage.

0 open findings

What changed in this PR

This PR makes the review digest count every unresolved thread, so an unfamiliar author login cannot make an open thread appear absent.

Changes:

  • Count open threads regardless of author and label unknown authors as other.
  • Add regression tests and update the documentation.
File Description
tests/​test_pr_review.py Tests unknown, deleted, and maintainer-authored threads.
scripts/​README.md Updates the test summary.
scripts/​pr_review.py Counts all open threads and updates the breakdown.

🧠 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 10, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.58%. Comparing base (a762b07) to head (b662552).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2693   +/-   ##
========================================
  Coverage    59.58%   59.58%           
========================================
  Files           16       16           
  Lines         8316     8317    +1     
========================================
+ Hits          4955     4956    +1     
  Misses        3361     3361           
Flag Coverage Δ
python-3.13 59.58% <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.

@coderabbitai

coderabbitai Bot commented Oct 10, 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 ff99b26 into develop Oct 10, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-1404 branch October 10, 2026 04:59
ptr727 added a commit that referenced this pull request Oct 10, 2026
… Corrections to Main (#2740)

## Summary

Promotes 20 changes from `develop` to `main`:

- #2737: Flag a Lone Semicolon After an Explanatory Colon in the Prose
Gate
- #2734: Share pr_review.py wait's Liveness Readings and Open the Held
Poll on Its Snapshot
- #2732: Share One Bounded Backoff Loop Between pr_review.py wait's Two
Polls
- #2729: Document pr_review.py wait's Immediate 44 and check_nodes's
Node Keys
- #2727: Narrow pr_review.py wait's Exit 44 to Required Checks
- #2722: Poll an Attested Head's Checks in pr_review.py wait
- #2720: Name the Command That Enumerates Open Feature Pull Requests in
backlog-burndown
- #2718: Point the Skills Refresh Cadence at host-setup.md
- #2716: Fall Back to os.defpath for PATH in Two Test Harnesses
- #2714: State the Pip Form's Root-Config Type-Check Command in
python-codestyle
- #2712: State the Build Profile's CI Type Check as the Validator Runs
It
- #2709: Bring the Fleet-Map workflow-ci-contract Entry and G9 Gap Up to
the Skill Description
- #2707: Bring the Line-Endings Reference and a Test Docstring to the
Corrected Wording
- #2705: Drop the Stale Utilities driftNote From the Registry
- #2703: Remove the Inert SC2016 Directives in configure.sh and Correct
the shell-codestyle Claim
- #2701: Report Whether the Fleet Skills Plugin Is Installed and Enabled
in the Live Channel
- #2699: Align the Audit Report Template Dimensions With AUDIT.md
Section 4
- #2697: Harden the Source-Pinning Assertions in test_pr_review.py
- #2695: Name the Off-Grammar --branch Outcome in AUDIT.md
- #2693: Count Every Unresolved Review Thread in pr_review.py

Closes #1396
Closes #2731
Closes #2723
Closes #2725
Closes #2724
Closes #2685
Closes #1308
Closes #2191
Closes #1862
Closes #2711
Closes #2025
Closes #1243
Closes #1237
Closes #1115
Closes #1156
Closes #1757
Closes #1593
Closes #1732
Closes #1509
Closes #1404

🤖 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