Skip to content

Read an Absolute-URL Thread Link in Copilot's Open-Findings Section in pr_review.py #2676

Closed

Description

@ptr727

Symptom

pr_review.py status prints FINDINGS WITH NO THREAD (N) with "its open section listing 0 with a link" on a Copilot ccr-overview-v2 round whose open-findings section links every entry to its thread. Seen on #2675 and #2668, both at review_on_head=yes with each listed finding open as a review thread.

Root cause

DISCUSSION_LINK in scripts/pr_review.py is \]\(#discussion_r(\d+)\), so it matches only a fragment-relative link. The open-findings section now writes each entry's link as an absolute pull request URL with the fragment at its end. A constructed entry in that shape:

- <picture>...<img alt="High severity" ...></picture> [Example finding title](https://github.com/example-owner/example-repo/pull/1#discussion_r1001) · New

ENTRY_LINE matches the entry, DISCUSSION_LINK does not, so read_overview returns the section with an empty id list and linked == 0, and every entry reads as a finding with no thread.

Effect

The shortfall block fires on every such round, sending the reader to the review body to triage findings that are already threads. The count it prints is wrong rather than conservative, so a real unthreaded entry beside the threaded ones is indistinguishable from the false ones.

Expected

DISCUSSION_LINK accepts an absolute link to this pull request ending in #discussion_r<id>, alongside the relative form, with a test carrying the constructed entry above.

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

    scriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions