{"record":{"id":"f50f19bca430a783","repo":"zeroclaw-labs/zeroclaw","slug":"webhook-channel-requires-the-channel-webhook-fea","errorCode":null,"errorMessage":"Webhook channel requires the `channel-webhook` feature","messagePattern":"Webhook channel requires the `channel-webhook` feature","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":12996,"sourceCode":"                .get(alias)\n                .ok_or_else(not_configured)?;\n            let ch = WebhookChannel::new(\n                alias.to_string(),\n                wh.port,\n                wh.listen_path.clone(),\n                wh.send_url.clone(),\n                wh.send_method.clone(),\n                wh.auth_header.clone(),\n                wh.secret.clone(),\n                wh.max_retries,\n                wh.retry_base_delay_ms,\n                wh.retry_max_delay_ms,\n            );\n            zeroclaw_api::channel::Channel::send(&ch, &make_msg(&safe_output)).await?;\n        }\n        #[cfg(not(feature = \"channel-webhook\"))]\n        \"webhook\" => {\n            anyhow::bail!(\"Webhook channel requires the `channel-webhook` feature\");\n        }\n        \"wecom_ws\" | \"wecom-ws\" => {\n            let _ = config\n                .channels\n                .wecom_ws\n                .get(alias)\n                .ok_or_else(not_configured)?;\n            anyhow::bail!(\"wecom_ws channel is not connected\");\n        }\n        #[cfg(feature = \"channel-email\")]\n        \"email\" => {\n            let em = config\n                .channels\n                .email\n                .get(alias)\n                .ok_or_else(not_configured)?;\n            let peers = config.channel_external_peers(\"email\", alias);\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> =","sourceCodeStart":12978,"sourceCodeEnd":13014,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L12978-L13014","documentation":"deliver_announcement bails when the channel is \"webhook.<alias>\" and the binary lacks the `channel-webhook` cargo feature: the webhook arm is compiled out and the cfg(not(...)) stub reports it. webhook is part of default-channels, so this occurs only on builds that disabled defaults or chose an explicit subset. The webhook arm is also the generic escape hatch for push delivery, so losing it disables a common fallback route.","triggerScenarios":"Calling deliver_announcement with channel = \"webhook.<alias>\" on a build compiled with default-features = false and no channel-webhook; a webhook cron firing on such a binary.","commonSituations":"Minimal downstream builds trimming every optional channel; test builds with only one specific channel feature enabled.","solutions":["Rebuild with cargo build --features zeroclaw-channels/channel-webhook (or restore default-channels)","Use a default build, which already includes webhook","Or retarget the cron to another compiled-in channel"],"exampleFix":"# before\ncargo build --no-default-features --features zeroclaw-channels/channel-telegram\n# cron channel = \"webhook.ops\" -> bail: requires `channel-webhook`\n\n# after\ncargo build --no-default-features --features \"zeroclaw-channels/channel-telegram,zeroclaw-channels/channel-webhook\"","handlingStrategy":"validation","validationCode":"fn webhook_delivery_compiled() -> bool {\n    cfg!(feature = \"channel-webhook\")\n}\n\nfor cron in &config.crons_where(|c| c.channel.starts_with(\"webhook.\")) {\n    if !webhook_delivery_compiled() {\n        anyhow::bail!(\"cron {} targets webhook but channel-webhook is not compiled in\", cron.id);\n    }\n}","typeGuard":null,"tryCatchPattern":"match deliver_announcement(&cfg, \"webhook.ops\", &target, thread, &out).await {\n    Err(e) if e.to_string().contains(\"requires the `channel-webhook` feature\") => {\n        // Build-time defect: disable the cron and alert; no retry path.\n    }\n    rest => rest?,\n}","preventionTips":["Keep channel-webhook enabled in lean builds — it is the generic push fallback","Assert the feature set whenever you build with default-features = false","Validate cron channel prefixes against compiled features in a config-lint step"],"tags":["webhook","cargo-feature","channels","cron-delivery","build-config"],"backgroundTag":"missing-cargo-feature","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}