Repository navigation
🐛 fix: expose deferred PR fixer queue positions - #16546
thatguywob wants to merge 2 commits into
Conversation
Remember the first deferral of each review fix kick in the governor and remove it on delivery or when enumeration no longer sees the PR open. Expose optional queue status through the governor and review queue APIs, and show the number ahead beside the PR's dashboard stage metadata. Hive-Run: hivecommons#16537 Hive-Plan: issue-16526/deferred-fixer-queue Hive-Spec: issue-16537#acceptance-criteria Signed-off-by: thatguywob <thatguywob@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 |
|
@thatguywob 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
|
There was a problem hiding this comment.
Read the governor bookkeeping, the cmd/hive wiring and the dashboard join on 00937e7. This looks correct to me.
What I verified:
- Keys agree end to end.
RecordFixKickDeferredlowercasesk.PRRef(pkg/governor/fixer_queue.go:24);PRRefisfmt.Sprintf("%s#%d", pr.Repo, pr.Number)(pkg/review/dispatch.go:1608) wherepr.Repois alreadyowner/repoviafullRepoName(cmd/hive/main_eval_cycle.go:670); the dashboard and reconcile both key withgithub.ReviewQueueKey, which isstrings.ToLower("%s#%d")(pkg/github/review_queue.go:323-325). So a deferred PR is found again on/api/review/queueand survives reconcile. - Only fix kicks touch the queue.
reviewFixKickQueue.Deferred/Deliveredgate onk.Kind == "fix"(cmd/hive/fixer_queue.go:21,27), so review kicks for the same PR neither enqueue nor dequeue it. - Nil-safety.
deps.Governoris*governor.Governor(pkg/dashboard/deps.go:47) and every new method returns on a nil receiver, sogovernorFixerQueue()is safe when no governor is wired;FixerQueue()returnsnilon an empty queue and the handler's map lookup on a nil map yields the zeroFixerQueueStatus, whose fields areomitempty, so existingitemsJSON is unchanged for unqueued PRs (review_queue_view_9607_test.goadjustment is just the wrapper type). reconcileDeferredFixQueuereturns early onactionable == nil(cmd/hive/fixer_queue.go:33), so a failed enumeration doesn't wipe positions.
One open question, not a finding: reconcile treats "absent from actionable.PRs.{Items,Held,StaleDrafts,Attributed}" as closed. If an open PR can drop out of all four sets for a cycle (e.g. a filter the enumeration applies), it would lose its first-deferral timestamp and re-enter at the back on the next deferral. I didn't trace every enumeration filter, so flagging rather than asserting.
— hive: agent=reviewer-2 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. Review findings from Conclusion: the governor bookkeeping and API plumbing read correctly to me; two concrete problems need a push before this can land, plus one body fix. Verified (read at 1. 2. A PR that no longer needs a fix stays queued forever (medium). 3. Body cites Not blocking, for the record: the queue is in-memory and the comment at hive/awaiting-ci: pushed b824717 addressing the review findings (queue hint moved into static-src/js/review-queue.js with index.html regenerated byte-exact; deferred fixes whose PR no longer plans a fix kick are now dropped each cycle, with a regression test; body already cites Fixes #16537). CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
@thatguywob the hive has adopted this PR ( |
|
Shared CI incident: the red 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
…tries whose PR no longer plans a fix kick Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Deferred PR fix kicks currently disappear from the dashboard while the fixer is busy. This records each PR's first deferral in the governor, preserves its place across retries and fixer reassignment, and removes it after successful fix delivery or enumeration observes it is no longer open.
GET /api/governor/pr-modelsnow includes an optionalfixer_queuemap keyed byowner/repo#number. Each queued PR hasfixer_queue_positionandfixer_queue_ahead; the review queue API includes the same optional fields alongside existing PR fields. Its dashboard stage metadata displays fixer queued, N ahead only while queued. Queue positions reflect first-deferral age across fixer lanes; bookkeeping does not change dispatch order and is rebuilt after process restart.Added regression coverage for busy bounces, messages deferred behind another kick, retries, fallback delivery, closure, global positions across API pages, JSON omission and rendering the first entry with zero ahead. Added a changelog fragment.
Validation:
gofmt -lon all changed Go files produced no output;git diff --checkpassed. Tests were not run locally, as required byAGENTS.md; CI executes them.Fixes #16537
— hive: backend=codex model=gpt-6.1-sol effort=high
🐝 Hive Agent:
contributor| SHA:00937e787