pub struct CaseResult {Show 15 fields
pub id: String,
pub tags: Vec<String>,
pub samples: u32,
pub passes: u32,
pub pass_rate: f64,
pub pass: bool,
pub flaky: bool,
pub reason: String,
pub cost: Option<f64>,
pub latency_ms: u64,
pub turns: Option<u64>,
pub cache_hits: u32,
pub cache_misses: u32,
pub samples_detail: Vec<SampleVerdict>,
pub answer_dist: Option<BTreeMap<String, u32>>,
}Expand description
A case’s aggregate result over samples repeated runs (pass-rate methodology). At samples == 1 every field is bit-identical to the pre-repeated-sampling report shape — that identity is
the whole back-compat story, both for the gate’s case-level comparison and for the Pareto table.
Fields§
§id: String§samples: u32How many times this case was sampled. 0 only on a report predating repeated sampling —
the sentinel crate::Report::backfill_legacy detects and migrates forward. Every
freshly-produced result sets this to samples.max(1).
passes: u32How many of samples passed.
pass_rate: f64passes as f64 / samples as f64. Kept as a stored field (not recomputed on read) so a
legacy report’s backfilled value round-trips identically to a freshly-computed one.
pass: boolFully passing: every sample passed. At samples == 1 this is exactly today’s single-run
pass flag.
flaky: boolSome samples passed, some failed (0 < passes < samples). Always false at samples <= 1.
reason: StringA representative reason: the modal failure reason among failing samples, or "match" when
every sample passed.
cost: Option<f64>Summed over samples — repeated sampling multiplies spend by samples, so the total is what
a run’s cost column should reflect, not a per-sample average. None when any sample’s
backend couldn’t report cost — absent is not zero, so the sum doesn’t quietly understate.
latency_ms: u64Averaged over samples.
turns: Option<u64>Averaged over samples (num_turns) — the round-trip diagnostic. None when any sample’s
backend couldn’t report a turn count.
cache_hits: u32Samples served from the trace cache (re-scored, 0 LLM) vs freshly re-run this invocation.
cache_misses: u32§samples_detail: Vec<SampleVerdict>Per-sample verdicts. Empty on a legacy report (there is nothing to backfill this from).
answer_dist: Option<BTreeMap<String, u32>>Distinct-answer distribution across samples. Some only when the run recorded answers
(--record-answers) — absence is unambiguous (not just an empty map).
Trait Implementations§
Source§impl Clone for CaseResult
impl Clone for CaseResult
Source§fn clone(&self) -> CaseResult
fn clone(&self) -> CaseResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more