{"record":{"id":"85eac78ebf13c774","repo":"zeroclaw-labs/zeroclaw","slug":"gmail-push-channel-requires-the-channel-email-fe","errorCode":null,"errorMessage":"Gmail Push channel requires the `channel-email` feature","messagePattern":"Gmail Push channel requires the `channel-email` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9477,"sourceCode":"                .channels\n                .gmail_push\n                .get(\"default\")\n                .context(\"Gmail Push 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(\"gmail_push\", &alias))\n            };\n            Ok(Arc::new(GmailPushChannel::new(\n                gp.clone(),\n                alias,\n                peer_resolver,\n            )))\n        }\n        #[cfg(not(feature = \"channel-email\"))]\n        \"gmail_push\" | \"gmail-push\" => {\n            anyhow::bail!(\"Gmail Push channel requires the `channel-email` feature\");\n        }\n        #[cfg(feature = \"channel-irc\")]\n        \"irc\" => {\n            let irc_cfg = config\n                .channels\n                .irc\n                .get(\"default\")\n                .context(\"IRC 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(\"irc\", &alias))\n            };\n            Ok(Arc::new(IrcChannel::new(crate::irc::IrcChannelConfig {\n                server: irc_cfg.server.clone(),\n                port: irc_cfg.port,\n                nickname: irc_cfg.nickname.clone(),","sourceCodeStart":9459,"sourceCodeEnd":9495,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9459-L9495","documentation":"Raised by build_channel_by_id when the channel id is \"gmail_push\" or \"gmail-push\" and the binary lacks the `channel-email` feature. Gmail Push shares the email feature rather than having its own: it is built from config.channels.gmail_push in the channel-email-gated arm. Both spellings are one arm, so either id yields this bail naming `channel-email`, which can surprise operators expecting a gmail-specific feature.","triggerScenarios":"start_channels / build_channel_by_id with channel_id \"gmail_push\" or \"gmail-push\" while compiled without channel-email — e.g. a --no-default-features build, since channel-email is otherwise on by default.","commonSituations":"Same as the email channel: reduced-feature builds. Additionally, operators grep Cargo features for \"gmail\", find none, and get stuck — the fix is the shared channel-email feature; Pub/Sub credential setup in [channels.gmail_push] is irrelevant to this error.","solutions":["Rebuild with --features channel-email (there is no separate gmail feature; email is in default-channels, so dropping --no-default-features also works)","Or remove the [channels.gmail_push] block and \"gmail_push\"/\"gmail-push\" bindings","Pre-check zeroclaw_channels::listing::is_channel_type_compiled(\"gmail_push\")"],"exampleFix":"# before\n cargo build --release --no-default-features\n\n # after\n cargo build --release --no-default-features --features channel-email","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"gmail_push\") {\n    eprintln!(\"gmail_push shares the channel-email feature; rebuild with --features channel-email\");\n}","typeGuard":"fn gmail_push_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"gmail_push\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"gmail-push\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-email` feature\") => {\n        // note: there is no gmail-specific feature; enable channel-email\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Remember gmail_push and email share one feature gate; do not search for a 'channel-gmail' feature","Cover both ids (gmail_push / gmail-push) in config linting"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","gmail","email"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}