{"record":{"id":"e26fd46b02fb2f13","repo":"zeroclaw-labs/zeroclaw","slug":"level-domain-block-requires-at-least-one-domai","errorCode":null,"errorMessage":"--level domain-block requires at least one --domain","messagePattern":"--level domain-block requires at least one --domain","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":6597,"sourceCode":"    tools: Vec<String>,\n) -> Result<security::EstopLevel> {\n    let requested = level.unwrap_or(EstopLevelArg::KillAll);\n    match requested {\n        EstopLevelArg::KillAll => {\n            if !domains.is_empty() || !tools.is_empty() {\n                bail!(\"--domain/--tool are only valid with --level domain-block/tool-freeze\");\n            }\n            Ok(security::EstopLevel::KillAll)\n        }\n        EstopLevelArg::NetworkKill => {\n            if !domains.is_empty() || !tools.is_empty() {\n                bail!(\"--domain/--tool are not valid with --level network-kill\");\n            }\n            Ok(security::EstopLevel::NetworkKill)\n        }\n        EstopLevelArg::DomainBlock => {\n            if domains.is_empty() {\n                bail!(\"--level domain-block requires at least one --domain\");\n            }\n            if !tools.is_empty() {\n                bail!(\"--tool is not valid with --level domain-block\");\n            }\n            Ok(security::EstopLevel::DomainBlock(domains))\n        }\n        EstopLevelArg::ToolFreeze => {\n            if tools.is_empty() {\n                bail!(\"--level tool-freeze requires at least one --tool\");\n            }\n            if !domains.is_empty() {\n                bail!(\"--domain is not valid with --level tool-freeze\");\n            }\n            Ok(security::EstopLevel::ToolFreeze(tools))\n        }\n    }\n}\n","sourceCodeStart":6579,"sourceCodeEnd":6615,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/main.rs#L6579-L6615","documentation":"The domain-block level blocks named network domains, so at least one `--domain` is required; `build_engage_level` bails when the domains list is empty before engaging.","triggerScenarios":"`zeroclaw estop --level domain-block` with no `--domain` flags supplied.","commonSituations":"Typo in the flag name (`--domains`); flags lost behind a `--` separator or unexpanded empty shell variable in scripts; forgetting the selector when switching from kill-all.","solutions":["Add one or more `--domain <host>` values","Check flag spelling and shell expansion: the flag is `--domain` (repeatable) and variables must expand non-empty","Use no `--level` (kill-all default) if a global stop was intended"],"exampleFix":"# before\nzeroclaw estop --level domain-block\n# after\nzeroclaw estop --level domain-block --domain api.example.com","handlingStrategy":"validation","validationCode":"if [ \"$level\" = \"domain-block\" ] && [ \"${#domains[@]}\" -eq 0 ]; then\n  echo \"--level domain-block requires at least one --domain\"; exit 2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build the domains array first and assert it is non-empty before invoking the CLI","Use `set -u` so unset variables abort the script instead of expanding empty"],"tags":["cli","estop","arguments","zeroclaw"],"backgroundTag":"missing-required-flag","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}