Skip to main content

evaluate_post_run

Function evaluate_post_run 

Source
pub async fn evaluate_post_run(
    spec: &SlaSpec,
    store: Option<&Arc<dyn StateStore>>,
    base_state_key: &str,
    pipeline: &str,
    row: &str,
    outcome: RunOutcome,
    now_unix: i64,
) -> Vec<SlaViolation>
Expand description

Post-run SLA evaluation for one root invocation: load prior history, evaluate, persist the updated baseline on success, and emit metrics/warnings for every violation. Returns the violations found.

This is monitoring — it must never take down the run it observes. State I/O errors are logged and swallowed; a failed read also skips the baseline update so a transient state-store outage cannot clobber the accumulated history with a fresh one.