{"record":{"id":"765798d60805afe6","repo":"zeroclaw-labs/zeroclaw","slug":"project-intel-default-language-must-be-one-of-en","errorCode":null,"errorMessage":"project_intel.default_language must be one of: en, de, fr, it (got '{lang}')","messagePattern":"project_intel\\.default_language must be one of: en, de, fr, it \\(got '(.+?)'\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/schema.rs","lineNumber":21943,"sourceCode":"\n            let sub_key = operation\n                .sub_resource\n                .as_deref()\n                .map(str::trim)\n                .unwrap_or(\"\");\n            let operation_key = format!(\"{service}:{resource}:{sub_key}\");\n            if !seen_gws_operations.insert(operation_key.clone()) {\n                anyhow::bail!(\n                    \"google_workspace.allowed_operations contains duplicate service/resource/sub_resource entry: {operation_key}\"\n                );\n            }\n        }\n\n        // Project intelligence\n        if self.project_intel.enabled {\n            let lang = &self.project_intel.default_language;\n            if ![\"en\", \"de\", \"fr\", \"it\"].contains(&lang.as_str()) {\n                anyhow::bail!(\n                    \"project_intel.default_language must be one of: en, de, fr, it (got '{lang}')\"\n                );\n            }\n            let sens = &self.project_intel.risk_sensitivity;\n            if ![\"low\", \"medium\", \"high\"].contains(&sens.as_str()) {\n                anyhow::bail!(\n                    \"project_intel.risk_sensitivity must be one of: low, medium, high (got '{sens}')\"\n                );\n            }\n            if let Some(ref tpl_dir) = self.project_intel.templates_dir\n                && !std::path::Path::new(tpl_dir).exists()\n            {\n                anyhow::bail!(\"project_intel.templates_dir path does not exist: {tpl_dir}\");\n            }\n        }\n\n        // Proxy (delegate to existing validation)\n        self.proxy.validate()?;","sourceCodeStart":21925,"sourceCodeEnd":21961,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/schema.rs#L21925-L21961","documentation":"When project_intel.enabled is true, Config::validate() restricts project_intel.default_language to the supported set {en, de, fr, it}; any other string bails with the offending value echoed. The whitelist exists because the project-intelligence templates and analysis pipelines are only localized for those four languages, so an unsupported locale would degrade at runtime rather than fail clearly.","triggerScenarios":"A config with [project_intel] enabled = true and default_language = \"es\" (or \"EN\", \"jp\", \"zh-CN\") being validated via Config::validate().","commonSituations":"Porting a config from another deployment with a different locale; assuming the full BCP-47 tag space is accepted (\"en-US\" fails); case mismatches like \"EN\"; upgrading to a version whose language set changed.","solutions":["Set default_language to one of en, de, fr, it (lowercase, no region suffix)","If you need a different locale, disable project_intel or request/await support for it","Keep the value locale-only: \"de\" not \"de-DE\""],"exampleFix":"# before\n[project_intel]\nenabled = true\ndefault_language = \"es\"\n\n# after\n[project_intel]\nenabled = true\ndefault_language = \"en\"","handlingStrategy":"validation","validationCode":"const SUPPORTED_LANGS: [&str; 4] = [\"en\", \"de\", \"fr\", \"it\"];\nfn language_ok(lang: &str) -> bool {\n    SUPPORTED_LANGS.contains(&lang)\n}","typeGuard":"fn language_ok(lang: &str) -> bool { [\"en\", \"de\", \"fr\", \"it\"].contains(&lang) }","tryCatchPattern":"match config.validate() {\n    Ok(()) => {}\n    Err(e) if e.to_string().starts_with(\"project_intel.default_language\") => {\n        // pick one of en/de/fr/it (lowercase, no region subtag)\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Use bare locale codes without region subtags (\"de\", not \"de-DE\")","Re-check supported languages after ZeroClaw upgrades; the set can change","Disable project_intel instead of guessing a value if your locale is unsupported"],"tags":["config","project-intel","i18n","validation"],"backgroundTag":"config-enum-value-invalid","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}