{"record":{"id":"22f77b49517f5f51","repo":"zeroclaw-labs/zeroclaw","slug":"slack-channel-requires-the-channel-slack-feature","errorCode":null,"errorMessage":"Slack channel requires the `channel-slack` feature","messagePattern":"Slack channel requires the `channel-slack` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9021,"sourceCode":"                SlackChannel::new(\n                    bot_token,\n                    sl.resolved_app_token(),\n                    sl.channel_ids.clone(),\n                    alias,\n                    peer_resolver,\n                )\n                .with_thread_context_max_messages_resolver(thread_context_max_messages_resolver)\n                .with_workspace_dir(workspace_dir)\n                .with_markdown_blocks(sl.use_markdown_blocks)\n                .with_transcription(config.transcription.clone())\n                .with_streaming(sl.stream_drafts, sl.draft_update_interval_ms)\n                .with_cancel_reaction(sl.cancel_reaction.clone())\n                .with_approval_timeout_secs(sl.approval_timeout_secs),\n            ))\n        }\n        #[cfg(not(feature = \"channel-slack\"))]\n        \"slack\" => {\n            anyhow::bail!(\"Slack channel requires the `channel-slack` feature\");\n        }\n        #[cfg(feature = \"channel-mattermost\")]\n        \"mattermost\" => {\n            let mm = config\n                .channels\n                .mattermost\n                .get(\"default\")\n                .context(\"Mattermost 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(\"mattermost\", &alias))\n            };\n            Ok(Arc::new(\n                MattermostChannel::new(\n                    mm.url.clone(),\n                    mm.bot_token.clone(),","sourceCodeStart":9003,"sourceCodeEnd":9039,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9003-L9039","documentation":"Thrown by build_channel_by_id when channel_type is `slack` and the `channel-slack` cargo feature was not compiled in. Like the other channel gates, the Slack arm is behind #[cfg(feature = \"channel-slack\")]; the not-feature arm bails with the feature name. Nothing about runtime config can fix it — the code is absent from the binary.","triggerScenarios":"Config has `[channels.slack.*]` or a delivery target `slack.<alias>` while the binary omits `channel-slack`. Hit during daemon startup channel construction and one-shot sends through build_channel_by_id.","commonSituations":"Slim build variants; feature list trimmed in CI; moving a config between environments whose binaries have different feature sets.","solutions":["Rebuild with `cargo build --features channel-slack`","Select a prebuilt image/package that includes slack","Or remove the slack channel sections from config"],"exampleFix":"# before\ncargo build --no-default-features\n# error: Slack channel requires the `channel-slack` feature\n\n# after\ncargo build --no-default-features --features channel-slack","handlingStrategy":"validation","validationCode":"#[cfg(not(feature = \"channel-slack\"))]\nif !config.channels.slack.is_empty() {\n    log::warn!(\"[channels.slack.*] configured but `channel-slack` feature is off\");\n}","typeGuard":"fn channel_feature_enabled(channel_type: &str) -> bool {\n    match channel_type {\n        \"slack\" => cfg!(feature = \"channel-slack\"),\n        \"telegram\" => cfg!(feature = \"channel-telegram\"),\n        \"discord\" => cfg!(feature = \"channel-discord\"),\n        \"mattermost\" => cfg!(feature = \"channel-mattermost\"),\n        \"signal\" => cfg!(feature = \"channel-signal\"),\n        \"matrix\" => cfg!(feature = \"channel-matrix\"),\n        \"whatsapp\" | \"whatsapp-web\" => cfg!(feature = \"whatsapp-web\"),\n        _ => false,\n    }\n}","tryCatchPattern":"Err(err) if err.to_string().contains(\"requires the `channel-slack` feature\") => {\n    // rebuild with --features channel-slack or remove slack sections from config\n}","preventionTips":["Make the build feature list explicit in one place and drive it from required channels","Fail fast at startup with a clear log line when configured channels lack features","Keep test/staging builds feature-identical to production"],"tags":["feature-flag","slack","build-configuration","zeroclaw"],"backgroundTag":"missing-compile-time-feature","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}