astrid-runtime/astrid · error
no corpus selected; omit --no-synthetic or pass a corpus or
Error message
no corpus selected; omit --no-synthetic or pass a corpus or version-chain option
What it means
`load_corpora` bails when no corpus was configured (no corpus directories and no git-history version chains) yet `--no-synthetic` suppressed the default synthetic corpus, leaving `corpora` empty. The benchmark needs at least one corpus to produce evidence.
Source
Thrown at crates/astrid-storage-chunker-evidence/src/main.rs:117
if options.include_synthetic {
corpora.push(Corpus::synthetic_adversarial());
corpora.push(Corpus::synthetic_version_chain());
}
for (name, path) in &options.corpus_specs {
corpora.push(Corpus::from_path(name.clone(), path)?);
}
for (name, path) in &options.version_chain_specs {
corpora.push(Corpus::version_chain_from_path(name.clone(), path)?);
}
for (name, repository, relative_path) in &options.git_history_specs {
corpora.push(Corpus::version_chain_from_git(
name.clone(),
repository,
relative_path,
)?);
}
if corpora.is_empty() {
bail!("no corpus selected; omit --no-synthetic or pass a corpus or version-chain option");
}
ensure_unique_corpus_labels(&corpora)?;
Ok(corpora)
}
fn ensure_unique_corpus_labels(corpora: &[Corpus]) -> Result<()> {
let mut labels = HashSet::with_capacity(corpora.len());
for corpus in corpora {
if !labels.insert(corpus.name()) {
bail!("duplicate corpus label {:?}", corpus.name());
}
}
Ok(())
}
fn write_report(output: Option<&PathBuf>, report: &EvidenceReport) -> Result<()> {
let mut encoded = serde_json::to_string(report)?;
encoded.push('\n');View on GitHub (pinned to affd8760f4)
Solutions
- Remove `--no-synthetic` so the built-in synthetic corpus is used
- Pass at least one `--corpus DIR` or `--git-history NAME=REPO::PATH` option together with `--no-synthetic`
- Check earlier filtering in your pipeline isn't dropping all corpus arguments before exec
Example fix
// before bin --no-synthetic // after bin --no-synthetic --corpus ./bench/corpus // or simply bin
Defensive patterns
Strategy: validation
Validate before calling
fn selected_any_corpora(args: &[String]) -> bool {
let has_corpus = args.iter().any(|a| a.starts_with("--corpus") || a.starts_with("--git-history"));
let no_synthetic = args.iter().any(|a| a == "--no-synthetic");
has_corpus || !no_synthetic
}
assert!(selected_any_corpora(&std::env::args().skip(1).collect::<Vec<_>>())); Try / catch
match run_cli(args) {
Err(e) if e.to_string().contains("no corpus selected") => {
eprintln!("no corpora configured; falling back to synthetic corpus");
run_cli(&args_without(&args, "--no-synthetic"))
}
other => other,
} Prevention
- Pair `--no-synthetic` with at least one `--corpus` or `--git-history` flag
- Default to the synthetic corpus unless a corpus is explicitly configured
- Validate CI job arguments in a preflight script
When it happens
Trigger: Running the binary with `--no-synthetic` but without any `--corpus`/`--git-history` option, so `corpora.is_empty()` after collection.
Common situations: CI configs that add `--no-synthetic` while forgetting to add corpus flags, scripting where corpus paths were filtered out before reaching the CLI, or misunderstanding that synthetic data is the default input.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- duplicate corpus label {:?}
- --git-history requires non-empty NAME=REPO::RELATIVE_PATH
- lifecycle manifest declares environment state but no durable
- failed to fetch {name} from {url} (HTTP {})
- unexpected response shape: {other:?}
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/d5fff4aea23248ed.
Report an issue: GitHub.