pub fn compile_policy(
ucan: &Ucan,
lattice: &Lattice,
permissions: &impl PermissionMap,
ed_sk: &SigningKey,
pq_sk: &MlDsaSigningKey,
) -> Result<(CompiledPolicy, SignedApproval), CompileError>Expand description
Compile a policy from a validated UCAN grant, verify it does not escalate, and sign the approval — signing ONLY if the check passes (fail-closed). The caller must have already validated the UCAN chain. Returns the compiled policy (for distribution) and the signed approval (for the loader).