Skip to content

πŸ› fix(review): expire stale pending fixes and route decision requests before conflicts - #14624

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-14604
Oct 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-14604

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

… before conflicts

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#14622 ✨ review: delta re-review mode for PRs already judged at an earlier head same files src/pkg/review/dispatch.go
#14628 πŸ› fix(review): require sign-off on review-fix follow-up commits same files src/pkg/review/dispatch.go
#14648 πŸ› fix(stage): clear needs-triage once an issue is actionable or claimed same files src/docs/labels-and-control-signals.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed (correctness) β€” no blocking findings. Two advisory notes:

  • src/pkg/review/dispatch.go:231 adds DispatchOptions.PendingFixTTL, but unlike PendingTTL (src/pkg/config/review_dispatch.go:62, review.pending_ttl) nothing plumbs it from config, so operators get only the 2h default. The docs at src/docs/labels-and-control-signals.md:788 cite PendingFixTTL as if it were a knob; either wire review.pending_fix_ttl or 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 3610b96 into v5 Oct 27, 2026
82 of 87 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-14604 branch October 27, 2026 18:07
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#14624a33a1eb` sha256:2041ce088aeed3281203d9fa2be79ac8195a846a235b6aaaf0387dbe6bddb075 β€” download from the dashboard or `hivectl review evidence #14624`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

0 participants