{"record":{"id":"8b8f05cd68bf9511","repo":"zeroclaw-labs/zeroclaw","slug":"mattermost-channel-requires-the-channel-mattermos","errorCode":null,"errorMessage":"Mattermost channel requires the `channel-mattermost` feature","messagePattern":"Mattermost channel requires the `channel-mattermost` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9055,"sourceCode":"                MattermostChannel::new(\n                    mm.url.clone(),\n                    mm.bot_token.clone(),\n                    mm.login_id.clone(),\n                    mm.password.clone(),\n                    mm.channel_ids.clone(),\n                    alias,\n                    peer_resolver,\n                    mm.thread_replies.unwrap_or(true),\n                    mm.mention_only.unwrap_or(false),\n                )\n                .with_team_ids(mm.team_ids.clone())\n                .with_discover_dms(mm.discover_dms.unwrap_or(true))\n                .with_listen_mode(mm.listen_mode),\n            ))\n        }\n        #[cfg(not(feature = \"channel-mattermost\"))]\n        \"mattermost\" => {\n            anyhow::bail!(\"Mattermost channel requires the `channel-mattermost` feature\");\n        }\n        #[cfg(feature = \"channel-signal\")]\n        \"signal\" => {\n            let sg = config\n                .channels\n                .signal\n                .get(\"default\")\n                .context(\"Signal 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(\"signal\", &alias))\n            };\n            Ok(Arc::new(\n                SignalChannel::new(\n                    sg.http_url.clone(),\n                    sg.account.clone(),","sourceCodeStart":9037,"sourceCodeEnd":9073,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9037-L9073","documentation":"Thrown by build_channel_by_id when channel_type is `mattermost` and the crate was compiled without the `channel-mattermost` cargo feature. The mattermost construction arm is feature-gated; the fallback arm reports the missing feature. It is purely a compile-time capability gap, independent of any runtime configuration.","triggerScenarios":"A `[channels.mattermost.*]` section or `mattermost.<alias>` send target on a binary built without `channel-mattermost`; reached from daemon startup or the one-shot send path.","commonSituations":"Feature-minimal deployments; upgrade replaced a full-featured binary with a slim one while config kept mattermost channels enabled.","solutions":["Rebuild with `cargo build --features channel-mattermost`","Use a build that bundles mattermost support","Or disable/remove `[channels.mattermost]` sections"],"exampleFix":"# before\ncargo build --no-default-features\n# error: Mattermost channel requires the `channel-mattermost` feature\n\n# after\ncargo build --no-default-features --features channel-mattermost","handlingStrategy":"validation","validationCode":"#[cfg(not(feature = \"channel-mattermost\"))]\nif !config.channels.mattermost.is_empty() {\n    log::warn!(\"[channels.mattermost.*] configured but `channel-mattermost` feature is off\");\n}","typeGuard":"fn channel_feature_enabled(channel_type: &str) -> bool {\n    match channel_type {\n        \"mattermost\" => cfg!(feature = \"channel-mattermost\"),\n        \"telegram\" => cfg!(feature = \"channel-telegram\"),\n        \"discord\" => cfg!(feature = \"channel-discord\"),\n        \"slack\" => cfg!(feature = \"channel-slack\"),\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-mattermost` feature\") => {\n    // rebuild with the feature or drop mattermost from config\n}","preventionTips":["Maintain a single source mapping channel types to cargo features and validate config against it","Alert on startup warnings about featureless configured channels instead of ignoring them","Version-pin build scripts so feature lists do not silently shrink"],"tags":["feature-flag","mattermost","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"}