Repository navigation
π review: superseding PR with unanimous sign-off requires_human parks for a decision, not the fixer - #16676
Conversation
β¦ for a decision, not the fixer A hive-superseding PR whose every reviewer perspective returned requires_human as a pure approver question (decision requested, no finding above info) was routed to the fixer by the superseder rule. The fixer had nothing to push, the cycle hit its cap, fixer-exhausted re-authored the change, and the next PR repeated it (#16398 -> #16456 -> #16607) while no operator was ever asked. Aggregation now keeps such a head requires_human with its decision question, RouteHuman parks it at 085 needs-decision with approve / request-changes actions, and the tracker's review chevron says the head is verified and waiting on sign-off. Fixes #16675 Signed-off-by: Andrew Anderson <andy@clubanderson.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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Correctness review @ b34f870 β the aggregation/route split is sound for the #16607 shape; two places where the new predicates disagree with each other.
1. decision_requested with an empty question re-creates the 070 orphan (medium)
The aggregate parks on the flag β reportAsksForSignOff only checks r.DecisionRequested (src/pkg/review/review.go:979-989) β but the stage route parks on the question text: RouteHuman still captions "goes to the fixer" at 070 whenever strings.TrimSpace(e.DecisionQuestion) == "" (src/pkg/stagelabels/human.go:431-441), and stagelabels.Evidence carries no DecisionRequested field (human.go:123-125; built from contributorVerdict.DecisionQuestion only at src/pkg/github/automerge/automerge_stage_human.go:380).
That shape is reachable: the relay sets DecisionRequested=true on every report whenever the needs-decision marker is present, with whatever decisionQuestionFromBody returns β possibly "" (src/pkg/github/review_verdict_relay.go:79, 103-108, 332-342). For such a superseder head after this PR: aggregate = requires_human, FixCycle=false, DecisionQuestion="" β no fixer dispatched β RouteHuman labels it 070 "goes to the fixer" β exactly the "070 with nobody on it" symptom from #16675, now with no exhaustion to move it along. Before this PR the same input at least went to the fixer.
Smallest fix β make the aggregate's criterion match the route's, so a question-less ask keeps the old fixer route:
func reportAsksForSignOff(r PerspectiveReport) bool {
if !r.DecisionRequested || strings.TrimSpace(r.DecisionQuestion) == "" {
return false
}
(and a test: hiveSupersederSignOffReport with DecisionQuestion = "" must still produce changes_requested/FixCycle.)
2. Tracker caption predicate is looser than the aggregation predicate (low)
trackerAggregateSignOffOnly (src/pkg/dashboard/stage_tracker_activity.go:921-931) checks only DecisionRequested + question + no changes_requested/reject perspective; it never looks at finding severity, unlike reportAsksForSignOff. A non-superseder hive PR whose security perspective returns requires_human with a high in-scope finding plus a risk-class question lands in the if decisionRequested β requires_human branch (review.go:611-614) with all perspectives requires_human, and the chevron would read "reviewer verified, needs sign-off" over a high finding. agg.Findings is populated (review.go:525), so:
for _, v := range agg.Perspectives {
if v == review.VerdictChangesRequested || v == review.VerdictReject {
return false
}
}
+ for _, f := range agg.Findings {
+ if review.InScopeFinding(f.Finding) && f.Severity != outputschema.SeverityInfo {
+ return false
+ }
+ }
return trueOut of scope (follow-up, not blocking)
delegatedecision.decideHiveSuperseder releases (approves) any hive superseder at 085 that has no hard-stop token, with the rationale "reviewer findings go to the fixer" (src/pkg/delegatedecision/policy.go:809-825); the new sign-off park produces no token (human.go falls through to the plain NeedsDecision route at :532), so a "decide for me" click on the row would approve the trust-boundary change the reviewer asked @hanthor to confirm, without surfacing the question. Worth a recommendOnly branch when DecisionQuestion is set.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
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. Review findings from Read the aggregate path in One low-severity mismatch, dashboard only:
Side effect worth knowing, not a defect: a superseder that hit the fix-cycle cap ( Tests cover the three new paths; the Review findings from Read the aggregate path in
Changelog fragment name/category is valid. Nothing to change from my side. Evidence bundle `#16676e31ba6d` sha256:ab86df6ecd07aa040b44cd4d4a62c7991932b20eef2657272542f59b0ddeac2c β download from the dashboard or `hivectl review evidence #16676`. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at e31ba6d. |
Fixes #16675
Problem
hiveSupersedingFixRouteturned everyrequires_humanon a hive-superseding PR into achanges_requestedfix cycle β including the case where all five perspectives only asked an approver to sign off and found nothing to change (#16607:decision_requested,decision_risk_high, oneinfofinding "Needs approver sign-off, not a code fix"). The fixer was kicked 6Γ with nothing to do,fixer-exhaustedre-authored the PR, and the new PR got the same review and the same route: #16398 β #16456 β #16607, 9h onstage/070-fixingwith no decision pill.Change
pkg/review:reportAsksForSignOffβ a requires_human report that explicitly requests a decision and has no in-scope finding aboveinfo. When every requires_human report is such an ask and no perspective ischanges_requested/reject, the superseder fix route does not apply; the aggregate staysrequires_humanwithDecisionRequested+ question (so no fixer dispatch, no exhaustion, no re-author). Any actionable finding or achanges_requestedsibling keeps the owner's fixer route.pkg/stagelabels.RouteHuman: a superseder requires_human that still carries its decision question is not captioned "goes to the fixer"; it falls through to 085 needs-decision withDecisionActions(approve / request changes).pkg/dashboard: review chevron caption "Waiting on a human approver Β· reviewer verified, needs sign-off" for that aggregate shape (state stayshuman_decision, which the SPA already renders as the owner sign-off pill).Tests
TestAggregateHiveSupersedingSignOffOnlyParksForDecision(the β¨ feat(github): enforce pin-only exception in merge-request relayΒ #16607 shape, incl.Normalize()not re-routing it)TestAggregateHiveSupersedingSignOffWithActionableFindingRoutesToFixerTestRouteHumanHiveSupersederSignOffQuestionParksAt085TestTrackerAggregateSignOffOnlygo test ./pkg/review/... ./pkg/stagelabels/... ./pkg/stageengine/... ./pkg/github/automerge/... ./pkg/dashboard/ ./cmd/hive/green.