Skip to main content

evaluate_rules

Function evaluate_rules 

Source
pub fn evaluate_rules(
    rules: &[SequenceRule],
    calls: &[SequenceCall],
    policy: Option<&Policy>,
    extent: TraceExtent,
) -> Vec<RuleEvaluation>
Expand description

Evaluate every rule against the ordered tool-call names, returning one record per rule.

Every rule is evaluated. An earlier caller returned on the first violation, which made the records for later rules unobtainable rather than empty — a reader could not tell a rule that held from one that was never reached. Callers that want fail-fast semantics reduce over the result; the reduction is theirs to state.