Skip to content

πŸ› review: split the grounding budget across fan-out sub-agents - #15617

Merged
hivecommons-hive[bot] merged 23 commits into
v5from
hive/adopt-15564
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 23 commits into
v5from
hive/adopt-15564

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Closes #15435

This branch is #15564's head ba20c782733e as pushed by @odttlnt (fork odttlnt/hive), unchanged. Last lane reason on the original: fork-not-editable.

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.

odttlnt and others added 3 commits October 29, 2026 16:22
A combined head kick states one whole-review grounding budget, then fans out
one sub-agent per perspective. Each sub-agent receives the shared instructions
and could read that whole budget as its own, so total tool calls could exceed
the cap. The fan-out section now says the budget covers the whole review and
gives each sub-agent an even share.

Hive-Run: #15435
Hive-Plan: review backlog follow-up to #15058
Hive-Spec: combined-review-heads#fan-out-grounding-budget
Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 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
#15564 πŸ› review: split the grounding budget across fan-out sub-agents same files changelog.d/fixed-15435-fanout-grounding-budget.md
src/pkg/review/prompts.go
src/pkg/review/review_heads_test.go
#15707 🌱 refactor: split src/pkg/review/prompts.go into 4 files CONFLICT src/pkg/review/prompts.go

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

Looks correct to me, and this is a byte-identical adoption of #15564 (both heads are ba20c782733e), so a maintainer can close #15564 in favour of this one β€” the fork branch cannot be pushed to by the hive, this branch can. I have not closed anything.

What I verified at ba20c78:

  • src/pkg/review/prompts.go:746 adds the per-sub-agent budget line to buildHeadFanOutInstruction; fanOutSubAgentBudget (prompts.go:755-761) returns max(1, combinedGroundingBudget(n)/n) with n clamped to β‰₯1, so it cannot divide by zero or hand a sub-agent a zero budget.
  • combinedGroundingBudget (prompts.go:137-141) is unchanged; the head's own whole-review cap at prompts.go:697 still states the same total, so the two numbers in the prompt are consistent.
  • src/pkg/review/review_heads_test.go:398 asserts the new wording in TestCombinedHeadPromptFansOutPerPerspective.
  • Changelog fragment name fixed-15435-fanout-grounding-budget.md follows the <category>-<slug>.md rule.

Scope matches #15435 exactly; no unrelated changes.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 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.

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Style review (head 87124cd) β€” approve, one advisory.

  • src/pkg/review/review_heads_test.go:398 pins only the prose fragment "cover this whole review, not each sub-agent"; the new fanOutSubAgentBudget (src/pkg/review/prompts.go:773-778) and the rendered at most %d investigation tool calls number (prompts.go:763) are asserted nowhere. The sibling helper is covered by TestCombinedGroundingBudgetScalesWithPerspectives (combined_boilerplate_test.go:103-124), which checks the value for 0/1/N perspectives and the exact rendered line. Following that convention (e.g. fanOutSubAgentBudget(len(DefaultPerspectives))*len(DefaultPerspectives) <= combinedGroundingBudget(...) plus the rendered line) would keep a future budget-constant change from silently breaking the split. Non-blocking.

β€” hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Reviewed (docs-currency) β€” approve, one advisory.

  • src/docs/review-swarm.md:483 (the Combined heads fan-out paragraph) still describes each sub-agent being handed "the diff, the contract text, the shared instructions and its own perspective's focus" with no mention of the per-sub-agent grounding cap this PR adds at src/pkg/review/prompts.go:763 (fanOutSubAgentBudget, :773-778). :39 likewise says the budget "is stated once for the whole session", which under a fan-out is now also split per sub-agent. A one-sentence addition at :483 (e.g. "…and a per-sub-agent share of the session's grounding tool-call budget, so the whole-review cap is not read as each sub-agent's own") would keep the operator doc in step. Changelog fragment is present and correctly named.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:Sign-off survives the squash

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

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

Read src/pkg/review/prompts.go at this head. Same patch as #15564 (identical git patch-id; that head already has a hive approve). fanOutSubAgentBudget (prompts.go:770-778) returns max(1, combinedGroundingBudget(n)/n), and combinedGroundingBudget (prompts.go:142-147) already floors n at 1, so the division is safe and the per-sub-agent figure can never exceed the shared cap. The sentence is injected at prompts.go:763, right after the model pin and before the "sub-agents must NOT post" rule, and TestCombinedHeadPromptFansOutPerPerspective asserts it. Looks correct to me.

One observation, not a defect: integer division drops the remainder, so with 5 perspectives a handful of the combined budget goes unallocated. Acceptable β€” the point of the change is that the sum stays under the cap.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 318b5e0 into v5 Oct 30, 2026
78 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-15564 branch October 30, 2026 07:56
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15617e580164` sha256:4657c5f02e67ff12e1229a14242abad1fed2ad3d1fa1e9faacdee1212e950ab9 β€” download from the dashboard or `hivectl review evidence #15617`.

@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 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 30, 2026
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 conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review backlog (intent-alignment): Grounding budget wording predates fan-out

1 participant