{"record":{"id":"23448c797f098c64","repo":"zeroclaw-labs/zeroclaw","slug":"twitch-channel-requires-the-channel-twitch-featu","errorCode":null,"errorMessage":"Twitch channel requires the `channel-twitch` feature","messagePattern":"Twitch channel requires the `channel-twitch` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9535,"sourceCode":"                .context(\"Twitch 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(\"twitch\", &alias))\n            };\n            Ok(Arc::new(TwitchChannel::new(\n                tw_cfg.bot_username.clone(),\n                tw_cfg.oauth_token.clone(),\n                tw_cfg.channels.clone(),\n                tw_cfg.mention_only,\n                alias,\n                peer_resolver,\n            )))\n        }\n        #[cfg(not(feature = \"channel-twitch\"))]\n        \"twitch\" => {\n            anyhow::bail!(\"Twitch channel requires the `channel-twitch` feature\");\n        }\n        #[cfg(feature = \"channel-twitter\")]\n        \"twitter\" => {\n            let tw = config\n                .channels\n                .twitter\n                .get(\"default\")\n                .context(\"X/Twitter 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(\"twitter\", &alias))\n            };\n            Ok(Arc::new(TwitterChannel::new(\n                tw.bearer_token.clone(),\n                alias,\n                peer_resolver,","sourceCodeStart":9517,"sourceCodeEnd":9553,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9517-L9553","documentation":"Raised by build_channel_by_id when channel_id = \"twitch\" is requested but the binary lacks the `channel-twitch` feature. In Cargo.toml, channel-twitch = [\"channel-irc\"] because the Twitch channel reuses the IRC transport, so enabling it also compiles the IRC channel; the reverse is not true — channel-irc alone leaves this bail in place.","triggerScenarios":"start_channels / build_channel_by_id selecting \"twitch\" from an [channels.twitch] block in a build without --features channel-twitch (a build with only channel-irc is not sufficient).","commonSituations":"Default-feature builds; operators who enabled channel-irc for IRC and assumed Twitch came with it; channels-full builds work, minimal builds with manual feature lists often forget twitch.","solutions":["Rebuild with cargo build --release --features channel-twitch (implicitly enables channel-irc too)","Or use --features channels-full","Or remove [channels.twitch] and \"twitch\" bindings","Verify with zeroclaw_channels::listing::is_channel_type_compiled(\"twitch\")"],"exampleFix":"# before\n cargo build --release --features channel-irc   # irc compiled, twitch not\n\n # after\n cargo build --release --features channel-twitch","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"twitch\") {\n    eprintln!(\"rebuild with --features channel-twitch (channel-irc alone is not enough)\");\n}","typeGuard":"fn twitch_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"twitch\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"twitch\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-twitch` feature\") => {\n        // skip; rebuild with channel-twitch\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Enable channel-twitch directly instead of relying on channel-irc; the dependency only flows one way","Keep a feature-to-channel mapping table in deploy docs to avoid guessing shared gates"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","twitch"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}