Skip to content

πŸ› review-fix: dispatch fix kicks when reports carry no body digest - #14676

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
fix/review-fix-missing-body-digest
Oct 27, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
fix/review-fix-missing-body-digest

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #14665

Problem

After reviewers return changes_requested, a PR moves to stage/070-fixing but the planner never dispatches a fix kick. The perspective review reports carried no body_digest, and bodyEditedVerdictRevisitable (src/pkg/review/dispatch.go) treated pr.BodyDigest != "" && agg.BodyDigest == "" as "PR body edited since verdict β†’ revisit". The planner therefore re-asked for review instead of dispatching a fix, every cycle, forever (hive#14614, hive#14630: fix_kicks: 0, no exclusion logged, no PendingFix).

Fix

  1. Missing digest = unknown β†’ unchanged. bodyEditedVerdictRevisitable only returns true when both digests are present and differ (falls back to UpdatedAt only when the PR itself has no digest).
  2. Writers populate body_digest using the canonical review.PullRequestBodyDigest:
    • ModelStamps (collect time) now carries the dispatch record's body digest and fills it onto reports that lack one (skipped when records for the same head disagree).
    • The verdict relay now memoizes a reviewedPRSnapshot{Head, BodyDigest} and stamps advisory (non-dispatched) verdicts with the PR's digest; dispatched verdicts already inherited the dispatch digest.
  3. Starvation guard + observability.
    • Every revisit-suppressed cycle for a changes_requested head records a FixExclusion (verdict-revisit:body-edited / verdict-revisit:stale-reviewer) and is logged at WARN.
    • After RevisitStarvationCycles (= 3) consecutive suppressed cycles the planner forces the fix path (DispatchPlan.ForcedFixes, WARN logged). State resets when the head settles/moves.
    • The planner summary line that prints fix_kicks: now also prints fix_excluded and fix_excluded_reasons (reason=count,…).
  4. Regression tests (src/pkg/review/revisit_body_digest_14665_test.go, no time.Sleep): missing digest β†’ fix kick; matching digest β†’ fix kick; differing digest β†’ revisit + visible exclusion; N-cycle guard forces fix; counter reset on settled cycle; prune on head move; Collect stamps digest from dispatch records.

Builds on #14624 (PendingFix TTL) without changing its behaviour.

@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 clubanderson 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@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.

@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
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/main.go
#14660 ✨ review: wire review.pending_fix_ttl into the fix dispatcher same files src/cmd/hive/main.go
src/pkg/review/dispatch.go
#14628 πŸ› fix(review): require sign-off on review-fix follow-up commits same files src/pkg/review/dispatch.go
#14671 πŸ› fix(convergence): scope the mutation writer slot per target instead of per repo same files src/cmd/hive/main.go

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves 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 added stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • test (rest 1/4)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

A report without body_digest was read by bodyEditedVerdictRevisitable as
"PR body edited since verdict", so the planner re-requested review instead
of dispatching a fix, every cycle, forever. Missing digest now means
unknown/unchanged; only a present-and-different digest triggers revisit.

Writers now stamp body_digest: ModelStamps.apply fills it from dispatch
records at Collect time, and the relay stamps advisory verdicts from the
PR snapshot via review.PullRequestBodyDigest.

Starvation guard: a changes_requested head suppressed by the revisit path
for RevisitStarvationCycles (3) consecutive cycles is forced onto the fix
path; each suppressed cycle records a FixExclusion and logs a WARN, and
the planner summary line exposes fix_excluded / fix_excluded_reasons.

Fixes #14665

Signed-off-by: Andy Anderson <andy@clubanderson.com>
PlanDispatch org-qualifies pr.Repo before recording state; the guard tests
looked the counter up with the bare repo and read 0.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the fix/review-fix-missing-body-digest branch from 8f30347 to b792235 Compare October 27, 2026 19:11
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 93ed1f5 into v5 Oct 27, 2026
77 of 79 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/review-fix-missing-body-digest branch October 27, 2026 19:21
@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

Copy link
Copy Markdown
Contributor
Evidence bundle `#146768f30347` sha256:c49dcc86fc1227736411e4f74df8c05aba5ac5e5532de436fbc2fef77834de06 β€” download from the dashboard or `hivectl review evidence #14676`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at b792235.

@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/human A person pushed this PR themselves dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

1 participant