{"record":{"id":"9fa41f0d82c8f35b","repo":"zeroclaw-labs/zeroclaw","slug":"lark-channel-requires-the-channel-lark-feature","errorCode":null,"errorMessage":"Lark channel requires the `channel-lark` feature","messagePattern":"Lark channel requires the `channel-lark` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9214,"sourceCode":"                    let alias = alias.clone();\n                    Arc::new(move || cfg_arc.read().channel_external_peers(\"lark\", &alias))\n                };\n                Ok(Arc::new(\n                    LarkChannel::from_config(lk, alias, peer_resolver)\n                        .with_workspace_dir(one_shot_channel_workspace_dir(\n                            &config, \"lark\", \"default\",\n                        ))\n                        .with_approval_timeout_secs(lk.approval_timeout_secs)\n                        .with_per_user_session(lk.per_user_session)\n                        .with_ack_reactions(\n                            lk.ack_reactions.unwrap_or(config.channels.ack_reactions),\n                        )\n                        .with_streaming(lk.stream_mode, lk.draft_update_interval_ms),\n                ))\n            }\n            #[cfg(not(feature = \"channel-lark\"))]\n            {\n                anyhow::bail!(\"Lark channel requires the `channel-lark` feature\");\n            }\n        }\n        #[cfg(feature = \"channel-dingtalk\")]\n        \"dingtalk\" => {\n            let dt = config\n                .channels\n                .dingtalk\n                .get(\"default\")\n                .context(\"DingTalk 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(\"dingtalk\", &alias))\n            };\n            Ok(Arc::new(\n                DingTalkChannel::new(\n                    dt.client_id.clone(),","sourceCodeStart":9196,"sourceCodeEnd":9232,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9196-L9232","documentation":"Raised by build_channel_by_id when the config selects the Lark channel but the binary was compiled without the `channel-lark` Cargo feature. The Lark arm is written as an inner cfg block inside `\"lark\" =>`, so without the feature the whole arm body reduces to the bail. `channel-lark` also pulls the optional `prost` dependency, so enabling it changes the dependency graph, not just a cfg flag.","triggerScenarios":"start_channels / build_channel_by_id resolving channel_id = \"lark\" (from [channels.lark] or an agent channel binding) in a build without `--features channel-lark`. Config parsing and validation succeed; construction of LarkChannel (lark.rs, LineChannel-style from_config path) is never compiled in.","commonSituations":"Default-feature builds (Lark is only in `channels-full`, not `default-channels`), stale prebuilt binaries from before Lark support, or enabling Lark in config on a host where the daemon was built from a minimal feature set to cut compile time.","solutions":["Rebuild with the feature: cargo build --release --features channel-lark (or add it to the feature list of the binary crate you run)","Or use --features channels-full, which includes channel-lark","Or drop the [channels.lark] section and any \"lark\" bindings from config","Check compilation status first via zeroclaw_channels::listing::is_channel_type_compiled(\"lark\")"],"exampleFix":"# before\n cargo build --release            # no channel-lark\n\n # after\n cargo build --release --features channel-lark   # pulls dep:prost","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"lark\") {\n    eprintln!(\"rebuild with --features channel-lark (pulls prost) or remove [channels.lark]\");\n}","typeGuard":"fn lark_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"lark\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"lark\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-lark` feature\") => {\n        // degrad: disable lark bindings and continue with other channels\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Treat the channel feature list as part of the deployable artifact; assert it against configured channels in CI","Remember channel-lark adds the prost dependency — enable it in the same build profile used in production"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","lark"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}