Skip to main content

validate_plan_structure

Function validate_plan_structure 

Source
pub fn validate_plan_structure(
    plan: &Plan,
) -> Result<(), Vec<PlanValidationError>>
Expand description

Validate the structural integrity of a deserialized plan.

Checks that:

  • The plan is non-empty.
  • root_op is a valid index into the ops vector.
  • Every input / lhs / rhs reference is in-bounds.
  • No op references itself or a later op (no forward references = no cycles).

This function performs no semantic validation (e.g., type compatibility between connected ops). Call this immediately after deserialization to reject malformed plans before engine execution.