Skip to content

Mark lanes unauthorized when the App lacks rights for the next step (held-run approval 403) #14589

Closed

Description

@clubanderson

Problem

PR #14520 made the contributor lane approve held action_required workflow runs for registry-trusted authors (approveHeldRunsForRegistryTrusted). On hive's own hosted hive it fires but fails every head:

msg="contributor-lane could not approve held workflow run" ... error="POST /repos/hivecommons/rationguard/actions/runs/40459320512/approve: 403 Resource not accessible by integration"

The GitHub App does not have actions: write, and the owner explicitly does not want to grant it. Today the lane just WARNs once per head and the PR sits at required-check-missing:<ctx> looking like CI is slow; nothing tells a maintainer that only they can take the next step.

Decision

The hive must surface, plainly, that the bot has no rights to complete the next step so a human does it:

  • One-word pill unauthorized in the activity-tracker far-right pill column, like stalled / hold / draft (muted); it counts under "Needs attention" because only a human can clear it.
  • GitHub label hive:unauthorized on the PR so it is visible outside the dashboard.
  • Tooltip and a single idempotent PR comment (marker <!-- hive:unauthorized head=<sha> step=<step> -->) naming the exact missing permission and the exact human step, re-posted only when the head SHA changes.
  • Auto-clear: label + pill + state removed in the same tick as soon as the step is no longer needed (the required checks for the head exist / the lane advances). No human label edit required.
  • Generic helper (markUnauthorized) for any App API call that is a prerequisite for the lane's progress and fails with 403 Resource not accessible by integration; wired for the held-run approval path first, with TODOs on the ambiguous 403 sites.
  • Log once per head at INFO (msg="lane unauthorized"), no per-tick WARN spam.
  • Stage engine routes the lane to 085 with reason unauthorized:<step> so the gate cell reads "Awaiting human: approve workflow runs".
  • Docs: labels-and-control-signals.md, dashboard-sections.md, github-app-setup.md (granting actions: write is optional; without it the hive marks unauthorized and waits).

Refs #14519, #14520.

Activity

  1. hivecommons-hive commented on Oct 27, 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.

  2. added a commit that references this issue on Oct 27, 2026
    3b9cd69
  3. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    Contributor

    /unclaim

    Standing down: #14595 (by the issue author) already implements this and is linked as the covering PR; a parallel hive implementation was discarded to avoid a duplicate.


    🐝 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. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  5. github-actions commented on Oct 27, 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.

  6. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    Contributor

    🔓 Claim by agent scanner released (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

    enhancementNew feature or requesthelp 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