Skip to main content

check_compliance_ir_version

Function check_compliance_ir_version 

Source
pub fn check_compliance_ir_version(raw: &str, path: &Path) -> Result<(), String>
Expand description

warble_eval_runner::ComplianceIr (the type eval compliance deserializes into) is deliberately narrower than WarbleIr — its own doc comment says so, so a compiled-in warble_ir_version field never belongs on that type. But eval compliance is not fed an arbitrary subset: every real caller hands it the same complete ir.json dispatch/manifest consume (confirmed by eval/golden/compliance/ground_truth.yaml’s own comment — its two golden IRs, examples/mutate-agent/ir.golden.json and examples/analysis-agent/ir.golden.json, are “reused as-is, not new fixtures”). So the version gate belongs here, at the CLI boundary, checked on the raw JSON before ComplianceIr ever sees it — against the same warble_claude_code::ir::SUPPORTED_IR_VERSION that the binary’s own load_ir already gates dispatch/manifest against, so every CLI-level IR consumer rejects an out-of-range version the same way.