Skip to content

Scanner dispatches issues that already have an open linked PR; duplicates escalate to owner instead of auto-resolving #14799

Closed
2 of 2 issues completed

Description

@clubanderson

Observed (hosted hive, 2026-10-28)

Root cause

The contributor-lane admission gate (evaluateContributorNeutralAdmission → issueClaimedByOpenPR) and the agent-lane admission gate (IssueClaimBlockReason) only consult the persisted duplicate-PR claim ledger, which is refreshed by the eval cycle's FetchClaimScan. A human-authored PR opened between scans is invisible to both gates until the next cycle, so the issue stays claimable for several minutes after its fix is already open. Nothing then resolves the resulting pair of same-issue PRs: the supersession sweep only acts once an issue is closed by a merged PR, so two open fixes fall to the reviewer swarm, which asks the owner.

Fix

  1. Pre-dispatch guard — before any automated claim (ledger admission, claim relay request, contributor lane), check live for an OPEN PR whose title/body links the issue with a closing keyword (one open-PR listing per repo, cached per sweep). If found: refuse the claim, label the issue has-open-pr (created if missing, idempotent), log claim skipped: open PR already linked with the PR number, and surface the reason on the tracker. Configurable via scanner.skip_issues_with_open_pr (default true).
  2. Auto-resolve same-issue duplicate PRs — a deterministic rule: when two open PRs both close the same open issue, the earlier-created PR wins while its checks are green or pending; the later one gets 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 085 and ask the owner. A human-authored later PR (author/human) is never closed: it gets the comment and stays at 072.

Activity

  1. hivecommons-hive commented on Oct 28, 2026

    @hivecommons-hive
    Contributor

    Decomposed into two sub-issues so each lands as one reviewable PR (the two fixes are independent and together span the admission gates, the claim relay, the contributor lane, config and the supersession sweep):

    Starting #14804 now; #14805 is picked up by the next cycle.


    🐝 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

  2. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @hivecommons-hive[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions