Merge remote-tracking branch 'origin/main' into benchmark/harness-accounting-and-solo

* origin/main:
  chore(release): release Buzz Desktop version 0.5.8 (#5326)
  fix(buzz-agent): recover from 400-shaped image rejections; unbound benchmark agent rounds (#5318)
  Revert "fix(acp): reject unattended permission requests" (#5323)
  feat(desktop): unify add agent flows (#5015)

Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
This commit is contained in:
Eva
2026-08-08 12:26:29 -04:00
32 changed files with 1125 additions and 792 deletions

View File

@@ -27,17 +27,16 @@ from .manifest import AgentClass, ExperimentManifest, GenerationConfig
from .provisioning import AgentCredential, TrialHandle
from .runtime import RuntimeResult
# Tool/LLM rounds allowed per agent turn (BUZZ_AGENT_MAX_ROUNDS).
#
# Deliberately set high enough that no condition reaches it, because the cap is
# per *turn* and the counter resets on every wake (buzz-agent agent.rs:82). A
# solo agent is woken exactly once, so its cap is its whole budget for the task;
# a team member gets the same cap per assignment, across arbitrarily many
# assignments. Any value a real task can hit therefore handicaps the solo
# 0 = unbounded, buzz-agent's own documented "no cap" value. The cap is per
# *turn* and the counter resets on every wake (buzz-agent agent.rs:82). A
# solo agent is woken exactly once, so any finite cap is its whole budget for
# the task; a team member gets the same cap per assignment, across arbitrarily
# many assignments. Any value a real task can hit therefore handicaps the solo
# baseline for a reason unrelated to team shape. Let the trial timeout and the
# cost ceiling bind instead — those apply to every condition equally.
DEFAULT_MAX_AGENT_ROUNDS = 300
DEFAULT_MAX_AGENT_ROUNDS = 0
# buzz-acp logs each agent's cumulative token counters under this tracing
# target. It is the harness's only token source, so the directive is not
# optional decoration — without it every trial reports zero cost. See
@@ -284,8 +283,8 @@ class BuzzContainerRuntime:
usage_settle_seconds: float = 60.0,
poll_seconds: float = 1.0,
) -> None:
if max_agent_rounds <= 0:
raise ValueError("max_agent_rounds must be positive")
if max_agent_rounds < 0:
raise ValueError("max_agent_rounds must be >= 0 (0 = unbounded)")
if readiness_timeout_seconds <= 0:
raise ValueError("readiness_timeout_seconds must be positive")
if usage_settle_seconds < 0:

View File

@@ -641,9 +641,12 @@ async def _value(value):
return value
def test_runtime_rejects_unbounded_agent_rounds(tmp_path):
with pytest.raises(ValueError, match="positive"):
runtime(tmp_path, max_agent_rounds=0)
def test_runtime_validates_construction_bounds(tmp_path):
# 0 is legal and means unbounded (BUZZ_AGENT_MAX_ROUNDS=0); the trial
# budget is the clock. Only negatives are rejected.
runtime(tmp_path, max_agent_rounds=0)
with pytest.raises(ValueError, match="unbounded"):
runtime(tmp_path, max_agent_rounds=-1)
with pytest.raises(ValueError, match="positive"):
runtime(tmp_path, readiness_timeout_seconds=0)
with pytest.raises(ValueError, match="negative"):

View File

@@ -677,6 +677,7 @@ name = "harbor-buzz-orchestra"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "certifi" },
{ name = "harbor" },
{ name = "pydantic" },
{ name = "pyyaml" },
@@ -691,6 +692,7 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "certifi", specifier = ">=2024.2.2" },
{ name = "harbor", specifier = ">=0.16.1,<0.18" },
{ name = "pydantic", specifier = ">=2.11" },
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.4" },