use crate::cli::args::PolicyValidateArgs;
use crate::exit_codes;
use anyhow::{Context, Result};
pub async fn run(args: PolicyValidateArgs) -> Result<i32> {
if args.deny_deprecations {
std::env::set_var("ASSAY_STRICT_DEPRECATIONS", "1");
}
let policy = assay_core::mcp::policy::McpPolicy::from_file(&args.input)
.with_context(|| format!("failed to load policy {}", args.input.display()))?;
policy.compile_all_schemas();
eprintln!("✔ Policy OK: {}", args.input.display());
Ok(exit_codes::OK)
}