{"record":{"id":"04afa45f806513c3","repo":"zeroclaw-labs/zeroclaw","slug":"linq-channel-requires-the-channel-linq-feature","errorCode":null,"errorMessage":"Linq channel requires the `channel-linq` feature","messagePattern":"Linq channel requires the `channel-linq` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9431,"sourceCode":"                .channels\n                .linq\n                .get(alias)\n                .with_context(|| format!(\"Linq alias '{alias}' not configured\"))?;\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {\n                let cfg_arc = config_arc.clone();\n                let alias = alias.to_string();\n                Arc::new(move || cfg_arc.read().channel_external_peers(\"linq\", &alias))\n            };\n            Ok(Arc::new(LinqChannel::new(\n                lq.api_token.clone(),\n                lq.from_phone.clone(),\n                alias.to_string(),\n                peer_resolver,\n            )))\n        }\n        #[cfg(not(feature = \"channel-linq\"))]\n        x if x.starts_with(\"linq\") => {\n            anyhow::bail!(\"Linq channel requires the `channel-linq` feature\");\n        }\n        #[cfg(feature = \"channel-email\")]\n        \"email\" => {\n            let em = config\n                .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,","sourceCodeStart":9413,"sourceCodeEnd":9449,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9413-L9449","documentation":"Raised by build_channel_by_id when the channel id starts with \"linq\" (guard `x if x.starts_with(\"linq\")`) and the binary lacks the `channel-linq` feature. Unlike the literal-match arms, Linq uses a prefix guard so aliased instances such as \"linq.default\" or \"linq.plant\" also hit this bail; the enabled arm constructs the channel with alias.to_string() and a peer_resolver.","triggerScenarios":"start_channels / build_channel_by_id with any channel_id whose first four characters are \"linq\" — \"linq\" itself or dotted aliases — in a build without --features channel-linq.","commonSituations":"Default-feature builds (linq is in channels-full only); multi-site Linq configs using [channels.linq.<site>] aliases on a binary compiled without the feature; typos that happen to start with \"linq\" also land here rather than in unknown-channel, which can mask the typo.","solutions":["Rebuild with cargo build --release --features channel-linq","Or use --features channels-full","Or remove the [channels.linq] table and all bindings whose channel id starts with \"linq\"","If the id was a typo (e.g. \"linqs\"), correct the binding — the prefix guard will otherwise keep reporting a missing feature"],"exampleFix":"# before\n cargo build --release\n # binding: channels = [\"linq.default\"]\n\n # after\n cargo build --release --features channel-linq","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nfor id in &bindings {\n    if id.starts_with(\"linq\") && !is_channel_type_compiled(\"linq\") {\n        eprintln!(\"binding {id} needs --features channel-linq (or fix the typo)\");\n    }\n}","typeGuard":"fn is_linq_id(id: &str) -> bool {\n    id.starts_with(\"linq\")\n}\n\nfn linq_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"linq\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"linq.default\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-linq` feature\") => {\n        // prefix guard matched: id starts with \"linq\"; skip and hint rebuild\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Watch for typos: any id starting with \"linq\" lands in the Linq arm, so \"linqs\" reports a missing feature instead of unknown channel","Validate binding ids against the compiled listing before startup"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","linq"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}