pub async fn execute_pipeline<I>(
executor: Arc<dyn AgentExecutor>,
items: Vec<I>,
stages: Vec<PipelineStage<I>>,
event_tx: Option<Sender<AgentEvent>>,
) -> Vec<Option<StepOutcome>>where
I: Send + 'static,Expand description
Run each item through stages as an independent chain.
All chains run concurrently, bounded by the executor’s
concurrency_hint — there is no
barrier between stages, so item A can be in stage 3 while item B is still
in stage 1. Wall-clock is the slowest single chain, not the
sum-of-slowest-per-stage that a barrier parallel per stage would incur.
A chain stops early when a stage returns None or when a step fails
(later stages would only build on a failed result). Returns each item’s
last outcome (None if its first stage produced no spec), preserving input
order. A stage closure that panics isolates to that one chain (its result
becomes None) without dropping the others.