Repository navigation
Conversation
Hive-Run: hivecommons#15559 Hive-Plan: review-decision-durability Hive-Spec: review-decision#dispatch-durability Signed-off-by: Karibhou <157208370+Karibhou@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
|
There was a problem hiding this comment.
Style review β advisory only, nothing blocking.
-
Log line breaks the file's prefix convention β
src/pkg/github/review_verdict_relay.go:557. Every otherc.logger.*call in this file (lines 74, 82, 145, 151, 258, 358, 370, 384, 423, 440, 465, 471, 475) is prefixedreview-request watcher: β¦; the new line is the only one without it, so it won't be found by the prefix operators grep for. Thec.logger != nilguard at :556 is also unique in this file β none of the other calls guard, so either it's dead or the others are wrong; keep it consistent with the rest.if dispatchedAgent { c.logger.Info("review-request watcher: dispatched reviewer verdict falling back to advisory", "repo", report.Repo, "number", report.Number, "agent", req.Agent, "perspective", report.Perspective, "head", report.HeadSHA, "candidates", candidates) -
Two near-identical persist helpers β
src/cmd/hive/main.go:11416-11435.persistReviewDispatchStateIntermediateandpersistReviewDispatchStatediffer only in whetherplannedis passed toreview.ConfirmDelivered; the guard and write/warn are duplicated. One helper with the distinction made explicit keeps the two checkpoints from drifting:-func persistReviewDispatchStateIntermediate(plan review.DispatchPlan, delivered []review.DispatchKick, logger *slog.Logger) { - if plan.State.GeneratedAt.IsZero() && len(plan.ReviewKicks) == 0 && len(plan.FixKicks) == 0 { - return - } - state := review.ConfirmDelivered(plan.State, nil, delivered) - if err := review.WriteDispatchState("", state); err != nil { - logger.Warn("failed to persist review dispatch state", "error", err) - } -} - func persistReviewDispatchState(plan review.DispatchPlan, delivered []review.DispatchKick, logger *slog.Logger) { + persistReviewDispatchStateAt(plan, delivered, true, logger) +} + +// Intermediate checkpoints (final=false) retain every planned pending entry: +// other kicks in this pass may still be in flight. The final checkpoint +// releases the ones that were never delivered. +func persistReviewDispatchStateAt(plan review.DispatchPlan, delivered []review.DispatchKick, final bool, logger *slog.Logger) { planned := append(append([]review.DispatchKick(nil), plan.ReviewKicks...), plan.FixKicks...) if plan.State.GeneratedAt.IsZero() && len(planned) == 0 { return } - state := review.ConfirmDelivered(plan.State, planned, delivered) + if !final { + planned = nil + } + state := review.ConfirmDelivered(plan.State, planned, delivered)
Call site
main.go:7844becomespersistReviewDispatchStateAt(reviewPlan, deliveredReviewKicks, false, logger). -
(nit)
src/cmd/hive/review_dispatch_wiring_test.go:360β sibling tests in this file use theTestPersistReviewDispatchState_*family name (e.g. :357_KeepsOnlyDeliveredKicks, :387_WriteFailureIsNonFatal);TestPersistReviewDispatchState_IntermediateKeepsInFlightDecisionwould keepgo test -run TestPersistReviewDispatchStatecovering it.
β hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 095-pre-merge-soak β 060-reviewed: untrusted-author-role |
|
stage 060-reviewed β 050-review-pending: required-check-pending:build-and-test |
Preserve planned pending reviews during intermediate delivery checkpoints, and release undelivered kicks only when the pass ends. This lets a decision verdict bind to its pending dispatch while another kick is still in flight. Log the candidate dispatch rows when a dispatched reviewer falls back to advisory.
Adds a regression test for the intermediate and final checkpoints. Local validation:
git diff --checkandgofmt; Go tests are delegated to CI per AGENTS.md.Refs #15559 β defensive decision binding without a dispatch row and relay-level regression coverage remain.
β hive: backend=codex