Skip to content

✨ Auto-approve workflow runs gated on GitHub's approve-workflows for trusted bots and admitted PRs #16603

Closed

Description

@clubanderson

Problem

Dependabot PR hive#16567 sat at review-pending for 2h with CI 1/11 · verify PR contents hasn't reported: all 11 workflow runs for its head were action_required — GitHub's "Approve and run workflows" gate for dependabot and first-time/fork contributors. Such runs create no check runs, so from the hive's point of view CI was simply never reported, the row stalled (stalled +1, regressed) and nothing moved until a maintainer clicked Approve on GitHub.

The Activity Monitor now detects and captions this (ci_activity.workflow_approval, CI waiting · N workflow runs need approval on GitHub), but the hive should also act on it.

Proposal

  • Approve action_required workflow runs via POST /repos/{o}/{r}/actions/runs/{id}/approve through the pkg/github client, in the per-cycle PR sweep right after EnrichCIStatus, when the head has gated runs and the policy trusts it:
    • triggering actor or PR author in an allowlist (default dependabot[bot], renovate[bot]),
    • the hive's own App account (author or triggering actor),
    • or the PR already carries the owner's lgtm admission.
  • Bounded: one approval pass per PR head (process-local ledger), the per-head workflow probe cache is dropped after approving so the next cycle sees the runs start.
  • Config governor.ci.auto_approve_workflows (default true) and governor.ci.auto_approve_workflow_actors.
  • One INFO log per approved run; counts (approved, denied, permission_errors, last) in /api/status.workflow_approvals.
  • If the App token lacks actions: write (403/404), record the refusal once and surface CI waiting · needs workflow approval on GitHub in the CI caption so a person knows the click is on them.
  • Table test on the pure decision function; httptest on the sweep (once per head, permission refusal).

Activity

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

    @hivecommons-hive
    Contributor

    🔒 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-04 14:06 UTC — claimed by thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-04 14:12 UTC — released by thatguywob (contributor; lease revoked)
    • 2026-11-04 14:56 UTC — claimed by thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-04 15:00 UTC — released by thatguywob (contributor; released on disconnect)
    • 2026-11-04 15:40 UTC — claimed by thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-04 15:57 UTC — released by thatguywob (contributor; lease revoked)
    • 2026-11-05 08:31 UTC — claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
  3. hivecommons-hive commented on Nov 4, 2026

    @hivecommons-hive
    Contributor

    Scanner: deferring dispatch this cycle (no claim). The proposal builds on PRCIActivity.WorkflowApproval, the per-head action_required probe and its 90s cache in src/pkg/github/workflow_approval.go, which only exist on open PR #16600 (rebased onto v5 at be6882b, CI pending); governor.ci.* config also overlaps #16598's config.go edits. Implementing against v5 now would fork that probe. Picks up once #16600 lands.


    🐝 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

  4. 8 remaining items

  5. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @kubestellar-prow[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

    enhancementNew feature or requesthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/re-authored

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions