Skip to main content

execute_all

Function execute_all 

Source
pub async fn execute_all(
    dag: &GateDAG,
    concurrency_limit: usize,
    workspace_root: &Path,
    runner: &dyn GateRunner,
) -> Vec<GateResult>
Expand description

Execute all gates in the DAG, respecting dependency order and concurrency.

Gates within the same topological layer are started sequentially while honouring the semaphore-bounded concurrency_limit. Dependent gates only start after their prerequisites complete.

§Prerequisite failure cascade (Req 2.4)

When a gate FAILS or TIMES_OUT, all transitive downstream gates are marked DagGateStatus::Skipped with a skip_reason of "dependency failed: <gate>". Skipped gates are not passed to the runner.

§Parameters

  • dag: the gate graph (from [build_dag]).
  • concurrency_limit: max gates running simultaneously (0 → default 4).
  • workspace_root: working directory for subprocess invocations.
  • runner: injectable runner (use SubprocessRunner in production, MockRunner in tests).