Skip to content

[scanner] merge-request CI gate blocks on a cancelled advisory check when the required set is unknown (check-cancelled on #17572) #17598

Closed

Description

@hivecommons-hive

Summary

hive-merge refused #17572 with ci gate: required status check has not succeeded (check-cancelled) although every build-gate/test/lint/security check on head b6d1217 was green. The only non-green check was mutation from Mutation (advisory) (continue-on-error: true, timeout-minutes: 20), which hit its 20-minute timeout on a size/XXL diff and completed as cancelled (run 42892862418).

Where

src/pkg/github/merge_ci_gate.go calls EvaluateCommitCI without UnknownRequiredChecksServerEnforced, so when the required-check set for the base branch cannot be determined (the App token gets 403 on branches/v6/protection/required_status_checks), blockCompletedFailures is true and the check-run walk in src/pkg/github/commit_ci.go does block("check-" + cr.GetConclusion()) for any non-success conclusion, including cancelled.

Two inconsistencies with the surrounding design:

  1. The automerge sweep path (automerge_sweep_queued.go commitGreen doc) explicitly says non-required cancelled checks "can never block self-merge", and when the required set is known, FailOnAnyFailedCheck only blocks on failure/timed_out — not cancelled. The merge-request watcher ends up stricter than the sweep, only because the protection read failed.
  2. The same file's opaqueWorkflowRuns comment states "Completed runs that are not failures (success, cancelled, skipped) carry no verdict of their own", yet a cancelled check run is treated as a verdict.

The contributor nudge then tells the author "Failing checks: check-cancelled", which names no check and gives no fix — and on a fork PR the hive cannot push a new head to unstick it.

Expected

In the unknown-required path, a completed cancelled check run should carry no verdict (same as the opaque-run rule) and the gate should fall through to the merge attempt, letting GitHub enforce the real required set server-side (a cancelled required check is still rejected by the merge endpoint). At minimum the reason should name the check (check-cancelled:mutation) so the nudge is actionable.

Prior instances of the same shape: hive#9228/#9211, hive#14871, hive#16718 (see scanner beads).

Decision taken by hive: smallest additive fix — treat cancelled as no-verdict only in the !requiredKnown path, keep failure/timed_out/action_required blocking, and include the check name in the reason string.

— 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

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

    Claim history
    • 2026-11-10 21:55 UTC — claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
  3. hivecommons-hive commented on Nov 10, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #17599 (merged 69e0877). 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