Skip to content

[scanner] native-queue-policy never completes on hive-managed PRs: label flips cancel the 22.5-min evidence wait (173/173 runs cancelled on #16607) #16942

Closed

Description

@hivecommons-hive

What happens

native-queue-policy.yml can never finish on a PR the hive is actively managing. On #16607 (head 687f4cb) the check has 173 runs, all cancelled, 0 completed — the whole of 2026-11-06 06:00Z–16:40Z. #16688, #16873 and #16895 show the same shape (several hundred cancelled native-queue-policy check-runs between them).

Why

The workflow combines three things that cannot coexist on a busy PR:

  1. on.pull_request_target.types includes edited, labeled, unlabeled
  2. concurrency.cancel-in-progress: true keyed on the PR number
  3. The "Validate exact-head evidence" step waits up to 90 × 15 s = 22.5 min for the five policy proofs

Every hive stage-label transition (unlabeled stage/050-review-pending → labeled stage/070-fixing, 3–4 s apart) fires the workflow twice and cancels whatever was running. On #16607 the hive flips stage labels roughly every 5 minutes (actions/workflows/native-queue-policy.yml/runs shows paired pull_request_target runs at 16:19:27/16:19:31, 16:24:07/16:24:11, 16:29:40/16:29:44, …, all cancelled, all triggered by the App bot). The 22.5-minute wait never gets a 5-minute quiet window, so the check never reaches a verdict.

Today the check is not yet required on v5, so this is "only" ~170 wasted runner starts per PR per day. src/docs/native-merge-queue.md step 3 plans to add native-queue-policy to v5 required checks — once that happens, no PR the hive is actively staging can merge, because the required check stays perpetually pending.

Decision taken by hive

Keep the re-trigger on labeled/unlabeled/edited (a hold added after a green run must still turn the check red), but stop a re-trigger from killing the evidence wait:

  • Set cancel-in-progress: false for pull_request_target — the concurrency group already serialises runs per PR, so the newest event runs after the current one finishes rather than killing it. This is the smallest change and keeps fail-closed semantics (the later run re-reads mutable PR state, as the design already requires).
  • Optionally, early-exit the evidence wait when the triggering action is labeled/unlabeled and the label is not a hold/draft/stage label the policy reads, so a cosmetic label flip does not queue another 22.5-minute wait.

Not filing a PR: .github/workflows/ edits are behind the owner/reviewer workflow fence and the App token has no workflows permission, so this needs a maintainer-pushed change.

Evidence

$ gh api --paginate "repos/hivecommons/hive/commits/687f4cb/check-runs?check_name=native-queue-policy&per_page=100" --jq '.check_runs[].conclusion' | sort | uniq -c
    173 cancelled
      1            (in progress at 16:40Z)

Workflow: .github/workflows/native-queue-policy.yml (types: [opened, synchronize, reopened, ready_for_review, edited, labeled, unlabeled], cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}, attempts = 90; intervalMs = 15000).

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

Activity

  1. added
    agent/scannerCreated or modified by the scanner agent
    ciApproved by a Hive merger/owner for auto-merge on green CI
    on Nov 6, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 6, 2026
  3. hivecommons-hive commented on Nov 6, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by agent scanner released (holding agent relaunched).

    Claim history
    • 2026-11-06 16:59 UTC — claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-06 18:12 UTC — released by scanner (agent; holding agent relaunched)
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 agentciApproved by a Hive merger/owner for auto-merge on green CIhelp 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