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_opis a valid index into the ops vector.- Every
input/lhs/rhsreference 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.