fn build_plan( root: &Path, manifest: &Manifest, base: Option<&str>, head: &str, mode: GateMode, ) -> Result<Vec<ComponentPlan>>