fix(graph): bound concurrency caps by the semaphore permit limit

Semaphore::new panics above tokio's MAX_PERMITS, so a fixed or templated
map cap (or settings.max_concurrency) that large crashed the run instead
of erroring. The validator rejects both at load, resolve_max_concurrency
rejects every arm at run time, and the executor checks the graph setting
before building its own semaphore, so validation mode makes no difference.

Also corrects run_child_agent_with_graph_inputs' contract comment: inputs
for a config-only agent are rejected, not ignored.
This commit is contained in:
Dark-Alex-17 committed 2026-09-11 10:56:28 -06:00
1 parent a9f89f0414
commit 778aa6449c
4 files changed
+134 -3

No files matched your search

+2 -1
View File
@@ -565,7 +565,8 @@ impl Drop for CancelOnDrop {
/// Runs a child agent to completion. When the child is a graph agent,
/// `graph_inputs` is overlaid on its `initial_state` before the graph
/// starts; it is ignored for config-only agents.
/// starts. Passing inputs to a config-only agent is rejected before the
/// child runs, since nothing could consume them.
fn run_child_agent_with_graph_inputs(
mut child_ctx: RequestContext,
initial_input: Input,