Skip to content

Commit 3fd145b

Browse files
kai392RealDiligentcursoragent
authored
docs(queue): fix reconcileLiveDuplicateSiblings stale comment (#7817)
Describe claim-time duplicate-winner election (#3816) instead of the obsolete PR-number-based wording. Closes #7810. Co-authored-by: RealDiligent <brave.challenge007@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2454680 commit 3fd145b

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/queue/duplicate-detection.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@ export function dupWinnerLinkedDuplicateWinnerNumber(
6262
* Live-reconcile the duplicate cluster's open siblings before the winner is elected (#dup-winner / audit #15).
6363
*
6464
* The stored open-PR cache ({@link listOtherOpenPullRequests}) lags GitHub: a sibling that was closed/merged on
65-
* GitHub but is still cached `open` would keep "winning" the duplicate cluster, demoting the real lowest-OPEN PR
66-
* to a loser and auto-closing it via the `duplicate_pr_risk` blocker. Only a LOWER-numbered overlapping sibling
67-
* can demote this PR from winner, so re-fetch the LIVE state of just those siblings and drop any that are no
68-
* longer open. Then the downstream election ({@link isDuplicateClusterWinnerByClaim}) reflects ground truth.
65+
* GitHub but is still cached `open` would keep "winning" the duplicate cluster, demoting the true earliest
66+
* claimant to a loser and auto-closing it via the `duplicate_pr_risk` blocker. Duplicate-winner election is
67+
* claim-time based ({@link resolveDuplicateClusterWinnerNumber}, #3816): any overlapping sibling — lower or
68+
* higher PR number — can demote this PR if it claimed the linked issue earlier, so re-fetch the LIVE state of
69+
* all overlapping siblings and drop any that are no longer open. Then the downstream election
70+
* ({@link isDuplicateClusterWinnerByClaim}) reflects ground truth.
6971
*
7072
* FAIL-OPEN to the stored state: a sibling is dropped ONLY on a positive "not open" confirmation — an unreadable
7173
* live fetch keeps it, so a transient GitHub hiccup never newly spares a real loser. Flag-OFF (default), no
72-
* linked issues, or no lower overlapping sibling ⇒ returns the input unchanged with no extra API calls.
74+
* linked issues, or no overlapping sibling ⇒ returns the input unchanged with no extra API calls.
7375
*/
7476
export async function reconcileLiveDuplicateSiblings(
7577
env: Env,

0 commit comments

Comments
 (0)