Skip to main content

rescore

Function rescore 

Source
pub fn rescore(trace: &Trace, case: &GoldenCase) -> Option<CompareResult>
Expand description

Re-score a cached trace against a golden case’s current expectation — the 0-LLM path. Dispatches on the case’s crate::ResultKind via score_value just like a fresh run does, so a Table case’s cached {columns,rows} and a Verdict case’s cached envelope both re-project the same way. Returns None if the cached result doesn’t have the shape the case’s kind expects (a corrupt entry, or a case whose result_kind changed since the trace was captured; the caller then re-runs the case). This is what makes “only the golden’s expected changed” cost zero LLM calls: the result is reused, only the comparison is redone.