From c59f58e4c506b58737a74e9cea4f4e4ce4f31d3d Mon Sep 17 00:00:00 2001 From: Douglas Baggett Date: Mon, 9 Nov 2026 07:33:47 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20[v6]=20proxy=20cap:=20correct=20?= =?UTF-8?q?#17379's=20changelog=20note=20and=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #17379 said a per-agent agents..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 #17379). What #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 Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Douglas Baggett --- changelog.d/fixed-agent-github-cap-override-alone.md | 2 +- src/pkg/config/github_api_budget.go | 3 --- src/pkg/config/github_api_budget_test.go | 5 +++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/changelog.d/fixed-agent-github-cap-override-alone.md b/changelog.d/fixed-agent-github-cap-override-alone.md index 8e829454fb..2e1d882ac0 100644 --- a/changelog.d/fixed-agent-github-cap-override-alone.md +++ b/changelog.d/fixed-agent-github-cap-override-alone.md @@ -1 +1 @@ -- **A per-agent GitHub API hourly cap now applies without the fleet key.** `agents..github_api_hourly_cap` was read only when `agents.github_api_hourly_cap` was also set, so `agents.reviewer.github_api_hourly_cap: 600` on its own left the reviewer at the default 300. The override now applies on its own, and a replica or review head that has none of its own takes its base agent's. `0` still means no cap at either level. See [Runtime and quota](src/docs/operator-reference/runtime-and-quota.md). +- **A replica takes its base agent's GitHub API hourly cap even before the next reload.** A replica or review head (`reviewer-2`, …) with no `agents..github_api_hourly_cap` of its own now takes its base agent's override directly, so an override set on the base applies to its replicas at once instead of after the config is next reloaded. The lookup order is the agent's own value, then the base agent's, then `agents.github_api_hourly_cap`, then the default of 300; `0` means no cap at either level. See [Runtime and quota](src/docs/operator-reference/runtime-and-quota.md). diff --git a/src/pkg/config/github_api_budget.go b/src/pkg/config/github_api_budget.go index cdcb654e2f..62f88b8813 100644 --- a/src/pkg/config/github_api_budget.go +++ b/src/pkg/config/github_api_budget.go @@ -153,9 +153,6 @@ func mappingNode(node *yaml.Node) *yaml.Node { // or review head is built as a copy of the base, so it normally carries the // base's value already; the lookup also covers a base override set after the // copy was made), then agents.github_api_hourly_cap, then the default of 300. -// The override used to be read only when the fleet key was set as well, so -// agents.reviewer.github_api_hourly_cap: 600 on its own left the reviewer at -// 300. func (c *Config) AgentGitHubAPIHourlyCap(agentName string) int { if c == nil { return DefaultAgentsGitHubAPIHourlyCap diff --git a/src/pkg/config/github_api_budget_test.go b/src/pkg/config/github_api_budget_test.go index 273d23fb58..79163bb501 100644 --- a/src/pkg/config/github_api_budget_test.go +++ b/src/pkg/config/github_api_budget_test.go @@ -62,8 +62,9 @@ agents: } } -// A per-agent override applies on its own: the fleet key used to be required -// too, so this left the reviewer at 300 (projectbluefin hive, 2026-11-09). +// A per-agent override applies with the fleet key unset. applyDefaults fills +// the fleet value in on every load, so this held before #17379 too; the test +// pins it. func TestGitHubAPIBudgetOverrideWithoutFleetKey(t *testing.T) { raw := ` agents: