Skip to main content

validate_proposal

Function validate_proposal 

Source
pub fn validate_proposal(
    proposal: &PatchProposal,
    mode: RepairMode,
    extension_root: Option<&Path>,
) -> Vec<ProposalValidationError>
Expand description

Validate a PatchProposal against policy constraints.

Checks:

  1. Proposal is non-empty.
  2. All ops are in the allowed tag set for the mode.
  3. Overall risk does not exceed mode permissions.
  4. The rule_id references a known rule (if non-empty).
  5. Module paths stay within the extension root (monotonicity).