{"record":{"id":"e0ec77e276310fb3","repo":"zeroclaw-labs/zeroclaw","slug":"git-channel-requires-the-channel-git-feature","errorCode":null,"errorMessage":"Git channel requires the `channel-git` feature","messagePattern":"Git channel requires the `channel-git` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9577,"sourceCode":"        }\n        #[cfg(feature = \"channel-git\")]\n        \"git\" => {\n            let g = config\n                .channels\n                .git\n                .get(\"default\")\n                .context(\"Git 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(\"git\", &alias))\n            };\n            Ok(Arc::new(GitChannel::new(g.clone(), alias, peer_resolver)?))\n        }\n        #[cfg(not(feature = \"channel-git\"))]\n        \"git\" => {\n            anyhow::bail!(\"Git channel requires the `channel-git` feature\");\n        }\n        #[cfg(feature = \"channel-mochat\")]\n        \"mochat\" => {\n            let mc = config\n                .channels\n                .mochat\n                .get(\"default\")\n                .context(\"Mochat 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(\"mochat\", &alias))\n            };\n            Ok(Arc::new(MochatChannel::new(\n                mc.api_url.clone(),\n                mc.api_token.clone(),\n                alias,","sourceCodeStart":9559,"sourceCodeEnd":9595,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9559-L9595","documentation":"Raised by build_channel_by_id when channel_id = \"git\" is requested but the binary lacks the `channel-git` feature. In Cargo.toml channel-git = [\"provider-github\", \"provider-gitea\"]: the feature bundles forge providers (GitHub App auth via jsonwebtoken, Gitea/Forgejo PAT). The enabled arm constructs GitChannel::new(g, alias, peer_resolver) from [channels.git].","triggerScenarios":"start_channels / build_channel_by_id selecting \"git\" from an [channels.git] block or agent binding in a build without --features channel-git.","commonSituations":"Default-feature builds (git is in channels-full only); self-hosted Gitea/Forgejo setups compiled from a minimal feature list; operators enabling provider-github alone and expecting the channel — provider features are sub-features of channel-git, not substitutes.","solutions":["Rebuild with cargo build --release --features channel-git (brings provider-github and provider-gitea)","Or use --features channels-full","Or remove [channels.git] and \"git\" bindings","Verify with zeroclaw_channels::listing::is_channel_type_compiled(\"git\")"],"exampleFix":"# before\n cargo build --release --features provider-github   # provider alone is not the channel\n\n # after\n cargo build --release --features channel-git","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"git\") {\n    eprintln!(\"rebuild with --features channel-git (bundles provider-github + provider-gitea)\");\n}","typeGuard":"fn git_channel_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"git\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"git\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-git` feature\") => {\n        // skip; rebuild with channel-git, not provider-github alone\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Enable channel-git rather than individual provider features; providers are sub-features and do not compile the channel","GitHub App auth also needs jsonwebtoken via provider-github — it comes automatically with channel-git"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","git","github","gitea"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}