Repository navigation
Description
Summary
Review dispatch is planned only on a governor eval cycle, and recording a head verdict does not start one. A review head's turn takes 1–2 minutes, but the next kick waits for the next cycle. On a hive with healthy webhooks that cycle comes from an unrelated GitHub event (check_run, push, comment) or from governor.eval_interval_webhook_s, which defaults to 900s. When the repo is quiet, every reviewer sits idle for up to 15 minutes between kicks.
With review_heads, a PR needs every head × every perspective, plus the decision kick. With 2 heads and 5 perspectives that is 10 head kicks, so a PR goes through several idle gaps before it reaches its decision. The swarm's throughput ends up bounded by the governor clock, not by the reviewers.
Observed (standalone hive, v5 @ a474553; review_heads sonnet×2 + sol×3, 5 perspectives, max_parallel_reviews: 2)
Timeline from the hive log (times are hive-local):
16:31:02–16:31:59 six head verdicts recorded; all five reviewers' turns end
16:37:09 review swarm dispatch planned <- next eval cycle, 5 min idle
16:38:54–16:41:10 verdicts recorded; all turns end by 16:41:10
16:52:08 review swarm dispatch planned <- 11 min idle (no webhook in between)
Head turns in the same window took 46–125 s (kick turn ended … seconds_since_kick). No PR reached its decision kick in the 40 minutes after a perspective change queued about 10 PRs for re-review. Lowering eval_interval_webhook_s from 900 to 120 is the operator workaround; it buys throughput by making every governor cycle more frequent.
Where
src/cmd/hive/review_event_dispatch.go:wakeForReviewEventssends onb.reviewWake, andrunLoop(main.go,case <-b.reviewWake:) runstick(evalSourceCached), logging "review webhook wake: running an early eval cycle from the cached snapshot". Today only the webhook review dispatcher (eventdispatch, ✨ review-pipeline: event-driven review dispatch on PR push / review_requested webhooks with cadence fallback #11091) feeds this wake.src/pkg/github/review_verdict_relay.go: the review-request watcher records a dispatched head's verdict ("verdict recorded" / "verdict recorded without a comment") and confirms its pending entry, but nothing tells the governor that an agent just became free or that a PR may now be ready for its decision kick.
Proposed fix
When the relay records a verdict that confirms a dispatched pending entry (auth.Dispatched), send the same non-blocking wake that wakeForReviewEvents sends, so runLoop runs a cached-snapshot eval. That cycle re-plans with the freed agent. When the last head reports, it dispatches the decision kick, and when the decision is recorded it frees the PR's max_parallel_reviews slot for the next one.
- Coalescing comes free:
reviewWakehas a buffer of 1, so a burst of verdicts costs one cycle.governor.webhook_wake_min_gap_s(default 30s) already rate-limits webhook wakes, and the same gap could apply here. - Cheap: it is a cached-snapshot cycle, so there is no repo enumeration.
- Plumbing: the relay lives in
pkg/github. A callback such asClient.SetReviewVerdictHook(func()), set in boot to thereviewWakesend, keeps the package boundary.
Tests:
- The relay calls the hook once for a recorded dispatched verdict, and not for a quarantined or advisory one.
- In
runLoop, a verdict wake runstick(evalSourceCached), and two verdicts inside the min gap run it once.
Why it matters
With the hook, a 10-kick PR finishes in roughly the time its kicks take (about 10–15 minutes here), and eval_interval_webhook_s can stay at its quiet-hive default. Without it, operators have to choose between idle reviewers and a fast governor clock for the whole hive.
Refs #11091 (webhook review dispatch), #13548 (review heads), #13794 (one kick in flight per agent).
🤖 Generated with Claude Code
Activity
hivecommons-hive commentedon Oct 27, 2026
🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 27, 2026
🔓 Claim by @Karibhou released (lease revoked).
🐛 fix(review): wake the governor when a dispatched review verdict is …
github-actions commentedon Oct 27, 2026
@gregoryhunt 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
/reopenand 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.