pub struct StopGates {
pub max_iterations: u32,
pub max_revisions_per_node: u32,
pub max_wall_clock_seconds: Option<u64>,
pub max_tokens: Option<u64>,
pub max_cost_usd: Option<f64>,
pub no_progress_iterations: u32,
pub no_progress_iterations_randomness: Option<u32>,
pub stop_on_overall_success: bool,
}Fields§
§max_iterations: u32Hard ceiling on whole-loop iterations.
max_revisions_per_node: u32Per-node revision ceiling. A node that has been dispatched this many times without its goals being satisfied stops being dispatched, so one stuck node cannot burn the whole iteration budget.
max_wall_clock_seconds: Option<u64>Wall-clock budget for the whole run.
max_tokens: Option<u64>Token budget for the whole run, summed across providers.
max_cost_usd: Option<f64>Currency budget for the whole run.
no_progress_iterations: u32Halt when this many consecutive iterations produce no measurable change. Jidoka: stop the line rather than spin.
no_progress_iterations_randomness: Option<u32>Perturb the run after this many stalled iterations, instead of waiting
to halt at no_progress_iterations.
Must be strictly less than no_progress_iterations: the point is to try
something different before giving up, and a threshold at or past the
halt point never fires. Leave it unset to halt without ever varying —
perturbation costs a provider call and changes what the loop does, so it
is opt-in.
stop_on_overall_success: boolStop as soon as every overall success scenario is met.