Repository navigation
π fix(automerge): a contributor-lane PR on a hive with the review swarm off parks for a person instead of waiting at review-pending forever - #17080
Conversation
β¦ off parks for a person instead of waiting at 050 forever auto_merge.contributor_lane.require_reviewer_verdict held every unreviewed contributor-lane head at contributor-lane:no-verdict whenever a reviewer agent existed, but the review planner only asks reviewers when review.require_approval and review.fan_out are both on. On hive-wild-mole twelve green docs PRs sat at 050 "Review swarm requested" with the Review track at "0/5 Β· in progress" and nothing dispatched. The verdict function now marks such a head ReviewOff; the lane returns contributor-lane:review-off, which the stage engine routes to 085-needs-decision with a cause naming the settings. On a hive that dispatches no reviewer the Activity Monitor's 050 Review track no longer claims "in progress"; it says a person must review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@Danathar this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Evidence bundle `#17080fbac25c` sha256:660203818175e141dfe191d31fc3e07f34e07148bcd5a46d153dc35b25a5bb3e β download from the dashboard or `hivectl review evidence #17080`.Review findings from Style/maintainability review of head 1. The "review swarm is on" rule now exists in three places with two nil-semantics. --- a/src/pkg/config/review_dispatch.go
+++ b/src/pkg/config/review_dispatch.go
@@
+// DispatchesSwarm reports whether the review planner asks reviewers for new
+// heads at all: review.require_approval and review.fan_out both on. This is
+// planReviewDispatchWith's answeredOnly rule, inverted.
+func (r ReviewConfig) DispatchesSwarm() bool {
+ return r.RequireApproval && r.FanOut
+}
+
func (r ReviewConfig) ReviewEventDrivenEnabled(webhooksConfigured bool) bool {
- if !r.RequireApproval || !r.FanOut {
+ if !r.DispatchesSwarm() {
return false
}
--- a/src/cmd/hive/main_sweeps.go
+++ b/src/cmd/hive/main_sweeps.go
@@ -2492 +2492 @@
- answeredOnly := !cfg.Review.RequireApproval || !cfg.Review.FanOut
+ answeredOnly := !cfg.Review.DispatchesSwarm()
--- a/src/cmd/hive/merge_eligibility.go
+++ b/src/cmd/hive/merge_eligibility.go
@@
func contributorLaneReviewDispatched(cfg *config.Config) bool {
- return cfg != nil && cfg.Review.RequireApproval && cfg.Review.FanOut
+ return cfg != nil && cfg.Review.DispatchesSwarm()
}
--- a/src/pkg/dashboard/stage_tracker_activity.go
+++ b/src/pkg/dashboard/stage_tracker_activity.go
@@
func stageTrackerReviewDispatched(cfg *config.Config) bool {
- return cfg == nil || (cfg.Review.RequireApproval && cfg.Review.FanOut)
+ return cfg == nil || cfg.Review.DispatchesSwarm()
}2. The new reason is missing from the stage golden corpus. Both are mechanical; the behavioural change itself reads consistently with the existing |
There was a problem hiding this comment.
Intent alignment (read at head fbac25c): the diff does what the body says. contributorLaneReviewDispatched (src/cmd/hive/merge_eligibility.go:220) mirrors the planner's rule verbatim (answeredOnly := !cfg.Review.RequireApproval || !cfg.Review.FanOut, src/cmd/hive/main_sweeps.go:2492), the ReviewOff branch sits after verdictBlocks and inside !humanApproved (automerge_contributor_lane.go:1601-1608), so a recorded verdict or a trusted approval still wins, and review-off is routed to 085 via stageNeedsHumanReasons (derive_pr_classify.go:289) with a cause (automerge_stage_human.go:649). No scope creep.
One advisory, in-scope:
src/pkg/stageengine/stage_goldens_test.go:375-378saysstageGoldenReasonsis "every lane reason ClassifyStage distinguishes", and the human-route golden (testdata/stage_goldens/human-route.json) is built from it.contributorLaneReasonReviewOffis not added, so the new 085 routing has only the hand-writtenTestContributorLaneReviewOffParksOnAPersonand no golden coverage. Suggested fix (thengo test ./pkg/stageengine -run TestStageGoldens -updateand commit the regenerated goldens):
contributorLaneReasonWorkflowPath, contributorLaneReasonTestsRemoved, contributorLaneReasonNoReviewer, contributorLaneReasonReviewOff, contributorLaneReasonReporterTrustHold,
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
Summary
On a hive whose review swarm is off, a contributor-lane PR waited at
050-review-pendingforever. The lane wanted a reviewer verdict because a reviewer agent existed, but the review planner only asks reviewers whenreview.require_approvalandreview.fan_outare both on. Nothing was dispatched, and the Activity Monitor kept saying "Review swarm requested" and "Review 0/5 Β· in progress". Now such a head skips ascontributor-lane:review-offand parks at085-needs-decisionwith a cause that names the settings. The Review track says a person must review instead of "in progress".What went wrong
On Doug's self-hosted Podman spoke (hive-wild-mole, build 3f3d48b), 12 docs-only PRs opened under the owner's account on 2026-11-07 went into the contributor lane, for example Danathar/sensi#681 and Danathar/appbox#77. All had green CI. Each sat at
050, reasoncontributor-lane:no-verdict, with "Review 0/5 Β· in progress" from 18:01Z on. The reviewer agent was idle, and the audit showed no review dispatch at all. Hive-lane PRs on the same spoke (arch-bootc#652, aurora-zfs-simple#458) merged within 15 minutes without a verdict. That is what you see whenreview.require_approvalis off.Two gates disagree about whether a review is coming:
planReviewDispatchWithruns on every eval cycle, so no webhook is needed. Withrequire_approvalorfan_outoff, though, it plans only maintainer-answered heads (answeredOnly).PlanDispatchthen returns before it would dispatch anything, and writes no pending or wait row.contributorLaneVerdictFuncreportsConfigured: truewhenever a review-capable agent is enabled. It never looks at whether the swarm is on. Sorequire_reviewer_verdict(default on) holds every unreviewed head atno-verdict. A trusted person's approval cannot release it either, because that release only answers arequires_humanverdict, and there is none.The stage engine maps
no-verdictto 050. At 050, with no dispatch row, the tracker turned "unknown" into "Review 0/5 Β· in progress" (#16599). From the outside, the PR looked like it was under review.What changes
ReviewOffwhen the swarm is off. It uses the planner's own rule: bothreview.require_approvalandreview.fan_outmust be on.contributor-lane:review-offinstead ofno-verdict. A recorded verdict (such as changes requested) still wins. Withrequire_reviewer_verdict: falsethe lane merges exactly as before.review-offas a person's call (085), likeno-reviewer. The 085 cause and the dashboard words name the settings: turn the swarm on, turn the verdict requirement off, or merge it by hand.No new GitHub write sites and no new config keys.
Files
cmd/hive/merge_eligibility.go:contributorLaneReviewDispatchedandReviewOffincontributorLaneVerdictFuncpkg/stageengine/prstage/{reasons,types,causes}.go: new reason, verdict field and 085 causepkg/github/automerge/automerge_contributor_lane.go,automerge_stage_human.go: lane reason and 085 causepkg/stageengine/derive_pr_classify.go:review-offroutes to 085pkg/dashboard/stage_tracker_{activity,build,caption,decision_lanes,review_fallback}.go: honest Review track and wordshive-merge.md,operator-reference/README.md,stage-labels.md,activity-monitor.md, plus two line citations moved by the edit;changelog.d/fixed-contributor-lane-review-off.mdTests
TestStageTrackerReviewPendingSwarmOffIsNotInProgress(dashboard) builds the tracker for a green 050 contributor PR with the swarm off. It fails on v6 tip withstate "reviewing" caption "Review 0/5 Β· in progress", the reported status, and passes with the fix. With the swarm on, it still reads "0/5 Β· in progress".TestContributorLaneVerdictFuncReviewSwarmOff(cmd/hive) checksReviewOfffor eachrequire_approval/fan_outcombination, and that a recorded verdict clears it.TestTrySweepContributorLanePRSkipReasonshas three new cases: swarm off names the stall, swarm off with the verdict not required still merges, and a recorded changes request still wins.TestContributorLaneReviewOffParksOnAPersonand the extendedTestContributorLaneCIReviewNeverParksOnAHuman(stageengine) cover the stage side, andTestStageTrackerReviewPendingStategains rows for the no-reviewer-lane case../pkg/stageengine/...,./pkg/github/automerge/,./pkg/dashboard/,./pkg/writeback/,./cmd/hive/.go vetis clean on the changed packages, and the docs citation and link checks pass.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1