{"record":{"id":"4882a7f5fe1b0035","repo":"zeroclaw-labs/zeroclaw","slug":"dingtalk-channel-requires-the-channel-dingtalk-f","errorCode":null,"errorMessage":"DingTalk channel requires the `channel-dingtalk` feature","messagePattern":"DingTalk channel requires the `channel-dingtalk` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9242,"sourceCode":"            let alias = \"default\".to_string();\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {\n                let cfg_arc = config_arc.clone();\n                let alias = alias.clone();\n                Arc::new(move || cfg_arc.read().channel_external_peers(\"dingtalk\", &alias))\n            };\n            Ok(Arc::new(\n                DingTalkChannel::new(\n                    dt.client_id.clone(),\n                    dt.client_secret.clone(),\n                    alias,\n                    peer_resolver,\n                )\n                .with_proxy_url(dt.proxy_url.clone()),\n            ))\n        }\n        #[cfg(not(feature = \"channel-dingtalk\"))]\n        \"dingtalk\" => {\n            anyhow::bail!(\"DingTalk channel requires the `channel-dingtalk` feature\");\n        }\n        #[cfg(feature = \"channel-wecom\")]\n        \"wecom\" => {\n            let wc = config\n                .channels\n                .wecom\n                .get(\"default\")\n                .context(\"WeCom channel is not configured\")?;\n            let alias = \"default\".to_string();\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {\n                let cfg_arc = config_arc.clone();\n                let alias = alias.clone();\n                Arc::new(move || cfg_arc.read().channel_external_peers(\"wecom\", &alias))\n            };\n            Ok(Arc::new(WeComChannel::new(\n                wc.webhook_key.clone(),\n                alias,\n                peer_resolver,","sourceCodeStart":9224,"sourceCodeEnd":9260,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9224-L9260","documentation":"Raised by build_channel_by_id when channel_id = \"dingtalk\" is requested but the binary lacks the `channel-dingtalk` Cargo feature. The `#[cfg(not(feature = \"channel-dingtalk\"))]` arm keeps the id recognized and names the missing feature, so the operator gets an actionable message instead of UnknownChannelId. DingTalk construction (DingTalkChannel, including .with_proxy_url support seen in the enabled arm) is cfg'd out entirely.","triggerScenarios":"start_channels or build_channel_map hitting the \"dingtalk\" arm while DingTalkChannel was not compiled: an [channels.dingtalk] block or agent binding selects the id, and the factory can only bail.","commonSituations":"Default-feature builds (dingtalk is in channels-full only), deploying a config written against a channels-full build onto a slim binary, or CI builds that pin a minimal feature set while the config drifted to add DingTalk.","solutions":["Rebuild with cargo build --release --features channel-dingtalk","Or switch to --features channels-full","Or remove [channels.dingtalk] and the corresponding agent channel bindings","Verify with zeroclaw_channels::listing::is_channel_type_compiled(\"dingtalk\") before startup"],"exampleFix":"# before\n cargo build --release\n\n # after\n cargo build --release --features channel-dingtalk","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"dingtalk\") {\n    eprintln!(\"rebuild with --features channel-dingtalk or remove [channels.dingtalk]\");\n}","typeGuard":"fn dingtalk_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"dingtalk\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"dingtalk\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-dingtalk` feature\") => {\n        // log rebuild hint; skip channel\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["After editing config to add a channel, run the compiled-channel listing command before restarting the daemon","Keep slim builds and slim configs in the same repo so they change together"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","dingtalk"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}