Repository navigation
π fix(governor): bound how long review-fix kicks may defer an agent's backlog kick - #15168
Conversation
β¦ backlog kick A review-fix kick is ordered ahead of the governor kick for the same agent (#13100) and a delivered kick leaves the lane busy, so the governor kick behind it is deferred β not failed, with no memory of the deferral. An adopted contributor PR under changes_requested is re-planned as a fix kick every cycle, so on the hosted spoke the scanner received 50 fix kicks and no backlog kick for over an hour while 13 issues sat at stage/010-actionable unclaimed. Remember, per agent, how many cycles in a row the governor kick was displaced by a delivered fix kick; after two the governor kick goes first for that cycle and the fix kick is re-planned, exactly as an undelivered fix kick is today. Fixes #15166 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
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
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 7d833a4. |
Fixes #15166
Problem
On the hosted spoke the scanner received 50 review-fix kicks and 43 backlog kicks today, and zero backlog kicks since 18:14 ET while 13 issues sat at
stage/010-actionableunclaimed (one for 11h). Three rules compose into starvation:orderReviewFixKicksFirstputs a fix kick ahead of the governor kick for the same agent (π fix: keep review hold release across base-branch merges that do not change the PR diffΒ #13100).dispatchAgentKicksmarks the lane busy after a delivered kick, so the governor kick behind it isagent busy: deferring kickβ not failed, not counted, and re-rendered with no age next cycle.dispatchFixre-plans a fix kick for an adopted PR underchanges_requestedevery cycle (π Keep adopted changes-requested PRs in the fixer work listΒ #12987), so there is always a fresh fix kick to displace the governor kick (β¨ feat(hub): surface "Pause hive" in the hub spoke dropdown menuΒ #15105 was fix-kicked at 18:54, 19:19, 19:25).Fix
kickLaneFairness(cmd/hive/review_kick_order.go) remembers per agent how many consecutive cycles the governor kick was assembled but deferred behind a delivered fix kick. AtgovernorKickDisplacementLimit(2) the governor kick goes first for that cycle and the fix kick keeps its place after it β it is re-planned next cycle exactly as an undelivered fix kick is today. A delivered governor kick resets the count; cycles with no governor kick for the agent, or where the send failed outright, do not count. A WARN line names the agent and the streak when the override fires.The governor kick already carries the agent's own red/conflicted PRs (FIX-BEFORE-NEW), so fix work is reordered, not lost.
Validation
gofmt,go vet ./cmd/hive/,go test ./cmd/hive/(incl. newTestKickLaneFairness*; existingTestOrderReviewFixKicks*keep the π fix: keep review hold release across base-branch merges that do not change the PR diffΒ #13100 contract with a nil override).time.Sleepin tests.changelog.d/fixed-scanner-backlog-starved-by-fix-kicks.md.