pub fn validate_plan(plan: &Plan) -> Result<(), PlanValidationError>Expand description
Structural validation of an already-deserialized Plan.
Enforces every rule the deserializer cannot (design.md §4, §13): no
undeclared fields, non-empty required strings, unique chunk ids, resolvable
and acyclic deps, at least one executable check per chunk and in
acceptance[], and safe repo-relative files_touched paths. Split out from
parse_and_validate_plan so a caller holding a typed Plan (e.g. one it
just built) can re-check it without re-serializing.
§Errors
Returns the first PlanValidationError found.