Skip to content

fix(alpha): enforce the launcher's run cap on hosts - #337

Merged
tbhb-agent merged 1 commit into
mainfrom
agent/tools-admission-cap
Nov 23, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
agent/tools-admission-cap

Conversation

@tbhb-agent

Copy link
Copy Markdown
Collaborator

Why

The run host read max_concurrent_runs from the agent account's own config, which can predate the launcher's cap or lack the host. On a Linux build host the default of 3 applied while the launcher's cap was 1, so three review runs held slots at once.

Behavior change

The launcher now writes its max_concurrent_runs for the resolved host into the run request, and admission.reserve uses that value only. The run host refuses a request without a cap, and a negative cap fails validation. A request saved before this change still parses, then the run host refuses it for lacking a cap. A cap of 0 still disables the host.

Deviations from the task

The launcher sends only the cap. load_limit stays a launcher-side check, because the launcher enforces it before the run starts.

Risk

A run request written by an older driver fails closed on the run host until the launcher updates. Mixed-version fleets must sync before launching.

Verification

pytest passes for the admission, request, driver, limits and run-host files with 100% line and branch coverage on the changed modules. ruff and pyrefly pass. CI runs the full Bazel suite.

Opened-by: LLM effort=medium;harness=claude-code:2.1.322;model=anthropic:claude-sonnet-5-5;session=sha-256-64:24ed779d56b187de;surface=cli
Generated-by: LLM effort=medium;harness=claude-code:2.1.322;model=anthropic:claude-sonnet-5-5;session=sha-256-64:24ed779d56b187de;started_at=2026-11-15T16:51:11Z;surface=cli

Generated-by: LLM effort=medium;harness=claude-code:2.1.322;model=anthropic:claude-sonnet-5-5;session=sha-256-64:24ed779d56b187de;started_at=2026-11-15T16:51:11Z;surface=cli
@tbhb-agent
tbhb-agent requested a review from tbhb as a code owner November 23, 2026 14:19
@tbhb-agent
tbhb-agent merged commit 069f720 into main Nov 23, 2026
5 checks passed
@tbhb-agent
tbhb-agent deleted the agent/tools-admission-cap branch November 23, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant