Skip to content

[scanner] Auto-resolve same-issue duplicate open PRs: earlier green PR wins #14805

Closed

Description

@hivecommons-hive

Part of #14799.

Scope

A deterministic rule for two OPEN PRs that both close the same open issue:

  • The earlier-created PR wins while its checks are green or pending.
  • The later PR gets exactly one comment Superseded by #<keeper> (earlier fix for #<issue>). Closing as duplicate. and is closed with reason duplicate-of:<keeper>.
  • Only when the earlier PR is red or stale (>24h without an update) AND the later is green does the hive park the later PR at stage/085-needs-decision and ask the owner.
  • A later PR carrying author/human is never closed: it gets the comment and stays at 072.

Why

Today the supersession sweep only acts once an issue is closed by a merged PR, so two open fixes fall through to the reviewer swarm, which returns requires_human and parks both at 085 for the owner (#14775 vs #14780, #14771 vs #14776 on 2026-10-28).

Depends on

Independent of the pre-dispatch guard child of #14799 (that prevents new pairs; this resolves pairs that still form).

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 28, 2026
  2. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    ContributorAuthor

    Resolved by #14812 (merged): src/pkg/github/pr_duplicate_fix_sweep.go implements exactly this rule — earlier-created PR wins while green/pending, later hive PR gets one Superseded by #<keeper> (earlier fix for #<issue>). Closing as duplicate. comment and is closed with reason duplicate-of:<keeper>, author/human later PRs are commented but never closed, and only red/stale-earlier + green-later parks the later PR for the owner. Closing as completed.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions