{"record":{"id":"6ecf14d2284e378e","repo":"affaan-m/ECC","slug":"unknown-orchestration-template-name","errorCode":null,"errorMessage":"Unknown orchestration template: {name}","messagePattern":"Unknown orchestration template: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"ecc2/src/config/mod.rs","lineNumber":400,"sourceCode":"    pub fn resolve_agent_profile(&self, name: &str) -> Result<ResolvedAgentProfile> {\n        let mut chain = Vec::new();\n        self.resolve_agent_profile_inner(name, &mut chain)\n    }\n\n    pub fn harness_runner(&self, harness: &str) -> Option<&HarnessRunnerConfig> {\n        let key = harness.trim().to_ascii_lowercase();\n        self.harness_runners.get(&key)\n    }\n\n    pub fn resolve_orchestration_template(\n        &self,\n        name: &str,\n        vars: &BTreeMap<String, String>,\n    ) -> Result<ResolvedOrchestrationTemplate> {\n        let template = self\n            .orchestration_templates\n            .get(name)\n            .ok_or_else(|| anyhow::anyhow!(\"Unknown orchestration template: {name}\"))?;\n\n        if template.steps.is_empty() {\n            anyhow::bail!(\"orchestration template {name} has no steps\");\n        }\n\n        let description = interpolate_optional_string(template.description.as_deref(), vars)?;\n        let project = interpolate_optional_string(template.project.as_deref(), vars)?;\n        let task_group = interpolate_optional_string(template.task_group.as_deref(), vars)?;\n        let default_agent = interpolate_optional_string(template.agent.as_deref(), vars)?;\n        let default_profile = interpolate_optional_string(template.profile.as_deref(), vars)?;\n        if let Some(profile_name) = default_profile.as_deref() {\n            self.resolve_agent_profile(profile_name)?;\n        }\n\n        let mut steps = Vec::with_capacity(template.steps.len());\n        for (index, step) in template.steps.iter().enumerate() {\n            let task = interpolate_required_string(&step.task, vars).with_context(|| {\n                format!(","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/ecc2/src/config/mod.rs#L382-L418","documentation":"The config layer's orchestration-template resolver looks up `name` in the configured `orchestration_templates` map and raises this error when the key is absent. It is a configuration lookup failure: the requested template was never defined (or was renamed/deleted) in the user's config.","triggerScenarios":"Resolving an orchestration template by name when the config file omits that template, the name is misspelled or differs in case, or the config was reloaded/reset and the definition dropped.","commonSituations":"Typo between the run command's --template argument and the config key; template renamed in a config refactor; environment-specific config files where only some define the template; whitespace in the name key.","solutions":["Check the config file and add or correct the `orchestration_templates.<name>` entry","Copy the exact template name (case- and whitespace-sensitive) from config into the call/run argument","List available templates by dumping the loaded config to confirm what exists","If config was recently migrated, restore the template definition from version control"],"exampleFix":"// before\nrun_template(\"reivew-fix\")?; // typo\n// after\nlet name = \"review-fix\";\nanyhow::ensure!(\n    config.orchestration_templates.contains_key(name),\n    \"template {name} missing; available: {:?}\",\n    config.orchestration_templates.keys().collect::<Vec<_>>()\n);\nrun_template(name)?;","handlingStrategy":"validation","validationCode":"if !config.orchestration_templates.contains_key(name) {\n    anyhow::bail!(\n        \"template '{name}' not found; available: {:?}\",\n        config.orchestration_templates.keys().collect::<Vec<_>>()\n    );\n}","typeGuard":null,"tryCatchPattern":"match config.resolve_orchestration_template(name, &vars) {\n    Ok(t) => t,\n    Err(e) if e.to_string().starts_with(\"Unknown orchestration template\") => {\n        eprintln!(\"check config key spelling for '{name}'; template definitions live in the config file\");\n        Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Keep template names in a shared constant/enum instead of free strings","Validate template references at config-load time, not at resolve time","Copy template names exactly (case- and whitespace-sensitive) from config","When config files are environment-specific, assert required templates exist at startup"],"tags":["config","template","lookup"],"backgroundTag":"config-file-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}