{"record":{"id":"959dbc008a584680","repo":"zeroclaw-labs/zeroclaw","slug":"git-channel-provider-github-requires-the-provid","errorCode":null,"errorMessage":"git channel provider `github` requires the `provider-github` feature","messagePattern":"git channel provider `github` requires the `provider-github` feature","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/git/channel.rs","lineNumber":95,"sourceCode":"fn warn_on_loose_permissions(_path: &str) {}\n\n/// Build the configured forge provider, or a clear error for an unknown\n/// `provider` value. The only forge-aware seam in the channel.\nfn build_provider(cfg: &GitConfig) -> anyhow::Result<Box<dyn GitProvider>> {\n    match cfg.provider.trim().to_ascii_lowercase().as_str() {\n        \"\" | \"github\" => {\n            #[cfg(feature = \"provider-github\")]\n            {\n                Ok(Box::new(super::providers::github::GithubProvider::new(\n                    cfg.app_id,\n                    resolve_github_private_key(cfg)?,\n                    cfg.installation_id,\n                    cfg.proxy_url.clone(),\n                )))\n            }\n            #[cfg(not(feature = \"provider-github\"))]\n            {\n                anyhow::bail!(\n                    \"git channel provider `github` requires the `provider-github` feature\"\n                );\n            }\n        }\n        provider @ (\"gitea\" | \"forgejo\") => {\n            #[cfg(feature = \"provider-gitea\")]\n            {\n                // Fail closed before any HTTP client exists: every request\n                // attaches `access_token` as a bearer credential, so guessing\n                // a default host would send the token to an endpoint the\n                // operator never named (e.g. a Forgejo PAT to gitea.com).\n                let Some(api_base_url) = cfg\n                    .api_base_url\n                    .as_deref()\n                    .map(str::trim)\n                    .filter(|s| !s.is_empty())\n                else {\n                    anyhow::bail!(","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/git/channel.rs#L77-L113","documentation":"build_provider selected the github provider, but this build of zeroclaw-channels was compiled without the provider-github cargo feature, so the GitHub implementation is cfg'd out. The channel refuses to start at construction instead of failing later with missing functionality.","triggerScenarios":"channels.git.<alias>.provider = \"github\" in config while the zeroclaw-channels crate was built without features = [\"provider-github\"] — e.g. a downstream build using default-features = false or a trimmed distro package.","commonSituations":"Downstream binaries depending on zeroclaw-channels without enabling its provider features; slim container builds that trim cargo features.","solutions":["Enable the feature where you depend on the crate: zeroclaw-channels = { version = \"...\", features = [\"provider-github\"] }","Or use the stock zeroclaw binary, whose feature set already includes the provider","Or switch the channel to a provider that is compiled in (gitea/forgejo need provider-gitea)"],"exampleFix":"# before\nzeroclaw-channels = { version = \"0.7\", default-features = false }\n\n# after\nzeroclaw-channels = { version = \"0.7\", default-features = false, features = [\"provider-github\"] }","handlingStrategy":"validation","validationCode":"// Inside a crate that depends on zeroclaw-channels: make the requirement explicit\n// zeroclaw-channels = { version = \"0.7\", features = [\"provider-github\"] }\n// Then guard config at load time:\nif cfg.provider == \"github\" {\n    // only reachable if the feature was compiled out of a custom build\n    anyhow::bail!(\"rebuild with --features provider-github or change channels.git.<alias>.provider\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When trimming default features, re-enable the provider features your config actually uses","Add a CI check that validates git channel configs against the compiled feature set"],"tags":["git","github","cargo-feature","build-config"],"backgroundTag":"missing-feature-flag","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}