Skip to main content

load_pack

Function load_pack 

Source
pub fn load_pack(path: &Path) -> Result<PolicyPack, PackError>
Expand description

Load + validate a policy pack from disk.

Ports load_pack from harness.py line-for-line:

  • JSON parse
  • required top-level fields present
  • spec_version matches ahp-policy-pack/0.1
  • expires_at parses + is in the future
  • signature.alg is EdDSA; the sentinel REFERENCE_PACK_NOT_SIGNED_LOCAL_DEV_ONLY value is allowed (caller may emit a warning).