use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum BenchError {
#[error("YAML parse error for {path}: {source}")]
Yaml {
path: PathBuf,
source: serde_yaml::Error,
},
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("download failed for {url}: {source}")]
Download {
url: String,
source: reqwest::Error,
},
#[error("benchmark not found: {0}")]
NotFound(String),
#[error("invalid benchmark definition {name}: {reason}")]
Invalid {
name: String,
reason: String,
},
#[error("cache directory not available")]
NoCacheDir,
#[error(
"spec drift for benchmark '{name}': cached spec_hash={actual_hash}, current \
spec_hash={expected_hash}; {hint}"
)]
SpecDrift {
name: String,
expected_hash: String,
actual_hash: String,
hint: String,
},
}