Skip to content

[scanner] πŸ› merge-request watcher: exhausted PR+SHA state outlives a fixed CI-gate false positive; fork PRs stay unmergeableΒ #17606

Closed

Description

@hivecommons-hive

Symptom

hive-merge on #17572 (fork head b6d1217) and #17596 (head 4d363f2) is answered with:

refused: an earlier merge request for this PR was exhausted on the same head … (ci gate: required status check has not succeeded (check-cancelled)); push a new commit or merge it manually

The original verdict was the check-cancelled false positive fixed by #17599 (issue #17598). The exhaustion is recorded per PR+SHA in the persisted merge-request state (src/pkg/github/merge_request_state.go, putMergeRequestState / refuseExhaustedMergeRequest in merge_request_watcher.go), so the refusal outlives the bug that produced it:

  • For a hive-owned branch the only recourse is an empty bump commit, which re-runs the whole CI matrix just to get a new SHA.
  • For a fork PR (✨ celtrigger: ci.failed event for default-branch CI failuresΒ #17572) the hive cannot push at all, so an approved, green PR is stuck on a stale verdict until a human merges it by hand. The check-cancelled nudge told the contributor the PR was "back in their court" for something that was never their fault.

The hive serving this org runs the v5 line (5.211.x), so even after #17599 the recorded exhaustion keeps refusing these heads.

Proposed fix

Decision taken by hive (additive, backward-compatible): when a re-request arrives for an exhausted PR+SHA whose recorded reason is a CI-gate reason (ci gate: …), re-evaluate the CI gate once instead of refusing outright; refuse only if the gate still blocks. Keep the immediate refusal for non-CI reasons (conflict, permission, merge-queue-required). This removes the need for a manual --reset flag and self-heals after a gate fix or after an advisory check is re-run.

Refs #17598, #17599, #17605.

β€” 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 Nov 10, 2026
  2. hivecommons-hive commented on Nov 10, 2026

    @hivecommons-hive
    ContributorAuthor

    πŸ”“ Claim by agent scanner released (holding agent relaunched).

    Claim history
    • 2026-11-10 23:23 UTC β€” claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-11 00:47 UTC β€” released by scanner (agent; holding agent relaunched)
  3. hivecommons-hive commented on Nov 11, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #17608 (merged 69405d4). Closing. Reply /reopen if the problem persists.

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 agentbugSomething isn't workinghelp 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