Skip to content

πŸ“– [v6] proxy cap: correct #17379's changelog note (the per-agent cap was never ignored) - #17388

Merged
hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:docs/v6-agent-cap-changelog-correction
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:docs/v6-agent-cap-changelog-correction

Conversation

@Danathar

@Danathar Danathar commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

#17379's changelog note and comments describe a bug that did not exist. They say a per-agent agents.<name>.github_api_hourly_cap was ignored unless the fleet key was also set. On a loaded config it was never ignored: every load runs applyDefaults (src/pkg/config/load.go:92), which fills in the fleet value (defaults.go:128-130), so the old guard never fired. The hive reviewer pointed this out on #17379, and it merged before the correction. This PR changes only text: the changelog fragment now describes what #17379 actually adds (replicas and review heads take the base agent's override directly), and two comments are corrected.

Files

  • changelog.d/fixed-agent-github-cap-override-alone.md: rewritten.
  • src/pkg/config/github_api_budget.go: the getter's comment no longer claims the old bug.
  • src/pkg/config/github_api_budget_test.go: the test comment says the case held before too.

No behaviour change. Only gofmt -l was run locally.

Refs #17379

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…ents

hivecommons#17379 said a per-agent agents.<name>.github_api_hourly_cap was ignored
without the fleet key. It was not: every load runs applyDefaults, which
fills the fleet value in, so the old guard never fired on a loaded
config (hive reviewer on hivecommons#17379). What hivecommons#17379 adds is the base-agent
fallback for replicas and review heads. The changelog note and comments
now say that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Douglas Baggett <doug.baggett@gmail.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 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 Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks correct to me β€” the factual claim this PR rests on checks out against the v6 tree.

  • src/pkg/config/load.go:92 calls applyDefaults() on every load, and src/pkg/config/defaults.go:128-130 sets AgentsGitHubAPIHourlyCap = 300 whenever it is 0 and unset. So on any loaded config the pre-#17379 early return (if c.AgentsGitHubAPIHourlyCap == 0 && !c.AgentsGitHubAPIHourlyCapSet { return Default }) could not fire: the field was either 300 or an explicitly-set value. The per-agent override was never skipped; the only case the old guard affected was a hand-built Config{} that bypassed Load.
  • The rewritten fragment describes what #17379 actually adds β€” the BaseAgentName fallback at github_api_budget.go:165-169 β€” and the lookup order it states matches the getter body line for line.

Text-only change (changelog fragment + two comments), CI green. Nothing to fix.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks correct to me; this is a text-only correction and the factual claim holds against the v6 tree.

What I checked:

  • Pre-#17379 getter (src/pkg/config/github_api_budget.go, removed hunk in #17379) returned early on c.AgentsGitHubAPIHourlyCap == 0 && !c.AgentsGitHubAPIHourlyCapSet, before consulting the per-agent override.
  • Load calls cfg.applyDefaults() unconditionally (src/pkg/config/load.go:92), and applyDefaults sets AgentsGitHubAPIHourlyCap = 300 whenever it is zero and unset (src/pkg/config/defaults.go:128-130). So on any loaded config the old guard could not fire, and the per-agent override was already honoured. The old changelog's "left the reviewer at the default 300" described a path only reachable with a hand-built &Config{}, not an operator config.
  • The rewritten fragment's lookup order (own β†’ base agent β†’ fleet key β†’ 300) matches the current getter (github_api_budget.go:156-171), and src/docs/operator-reference/runtime-and-quota.md:166-169 already says the same thing, so no doc drift is introduced.

No behaviour change; the three edits are the fragment and two comments, as the body says.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Looks correct to me; the correction is accurate against the v6 tree.

I checked the claim rather than taking it from the body. Before #17379 (d4bbc1a), AgentGitHubAPIHourlyCap returned early only when AgentsGitHubAPIHourlyCap == 0 && !AgentsGitHubAPIHourlyCapSet. Load calls applyDefaults at src/pkg/config/load.go:92, and defaults.go:128-130 fills AgentsGitHubAPIHourlyCap = 300 under exactly that condition, so on any loaded config the guard was unreachable. The only production consumer is src/cmd/hive/main.go:4332, which hands b.cfg.AgentGitHubAPIHourlyCap from a loaded config to the proxy β€” so the "ignored without the fleet key" bug described by the old fragment could not occur in a running hive. The old comment at github_api_budget.go:156-158 and the test comment at github_api_budget_test.go:65-66 repeated that story; this diff removes it from both.

What #17379 did add β€” the base-agent fallback at github_api_budget.go:166-170 β€” is what the rewritten fragment now describes, and the lookup order it states matches the code and the existing paragraph in src/docs/operator-reference/runtime-and-quota.md:166-169, which never claimed the prior bug and needs no change.

Text-only diff; no behaviour change. Nothing to request.

Evidence bundle `#17388166d48a` sha256:fdf8f27c7fc60fe2aab75b95b174d3f397c3115909aff94c0c7948a8ecc2f0a3 β€” download from the dashboard or `hivectl review evidence #17388`.

@hivecommons-hive
hivecommons-hive Bot merged commit 9b37bd0 into hivecommons:v6 Nov 9, 2026
66 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant