Skip to content

πŸ› Reviewer slots wasted: verdicts discarded after head moves, no merge-readiness ordering, canary-only audit previewsΒ #15823

Closed

Description

@clubanderson

Observed on hive's own spoke (v5 db43b1a, 2026-10-30 ~11:00–12:10 ET): reviewer capacity is the merge bottleneck (autoscale at max, backlog 8, oldest wait 19m, train PRs logging `review dispatch waiting: perspectives still owed, no reviewer this cycle` reason=no-parallel-slot). Three wastes:

A) Verdicts discarded across a head move. 16 verdicts in 3h logged by `pkg/github/review_verdict_relay.go` "review-request watcher: verdict matched no dispatch row for its agent, falling back to advisory". Example: reviewed=#15783 agent=ci-maintainer perspective=correctness reported_head=e04062a5… while every candidate dispatch row has head=3fde88fa… (previous head). The PR got a push (rebase / merge-from-base) between dispatch and verdict; the verdict for the live head is demoted to advisory, the perspective stays owed and is re-dispatched β†’ one slot burned, zero progress. The row lookup also requires `agent == dispatched agent`, so a verdict from another reviewer-role agent for the same (pr, perspective) is rejected too.

Fix: accept a verdict whose head differs from the dispatch row when (i) the reviewer's reported head is the PR's current head, or (ii) the two heads carry the same patch relative to base (compare shows no tree difference). Record under the current head, mark the perspective satisfied, rewrite the in-flight row's head, log INFO `verdict accepted across head move pr=N h1=…→h2=… why=reported-current-head|same-patch`. Relax the agent match to any reviewer-role agent.

B No readiness-based review ordering. Review dispatch planning spends slots in queue order plus a starvation promotion, but a PR whose verdict is the ONLY thing blocking merge (CI green, mergeable) should go before PRs still pending/red in CI or conflicting. Add ordering: merge-blocked-only-by-verdict β†’ starved β†’ age; expose the reason in the dispatch log (priority=merge-ready); defer pending-CI heads unless slots would otherwise go unused.

C) Security-canary kicks. 9 of 30 agent kicks in 3h showed only SECURITY CANARY: HIVE-CANARY-… in the audit: agent kicked preview. The preamble is ~200 bytes, exactly the preview cap, so operators cannot see the real work message. Make the preview/snippet start after the preamble (kick content unchanged, canary coverage unchanged), and keep the no-work β†’ no-kick guarantee.
EOF
)

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 30, 2026
  2. hivecommons-hive commented on Oct 30, 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.

  3. added a commit that references this issue on Oct 30, 2026
    99b42b4
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

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/claimed-by-scanner

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions