affaan-m/ECC · error · anyhow::Error

at least one explicit seed is required

Error message

at least one explicit seed is required

What it means

evaluate_paired requires an explicit, non-empty seed list before running paired candidate/baseline evaluation. It fires when `seeds` is an empty slice, forcing callers to choose seeds deterministically rather than relying on implicit defaults.

Source

Thrown at ecc2/src/harness_eval.rs:467

        Ok(self.health_ok)
    }
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PairedSample {
    pub seed: u64,
    pub candidate_score: f64,
    pub baseline_score: f64,
}

pub fn evaluate_paired(
    evaluator: &mut dyn Evaluator,
    candidate_id: &str,
    baseline_id: &str,
    seeds: &[u64],
) -> Result<Vec<PairedSample>> {
    if seeds.is_empty() {
        bail!("at least one explicit seed is required");
    }
    if seeds.len() > 10_000 {
        bail!("seed count exceeds 10000");
    }
    if seeds.iter().copied().collect::<BTreeSet<_>>().len() != seeds.len() {
        bail!("seeds must be unique");
    }
    seeds
        .iter()
        .map(|seed| {
            Ok(PairedSample {
                seed: *seed,
                candidate_score: evaluator.evaluate(candidate_id, *seed)?,
                baseline_score: evaluator.evaluate(baseline_id, *seed)?,
            })
        })
        .collect()
}

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Pass at least one explicit seed to the evaluation run.
  2. Check that the seed list is not being emptied by argument parsing before validation.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at ecc2/src/harness_eval.rs:467 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/7f859db42a4dfb3c. Report an issue: GitHub.