affaan-m/ECC · error

orchestration template {name} has no steps

Error message

orchestration template {name} has no steps

What it means

Runtime error from Config::resolve_orchestration_template in ecc2/src/config/mod.rs. Immediately after locating the template, the method checks template.steps.is_empty(); if the template exists but defines no steps, it bails with "orchestration template {name} has no steps". The template was found, but it is unusable because there is nothing to run.

Source

Thrown at ecc2/src/config/mod.rs:403

    }

    pub fn harness_runner(&self, harness: &str) -> Option<&HarnessRunnerConfig> {
        let key = harness.trim().to_ascii_lowercase();
        self.harness_runners.get(&key)
    }

    pub fn resolve_orchestration_template(
        &self,
        name: &str,
        vars: &BTreeMap<String, String>,
    ) -> Result<ResolvedOrchestrationTemplate> {
        let template = self
            .orchestration_templates
            .get(name)
            .ok_or_else(|| anyhow::anyhow!("Unknown orchestration template: {name}"))?;

        if template.steps.is_empty() {
            anyhow::bail!("orchestration template {name} has no steps");
        }

        let description = interpolate_optional_string(template.description.as_deref(), vars)?;
        let project = interpolate_optional_string(template.project.as_deref(), vars)?;
        let task_group = interpolate_optional_string(template.task_group.as_deref(), vars)?;
        let default_agent = interpolate_optional_string(template.agent.as_deref(), vars)?;
        let default_profile = interpolate_optional_string(template.profile.as_deref(), vars)?;
        if let Some(profile_name) = default_profile.as_deref() {
            self.resolve_agent_profile(profile_name)?;
        }

        let mut steps = Vec::with_capacity(template.steps.len());
        for (index, step) in template.steps.iter().enumerate() {
            let task = interpolate_required_string(&step.task, vars).with_context(|| {
                format!(
                    "resolve task for orchestration template {name} step {}",
                    index + 1
                )

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Open the config and confirm the template has a non-empty `steps` array at the correct nesting level.
  2. Validate the config file against the schema and fix indentation / key-name errors.
  3. If the template is intentionally a placeholder, remove its references until it has steps.
  4. Re-run config validation/lint to catch malformed structures before runtime.

Example fix

# before
[[orchestration_templates]]
name = "deploy"

# after
[[orchestration_templates]]
name = "deploy"
steps = [
  { agent = "deployer", task = "push" },
]
Defensive patterns

Strategy: validation

Validate before calling

// Validate the template's step count before resolving.
if let Some(t) = cfg.template(name) {
    if t.steps.is_empty() {
        eprintln!("template {name} has no steps; refusing to resolve");
        return Ok(());
    }
}

Type guard

fn template_has_steps(cfg: &Config, name: &str) -> bool {
    cfg.template(name).map(|t| !t.steps.is_empty()).unwrap_or(false)
}

Try / catch

let resolved = cfg.resolve_orchestration_template(name, &vars).map_err(|e| {
    if e.to_string().contains("has no steps") {
        anyhow::anyhow!("{e}; add at least one step to [[orchestration_templates]] name = {name:?}")
    } else {
        e
    }
})?;

Prevention

When it happens

Trigger: Calling resolve_orchestration_template on a template whose `steps` array is empty or omitted in the config. The lookup succeeds but the steps guard fails.

Common situations: User added a template skeleton and forgot to populate steps; a YAML/TOML indentation error placed steps under the wrong key so the array parses as empty; the steps key is misspelled (e.g. step instead of steps); a refactor moved steps into a sub-table that the schema does not read.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/02c0a43823eb4833. Report an issue: GitHub.