affaan-m/ECC · error · anyhow::Error
{kind} references exceed bounded limits
Error message
{kind} references exceed bounded limits What it means
normalize_refs enforces bounded sizes on candidate reference lists: at most 100 entries and each entry at most 4096 bytes. The error fires for trace/evidence refs that exceed either bound, preventing unbounded reference payloads in candidate specs.
Source
Thrown at ecc2/src/harness_eval.rs:264
self.evidence_refs.clone(),
)?
.id)
}
}
#[derive(Serialize)]
struct CanonicalCandidateArtifact<'a> {
config: Value,
trace_refs: &'a [String],
evidence_refs: &'a [String],
}
fn normalize_refs(kind: &str, refs: Vec<String>) -> Result<Vec<String>> {
if refs.is_empty() || refs.iter().any(|reference| reference.trim().is_empty()) {
bail!("at least one non-empty {kind} reference is required");
}
if refs.len() > 100 || refs.iter().any(|reference| reference.len() > 4096) {
bail!("{kind} references exceed bounded limits");
}
let mut normalized = refs
.into_iter()
.map(|reference| reference.trim().to_string())
.collect::<Vec<_>>();
normalized.sort();
normalized.dedup();
Ok(normalized)
}
fn sha256_hex(bytes: &[u8]) -> String {
Sha256::digest(bytes)
.iter()
.map(|byte| format!("{byte:02x}"))
.collect()
}
fn canonicalize(value: Value) -> Value {View on GitHub (pinned to 06c5e118c4)
Solutions
- Trim the reference list to the documented bounded limit for that kind.
- Split the evidence across multiple submissions if the reference count legitimately exceeds the bound.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at ecc2/src/harness_eval.rs:264 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/6c1906b2cc720313.
Report an issue: GitHub.