{"record":{"id":"f047c8b4ec912926","repo":"zeroclaw-labs/zeroclaw","slug":"email-channel-requires-the-channel-email-feature","errorCode":null,"errorMessage":"Email channel requires the `channel-email` feature","messagePattern":"Email channel requires the `channel-email` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9454,"sourceCode":"                .channels\n                .email\n                .get(\"default\")\n                .context(\"Email 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(\"email\", &alias))\n            };\n            Ok(Arc::new(EmailChannel::new(\n                em.clone(),\n                alias,\n                peer_resolver,\n            )))\n        }\n        #[cfg(not(feature = \"channel-email\"))]\n        \"email\" => {\n            anyhow::bail!(\"Email channel requires the `channel-email` feature\");\n        }\n        #[cfg(feature = \"channel-email\")]\n        \"gmail_push\" | \"gmail-push\" => {\n            let gp = config\n                .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,","sourceCodeStart":9436,"sourceCodeEnd":9472,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9436-L9472","documentation":"Raised by build_channel_by_id when channel_id = \"email\" is requested and the binary was compiled without the `channel-email` feature. Unlike most channels here, channel-email is part of `default-channels` (and therefore of the default build), so hitting this bail almost always means the binary was built with --no-default-features or an explicitly reduced feature list. The feature pulls async-imap, lettre, and mail-parser.","triggerScenarios":"start_channels / build_channel_by_id selecting \"email\" from an [channels.email] block while the crate was compiled with --no-default-features (or default-features = false without re-adding channel-email).","commonSituations":"Minimal/embedded builds that disable default features to cut dependencies; feature lists authored for a la carte setup that forgot email; CI matrix builds testing reduced feature sets then deployed with a full config.","solutions":["Rebuild without --no-default-features, or re-add the feature: cargo build --release --features channel-email","Audit any default-features = false in your Cargo.toml override for the zeroclaw binary","Or remove [channels.email] and \"email\" bindings from config","Pre-check zeroclaw_channels::listing::is_channel_type_compiled(\"email\")"],"exampleFix":"# before\n cargo build --release --no-default-features --features channel-telegram\n\n # after\n cargo build --release --no-default-features --features \"channel-telegram,channel-email\"","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"email\") {\n    // email is a DEFAULT channel; being missing implies --no-default-features\n    eprintln!(\"binary built without default features; rebuild with --features channel-email\");\n}","typeGuard":"fn email_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"email\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"email\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-email` feature\") => {\n        // unusual: default build has email; audit feature flags in the build\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["If you must build with --no-default-features, generate the feature list from the channels your config actually uses","Treat 'email missing' as a build regression: it indicates default features were silently dropped"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","email","imap"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}