{"record":{"id":"c8c7d8a114285e96","repo":"zeroclaw-labs/zeroclaw","slug":"cloud-ops-default-cloud-is-not-in-cloud-ops-s","errorCode":null,"errorMessage":"cloud_ops.default_cloud '{}' is not in cloud_ops.supported_clouds {:?}","messagePattern":"cloud_ops\\.default_cloud '(.+?)' is not in cloud_ops\\.supported_clouds (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/schema.rs","lineNumber":18587,"sourceCode":"                    \"cloud_ops.default_cloud must not be empty when cloud_ops is enabled\"\n                );\n            }\n            if self.supported_clouds.is_empty() {\n                anyhow::bail!(\n                    \"cloud_ops.supported_clouds must not be empty when cloud_ops is enabled\"\n                );\n            }\n            for (i, cloud) in self.supported_clouds.iter().enumerate() {\n                if cloud.trim().is_empty() {\n                    validation_bail!(\n                        RequiredFieldEmpty,\n                        format!(\"cloud_ops.supported_clouds[{i}]\"),\n                        \"cloud_ops.supported_clouds[{i}] must not be empty\"\n                    );\n                }\n            }\n            if !self.supported_clouds.contains(&self.default_cloud) {\n                anyhow::bail!(\n                    \"cloud_ops.default_cloud '{}' is not in cloud_ops.supported_clouds {:?}\",\n                    self.default_cloud,\n                    self.supported_clouds\n                );\n            }\n            if self.cost_threshold_monthly_usd < 0.0 {\n                anyhow::bail!(\n                    \"cloud_ops.cost_threshold_monthly_usd must be non-negative, got {}\",\n                    self.cost_threshold_monthly_usd\n                );\n            }\n            if self.iac_tools.is_empty() {\n                anyhow::bail!(\"cloud_ops.iac_tools must not be empty when cloud_ops is enabled\");\n            }\n        }\n        Ok(())\n    }\n}","sourceCodeStart":18569,"sourceCodeEnd":18605,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/schema.rs#L18569-L18605","documentation":"The enabled cloud_ops module must be internally consistent: `default_cloud` must be an exact, case-sensitive member of `supported_clouds`. The check is a plain `Vec::contains`, so both mismatched values and case differences (`\"AWS\"` vs `\"aws\"`) fail, including the common shape where the list was narrowed but the default was left at `\"aws\"`.","triggerScenarios":"`default_cloud = \"aws\"` with `supported_clouds = [\"gcp\"]`; `default_cloud = \"AWS\"` with `supported_clouds = [\"aws\"]` (case mismatch); whitespace inside a list entry (e.g. `\" aws\"`) so the exact match fails even though the value looks right.","commonSituations":"Narrowing cloud support to one provider and forgetting the default; uppercase cloud names pasted from vendor docs; templated lists where the default comes from a different variable than the list and they drift.","solutions":["Set `default_cloud` to one of the exact strings in `supported_clouds`.","Or add the intended default to `supported_clouds`.","Check for case and hidden whitespace differences between the two values."],"exampleFix":"# before\ndefault_cloud = \"aws\"\nsupported_clouds = [\"gcp\"]\n\n# after\ndefault_cloud = \"gcp\"\nsupported_clouds = [\"gcp\"]","handlingStrategy":"validation","validationCode":"anyhow::ensure!(\n    !cloud_ops.enabled || cloud_ops.supported_clouds.contains(&cloud_ops.default_cloud),\n    \"default_cloud must be an exact member of supported_clouds\"\n);","typeGuard":"fn default_cloud_supported(c: &CloudOpsConfig) -> bool {\n    c.supported_clouds.contains(&c.default_cloud)\n}","tryCatchPattern":null,"preventionTips":["Keep default_cloud and supported_clouds from the same source of truth in generated config.","Match case exactly — the check is case-sensitive.","When narrowing the list, re-check the default in the same edit."],"tags":["cloud-ops","config","consistency","zeroclaw"],"backgroundTag":"config-value-not-in-allowed-set","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}