Repository navigation
π fix(review): expire stale pending fixes and route decision requests before conflicts - #14624
Conversation
β¦ before conflicts Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Reviewed (correctness) β no blocking findings. Two advisory notes:
src/pkg/review/dispatch.go:231addsDispatchOptions.PendingFixTTL, but unlikePendingTTL(src/pkg/config/review_dispatch.go:62,review.pending_ttl) nothing plumbs it from config, so operators get only the 2h default. The docs atsrc/docs/labels-and-control-signals.md:788citePendingFixTTLas if it were a knob; either wirereview.pending_fix_ttlor phrase it as a fixed 2h.- #14604's trailing ask β treat a pending fix as abandoned once the fixer agent is kicked for a different PR β is not implemented; the PR relies on the 2h expiry instead (
dispatch.go:1191). Acceptable for this fix, but the issue closes without that behaviour.
Verified: an expired row at the cap is deleted at dispatch.go:1196 but its count survives in FixAttempts (recorded for delivered kicks at dispatch.go:1322-1323; undelivered rows never persist, :1325-1327), so the next cycle still sees attempts >= MaxReEngagements and does not re-kick. NormalizeReviewVerdict (prstage/types.go:184) leaves DecisionRequested verdicts untouched, so the new branch at derive_pr_classify.go:333 fires for the #14590 case.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
There was a problem hiding this comment.
Read both changes against the v5 tree and their callers; both look correct to me.
Pending-fix expiry (src/pkg/review/dispatch.go:1191-1197): an expired row now takes the same path an adopted PR already took β the old row is removed (:1197), its Attempts is carried into the max with maxFixAttemptsForPR/maxHistoricalFixAttemptsForPR (:1199-1205), and the escalation.MaxReEngagements cap at :1206 still parks the PR with fix-attempts-exhausted before any kick. So the TTL cannot create an unbounded re-kick loop; the "expired at cap" test case exercises exactly that branch. pendingFixExpired (:1224) treats a zero Dispatched as never-expiring, which is the right default for rows persisted before this field existed.
Decision-requested routing (src/pkg/stageengine/derive_pr_classify.go:333-340): placed after the admission / needs-human / unauthorized branches and before stageFixingReasons, so a conflicting or changes-requested reason no longer wins over a posted question. RequiresHumanStage (:432) already returns StageReasonDecisionRequested via StageVerdictReason (:139-143) when DecisionRequested is set and VerdictNeedsHuman (:162-169) is true for it, so the new block reuses the existing reason string rather than inventing one; a plain requires_human without a question still falls through to fixing, which the second half of the test pins.
One note, not a defect: PendingFixTTL is only settable through DispatchOptions; src/cmd/hive/main.go:10683 wires MaxRedispatch from config but nothing sets PendingFixTTL, so operators always get the 2h default. The docs line at labels-and-control-signals.md:786 says "default 2h" without naming a config key, which is consistent β just flagging in case a review.pending_fix_ttl knob was intended.
go build ./pkg/review/ ./pkg/stageengine/ passes at a33a1eb; tests not run here (#9845).
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
A pending fix row on an unchanged head excluded the PR forever when the fixer turn never pushed (PendingReview expires, PendingFix did not), so the tracker claimed a hive agent was fixing it. And a posted decision request was masked by a conflicting lane reason, showing 070-fixing with no fixer kick. This adds a PendingFixTTL (default 2h) after which the next bounded attempt replaces the row (capped by escalation.MaxReEngagements, which parks the PR with fix-attempts-exhausted), and routes decision_requested to needs-decision ahead of the conflict/fixing reasons. Target branch: v5.
Closes #14604
Closes #14607
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson