Let a sweep run more than four at a time, and name the run a failure was in

Concurrent runs sat at 4 whatever FLOW_MAX_CASCADES said: that setting bounds
cascades, and the run drivers read a hardcoded MAX_PARALLEL nobody could reach.
FLOW_MAX_RUNS is the knob they read now, --max-runs/--max-cascades/--max-workers
are the same three as flags on serve, and the engine says which numbers it
started with — which is the only way to tell that a settings file was read.

Events keep the run they happened in. The payload always carried it and the
persist path dropped it, so reading one run's failures meant filtering the
engine-wide list; a batch run's id reaches those events now too, since a run
has no journaled item to name itself by.

Also: a provisioner's 0 means "no deadline" rather than "cancel on the next
reconcile", and a command that reaches no engine says how to start one.
This commit is contained in:
2026-08-27 14:17:51 +02:00
parent 2c081fe3ed
commit 081d499edc
23 changed files with 288 additions and 18 deletions
+7 -3
View File
@@ -299,18 +299,22 @@ class Client:
kind: str = "failure",
limit: int = 10,
flow: str = "",
run: str = "",
since: Any = None,
until: Any = None,
) -> list[dict[str, Any]]:
"""What went wrong, or who changed what. Newest first.
Engine-wide, and narrowed by flow or by time. What *one run* did is a
question about that run: :attr:`RunHandle.failures` answers it from the
run's own node rows, which carry the traceback anyway.
Engine-wide, and narrowed by flow, by run or by time. ``run`` takes a
run id and answers what the engine recorded during it. For the failure
that ended a run, :attr:`RunHandle.failures` is still the shorter road:
it reads the run's own node rows, which carry the traceback too.
"""
query: dict[str, Any] = {"kind": kind, "limit": limit}
if flow:
query["flow"] = flow
if run:
query["run"] = run
for name, value in (("since", since), ("until", until)):
if value is not None:
query[name] = (