{"record":{"id":"fa0e4d053b4a925a","repo":"zeroclaw-labs/zeroclaw","slug":"cloud-ops-supported-clouds-must-not-be-empty-when","errorCode":null,"errorMessage":"cloud_ops.supported_clouds must not be empty when cloud_ops is enabled","messagePattern":"cloud_ops\\.supported_clouds must not be empty when cloud_ops is enabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/schema.rs","lineNumber":18573,"sourceCode":"            default_cloud: default_cloud_ops_cloud(),\n            supported_clouds: default_cloud_ops_supported_clouds(),\n            iac_tools: default_cloud_ops_iac_tools(),\n            cost_threshold_monthly_usd: default_cloud_ops_cost_threshold(),\n            well_architected_frameworks: default_cloud_ops_waf(),\n        }\n    }\n}\n\nimpl CloudOpsConfig {\n    pub fn validate(&self) -> Result<()> {\n        if self.enabled {\n            if self.default_cloud.trim().is_empty() {\n                anyhow::bail!(\n                    \"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                );","sourceCodeStart":18555,"sourceCodeEnd":18591,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/schema.rs#L18555-L18591","documentation":"When `cloud_ops` is enabled, `supported_clouds` must contain at least one entry. The default is `[\"aws\", \"azure\", \"gcp\"]`, so this error occurs only when the operator explicitly overrode the list with an empty array while keeping the feature on — an enabled module with zero supported clouds has no valid target, not even for `default_cloud`.","triggerScenarios":"`enabled = true` with `supported_clouds = []`; a templated list whose loop renders zero items; deleting the list contents while narrowing cloud support and leaving the empty key.","commonSituations":"Intent to support a single cloud expressed by emptying the list first; env-driven list generation that yields nothing when the variable is missing; refactors that move entries to a new key and leave the old one empty.","solutions":["List the clouds you actually use, e.g. `supported_clouds = [\"gcp\"]`.","Ensure `default_cloud` is a member of the list (checked separately).","Remove the key entirely to restore the aws/azure/gcp default."],"exampleFix":"# before\n[cloud_ops]\nenabled = true\nsupported_clouds = []\n\n# after\n[cloud_ops]\nenabled = true\nsupported_clouds = [\"gcp\"]\ndefault_cloud = \"gcp\"","handlingStrategy":"validation","validationCode":"anyhow::ensure!(\n    !cloud_ops.enabled || !cloud_ops.supported_clouds.is_empty(),\n    \"cloud_ops.supported_clouds required when enabled\"\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["To narrow to one cloud, replace the list contents — never empty it while enabled.","Omit the key to inherit aws/azure/gcp.","Test rendered templates with an assertion that the list is non-empty."],"tags":["cloud-ops","config","required-field","zeroclaw"],"backgroundTag":"missing-required-config-field","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}