Skip to content

✨ review: scale reviewer concurrency up and down with backlog - #14728

Closed
hivecommons-hive[bot] wants to merge 1 commit into
v5from
hive/adopt-14702
Closed

hivecommons-hive[bot] wants to merge 1 commit into
v5from
hive/adopt-14702

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #14702 (adopted after CI went red and the contributor was unavailable; original commits by @Karibhou preserved).

Closes #14685

This branch is #14702's head c01758e1d020 as pushed by @Karibhou (fork Karibhou/hive), unchanged. Last lane reason on the original: check-failing:coverage.

Hive fix agent: rebase this branch on v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Add review.reviewers.autoscale. The planner records the PR heads that
found every plain reviewer busy (DispatchPlan.ReviewerStarved). A
clock-injected ReviewerAutoscaler turns that backlog, plus how long the
oldest head has waited, into an active replica count between min and
max, with streaks for hysteresis and a cooldown between steps. It holds
scale-up at max, while the provider budget latch is set, when cgroup
headroom is short, and for one cooldown after a reviewer kick fails with
"did not reach input prompt".

Dynamic replicas come from ExpandAgentReplicas, which raises the scaled
agent to max without rewriting its declared replicas. Replicas above the
active count take no review-swarm kick (DispatchOptions.ReplicaLimits)
and no cadence kick. A turn already in flight is never interrupted, so a
scaled-in replica drains.

Hive-Run: #14685
Hive-Plan: review-reviewer-autoscale
Hive-Spec: review-swarm#reviewer-autoscale

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kjsZcEuDdED3kSWiqU
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
@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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Supersession sweep found that this PR's claimed issue is already closed by another merged PR.

  • Claimed issue: hive#14685
  • Closing PR: #14695

This PR touches files the merged PR did not, so the hive is resolving it itself, but GitHub refused to update head c01758e onto v5 (merge conflict between base and head). The fix lane owns the rebase; the sweep re-measures the diff once a new head lands.

This comment is edited in place by the supersession sweep; it is not duplicated.

@hivecommons-hive hivecommons-hive Bot added the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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
#14682 🌱 runtime: loopback pprof, periodic memstats and cgroup-aware GOMEMLIMIT same files src/cmd/hive/main.go
src/pkg/config/config.go
#14702 ✨ review: scale reviewer concurrency up and down with backlog same files changelog.d/added-14685-reviewer-autoscale.md
src/cmd/hive/main.go
src/cmd/hive/review_autoscale.go
src/cmd/hive/review_autoscale_test.go
src/docs/review-swarm.md
src/hive.yaml.example
src/pkg/config/config.go
src/pkg/config/review_autoscale.go
src/pkg/config/review_autoscale_test.go
src/pkg/config/validate.go
src/pkg/dashboard/status_builder.go
src/pkg/review/autoscale.go
src/pkg/review/autoscale_test.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
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/main.go

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Closing: the autoscaler for #14685 already landed on v5 via #14695 (review.reviewers.autoscale), and #14685 is closed. This branch now conflicts with that implementation in config.go, dispatch.go and main.go, so there is nothing left for it to carry.

@hivecommons-hive hivecommons-hive Bot closed this Oct 27, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision needed: @clubanderson should decide whether #14702/#14728 or #14695 is the reviewer-autoscale implementation for #14685 before the fix lane spends effort rebasing this one — they add review.reviewers.autoscale to the same files with incompatible shapes and cannot both merge.

Decision needed: @clubanderson should decide whether #14702/#14728 or #14695 is the reviewer-autoscale implementation for #14685 before the fix lane spends effort rebasing this one — they add review.reviewers.autoscale to the same files with incompatible shapes and cannot both merge.

This PR's head c01758e1d020 is the identical commit to #14702's head (the body says so and the SHAs match), so the review already posted on #14702 at that head applies verbatim here rather than being re-derived:

  • Conflicts with #14695 (same issue, same config key, same six files; different demand signal, different replica-retirement mechanism, different controller package). It is a pick-one, not a rebase-and-merge-both. #14685 is @clubanderson's issue and #14695 is their implementation, so the pick is theirs.
  • The red checks are the diff's fault (TestAgentRuntimeConfigGolden at pkg/config/agent_runtime_golden_test.go:45, TestSettingsDialogReferencesEveryHiveYAMLLeaf at pkg/dashboard/settings_parity_test.go:33, coverage), so a fix agent can make them green — but only worth doing if this is the chosen implementation.

Nothing closed; flagging so the adoption does not race the decision.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review: scale reviewer concurrency up and down with backlog

1 participant