Skip to content

✨ review: delta re-review mode for PRs already judged at an earlier head - #14622

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
feat/review-delta-rereview
Oct 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
feat/review-delta-rereview

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #14621

What

When a PR already has a recorded verdict at an earlier head SHA, the re-review kick is a delta re-review: it carries the previous head, date, aggregate and per-perspective verdicts and the findings by file:line, and instructs the reviewer to read only gh api repos/O/R/compare/<prev>...<new> (plus re-check each previous finding), with the verdict still covering the whole PR at the new head.

When the governor's compare shows the delta is empty (identical tree) or under review.delta_trivial_lines touching no previously flagged file, no reviewer is kicked: the prior aggregate is re-stamped onto the new head with a delta block and a reason, recorded in review-verdicts.json, and logged.

Full review stays for: first review, prior reject/incomplete, prior changes_requested with findings older than review.delta_max_age, delta_rereview: false.

Config (docs/review-swarm.md)

  • review.delta_rereview (default on)
  • review.delta_trivial_lines (default 20; negative = identical trees only)
  • review.delta_max_age (default 72h)

Evidence

~/hive-work/reviewer-spend/summary.md, Oct 13-27: re-reviews were 53% of Bluefin's attributed reviewer spend ($979 of $1,850) and 28% of hive's ($2,019).

Recording

Aggregate.Delta{previous_head, trivial, changed_lines, note}; PerspectiveReport.delta_previous_head stamped from dispatch state (same path as review_model), so the cost dashboard can split delta reviews / re-stamps / full reviews.

Changes

  • pkg/review/delta.go (new): planning rules, prompt section, re-stamp, RecordDeltaRestamps
  • pkg/review/{dispatch,prompts,review,model_stamps,review_heads}.go: plumbing
  • pkg/github/review_delta.go (new): ReviewDeltaDiff via CompareCommits (one 300-file page; larger/failed = unknown, no re-stamp)
  • cmd/hive/main.go: planReviewDispatchWith fetches the compare only for candidates (no verdict, no pending, prior at another head) and records re-stamps
  • pkg/config: keys, defaults, validation
  • Tests: delta prompt construction, trivial-skip, fallback to full, no-op on first review, stamping, round-trip, wiring

@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 hanthor 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 dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels 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
#14628 🐛 fix(review): require sign-off on review-fix follow-up commits same files src/pkg/review/dispatch.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
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label 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:

  • coverage

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.

@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
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label 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.

Why:

  • the branch conflicts with the base and needs a rebase

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 re-review of a PR the hive already judged at another head SHA now
carries the previous verdict and findings and asks the reviewer to read
only the compare between the two heads. An empty or trivial delta (under
review.delta_trivial_lines, touching no previously flagged file) re-stamps
the previous verdict onto the new head without a model call. Full review
stays for first reviews, prior reject/incomplete, and stale
changes_requested findings older than review.delta_max_age.

Aggregates record delta.previous_head and delta.trivial so the cost
dashboard can split delta reviews from full ones. The new review.delta_*
keys are allowlisted in settings parity until a Settings control exists.

Fixes #14621

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/review-delta-rereview branch from 385b355 to f558cd0 Compare October 27, 2026 18:19
@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 73e7ba8 into v5 Oct 27, 2026
79 of 81 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/review-delta-rereview branch October 27, 2026 18:30
@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 `#14622385b355` sha256:cb0219b05323c3f16bf5b66edd936b9464954ffe8384f23c9e0c12fa4c19b838 — download from the dashboard or `hivectl review evidence #14622`.

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

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

Copy link
Copy Markdown
Member Author

/approve

@clubanderson

Copy link
Copy Markdown
Member Author

/lgtm

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reviewer cost: delta re-review mode for PRs already judged at an earlier head

1 participant