Skip to content

pr_review.py Counts a Back-Reference to an Unread Thread as a Finding With No Thread #2621

Closed

Description

@ptr727

Problem

scripts/pr_review.py's unthreaded_entries counts every distinct thread id the head round's open sections link, across every link of every entry, and adds each id no fetched thread carries to the FINDINGS WITH NO THREAD count. An entry whose own title anchor is a thread on the pull request, and which also carries a back-reference to an id no fetched thread carries, therefore adds one to the block although that entry has a thread.

Constructed shape, where #discussion_r4000000001 is a thread on the pull request and #discussion_r4000000009 is not among the threads read (for example a thread past the hundred reviewThreads reads):

<details open>
<summary><strong>1 open finding</strong></summary>

- [Finding 1](#discussion_r4000000001) New, see [earlier](#discussion_r4000000009)
</details>

The block prints a shortfall of 1 for a round whose one finding has its thread.

This is the same per-link reading the open-findings comparison used before it was changed to count entries (the fix for #2569). carried_open_threads already reads an entry by its first link, its title's own anchor, so that per-entry reading exists to apply here. The error only overstates, which is the direction the script picks deliberately, so it hides nothing.

Done when

  • unthreaded_entries counts an entry by its own title anchor rather than by every link it carries, or the decision to keep the per-link overstatement is recorded in its docstring.
  • A test feeds the constructed shape above.

Activity

  1. added
    bug
    script
    on Oct 9, 2026
  2. added a commit that references this issue on Oct 9, 2026
    9c33c72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions