affaan-m/ECC · error
incomplete harness health evidence integrity metadata
Error message
incomplete harness health evidence integrity metadata
What it means
Raised when harness health evidence integrity metadata is present but incomplete: the verifier expects all four fields (evidence JSON, SHA-256 digest, asserted-health flag, health check status) via the `fields` tuple, and any None among them triggers this bail. It guarantees no partially-specified evidence can pass verification.
Solutions
- Ensure all four evidence fields (json, sha256 digest, asserted flag, status) are populated atomically when the audit event is created
- Inspect the offending row (SELECT health_evidence_json, health_evidence_sha256, asserted_health, health_check_status FROM harness_evaluations/audit) to find which field is NULL and backfill it
- If the evidence is unrecoverable, mark the row as legacy_unverifiable rather than attaching partial evidence
Defensive patterns
Strategy: validation
Validate before calling
// Ensure all four evidence fields are set atomically before insert
assert!(json.is_some() && digest.is_some() && asserted.is_some() && status.is_some(),
"health evidence metadata must be complete"); Prevention
- Write all evidence columns in a single transaction/statement, never field-by-field
- Model evidence as a struct so partial construction is a compile error
- Backfill old rows once during migration and flag any that cannot be backfilled
When it happens
Trigger: Writing an audit entry with, say, evidence JSON and digest but a missing asserted_health or health_check_status field; a partial migration or manual UPDATE that sets only some evidence columns.
Common situations: Schema migrations that added new evidence columns after older rows were written; a bug where one field is written after a failed health check; hand-edited database rows.
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
- audit health evidence does not match its evaluation
- harness health evidence integrity verification failed
- missing harness health evidence integrity metadata
- candidate content address or canonical configuration is…
- harness health evidence exceeds integrity verification bound
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/4e15b41333fce421.
Report an issue: GitHub.
Appendix: source
Thrown at ecc2/src/session/store.rs:5596
let fields = (
&entry.health_evidence_json,
&entry.health_evidence_sha256,
entry.asserted_health,
&entry.health_check_status,
);
if matches!(fields, (None, None, None, None)) {
if entry.legacy_unverifiable
|| matches!(
entry.event_type.as_str(),
"initial_activation" | "promotion_rejected"
)
{
return Ok(());
}
anyhow::bail!("missing harness health evidence integrity metadata");
}
let (Some(json), Some(digest), Some(asserted), Some(status)) = fields else {
anyhow::bail!("incomplete harness health evidence integrity metadata");
};
if json.len() > 8192 {
anyhow::bail!("harness health evidence exceeds integrity verification bound");
}
let snapshot: HealthEvidenceSnapshot = serde_json::from_str(json)?;
let snapshot_candidate_id =
Self::resolve_harness_candidate_id(&self.conn, &snapshot.candidate_id)?;
if snapshot.canonical_json()? != *json
|| snapshot.digest()? != *digest
|| snapshot.asserted_healthy != asserted
|| snapshot_candidate_id != entry.candidate_id
{
anyhow::bail!("harness health evidence integrity verification failed");
}
let event_consistent = match entry.event_type.as_str() {
"promoted" => status == "healthy" && asserted,
"promotion_rolled_back" => status == "unhealthy" && !asserted,
"health_check_error_rolled_back" => status == "error",View on GitHub (pinned to 8321021c54)