{"record":{"id":"2525489c81bcb0cb","repo":"zeroclaw-labs/zeroclaw","slug":"runtime-kind-cloudflare-is-not-implemented-yet","errorCode":null,"errorMessage":"runtime.kind='cloudflare' is not implemented yet. Use runtime.kind='native' for now.","messagePattern":"runtime\\.kind='cloudflare' is not implemented yet\\. Use runtime\\.kind='native' for now\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/platform/mod.rs","lineNumber":21,"sourceCode":"\npub use docker::DockerRuntime;\npub use native::NativeRuntime;\npub use zeroclaw_api::runtime_traits::{RuntimeAdapter, ShellDialect, ShellProfile};\n\nuse crate::schema::{RuntimeConfig, RuntimeKind};\n\npub fn create_runtime(config: &RuntimeConfig) -> anyhow::Result<Box<dyn RuntimeAdapter>> {\n    match config.kind {\n        RuntimeKind::Native => {\n            let shell = config.shell.clone().unwrap_or_else(|| \"sh\".into());\n            #[cfg(unix)]\n            validate_shell(&shell)?;\n            #[cfg(windows)]\n            validate_shell_windows(&shell)?;\n            Ok(Box::new(NativeRuntime::with_shell(shell)))\n        }\n        RuntimeKind::Docker => Ok(Box::new(DockerRuntime::new(config.docker.clone()))),\n        RuntimeKind::Cloudflare => anyhow::bail!(\n            \"runtime.kind='cloudflare' is not implemented yet. Use runtime.kind='native' for now.\"\n        ),\n    }\n}\n\n#[cfg(unix)]\nfn validate_shell(shell: &str) -> anyhow::Result<()> {\n    use std::os::unix::fs::PermissionsExt;\n\n    // Android pins the shell to /system/bin/sh; the configured value is never\n    // used, so don't reject it.\n    if zeroclaw_api::platform::is_android() {\n        return Ok(());\n    }\n\n    if shell.trim().is_empty() {\n        anyhow::bail!(\"runtime.shell must not be empty or whitespace\");\n    }","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/platform/mod.rs#L3-L39","documentation":"create_runtime maps RuntimeKind values to adapters; cloudflare is accepted by the config schema but has no runtime adapter yet, so construction bails with an explicit pointer at native. This is a schema-forward stub: parsing succeeds, then runtime creation fails fast.","triggerScenarios":"runtime.kind = \"cloudflare\" in config.toml passed to create_runtime — directly or via a runtime rebuild after config reload (as the factory tests exercise).","commonSituations":"Copying a config from docs or roadmap notes that mention cloudflare support; experimenting with enum values seen in error messages or autocomplete; stale configs from a fork that had a partial implementation.","solutions":["Set runtime.kind = \"native\" (or \"docker\" for containerized execution).","Remove the runtime.kind key to fall back to the default runtime.","Track releases and retry when the cloudflare adapter actually ships."],"exampleFix":"# before\n[runtime]\nkind = \"cloudflare\"\n\n# after\n[runtime]\nkind = \"native\"","handlingStrategy":"type-guard","validationCode":"if !is_implemented_runtime_kind(&cfg.runtime.kind) {\n    return Err(anyhow::anyhow!(\"runtime.kind {:?} has no adapter in this build\", cfg.runtime.kind));\n}","typeGuard":"fn is_implemented_runtime_kind(kind: &str) -> bool {\n    matches!(kind, \"native\" | \"docker\")\n}","tryCatchPattern":"match create_runtime(&config) {\n    Err(e) if e.to_string().contains(\"not implemented yet\") => {\n        // fall back to runtime.kind = \"native\" and warn the user\n    }\n    other => other,\n}","preventionTips":["Validate runtime.kind against the kinds this build supports before creating the runtime.","Treat unimplemented enum variants in configs as load-time errors, not runtime surprises.","Smoke-test configs from external sources in a scratch environment first."],"tags":["runtime","cloudflare","not-implemented","config"],"backgroundTag":"unsupported-runtime-kind","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}