{"record":{"id":"fd624b9be06b7a28","repo":"Hmbown/CodeWhale","slug":"invalid-set-telemetry-expected-a-boolean","errorCode":null,"errorMessage":"invalid --set telemetry: expected a boolean","messagePattern":"invalid --set telemetry: expected a boolean","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":1913,"sourceCode":"        let (key, value) = spec\n            .split_once('=')\n            .context(\"invalid --set: expected KEY=VALUE (value omitted)\")?;\n        match key.trim() {\n            \"provider\" => {\n                provider = Some(\n                    parse_provider_identifier(value)\n                        .map_err(|_| anyhow!(\"invalid --set provider (value omitted)\"))?,\n                );\n            }\n            \"model\" | \"default_text_model\" => values.model = Some(value.to_string()),\n            \"verbosity\" => values.verbosity = Some(value.to_string()),\n            \"approval_policy\" => values.approval_policy = Some(value.to_string()),\n            \"sandbox_mode\" => values.sandbox_mode = Some(value.to_string()),\n            \"telemetry\" => {\n                let mut config = ConfigToml::default();\n                config\n                    .set_value(\"telemetry\", value)\n                    .map_err(|_| anyhow!(\"invalid --set telemetry: expected a boolean\"))?;\n                values.telemetry = config.telemetry;\n            }\n            _ => bail!(\n                \"unsupported runtime --set key (value omitted): supported keys are provider, \\\n                 model, default_text_model, verbosity, approval_policy, sandbox_mode and \\\n                 telemetry; use the dedicated option or config set for other keys\"\n            ),\n        }\n        if value.trim().is_empty() {\n            bail!(\"invalid runtime --set: value must not be empty\");\n        }\n    }\n    // A dedicated flag is more specific than a generic --set for the same\n    // field. Repeated --set keys otherwise keep their last value.\n    cli.provider = cli.provider.take().or(provider);\n    cli.model = cli.model.take().or(values.model);\n    cli.verbosity = cli.verbosity.take().or(values.verbosity);\n    cli.approval_policy = cli.approval_policy.take().or(values.approval_policy);","sourceCodeStart":1895,"sourceCodeEnd":1931,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L1895-L1931","documentation":"--set telemetry parsing: the value supplied for the telemetry key is not a parseable boolean; the dispatcher's --set validation rejects it so an unparseable telemetry override never reaches the TUI environment.","triggerScenarios":"Running `codewhale ... --set telemetry=yes`, `--set telemetry=1`, or `--set telemetry=` with anything other than a recognized boolean (e.g. true/false).","commonSituations":"Users familiar with other tools' truthy syntax passing 'yes'/'on'/'1' instead of true/false.","solutions":["Pass an explicit boolean: --set telemetry=true or --set telemetry=false","Check quoting in your shell so '=' reaches the CLI (quote the whole arg if needed)","Edit telemetry directly in the config file if CLI shorthand is problematic"],"exampleFix":"// before\n$ codewhale --set telemetry=yes\n// after\n$ codewhale --set telemetry=true","handlingStrategy":"validation","validationCode":"// only booleans are accepted\ncase \"$val\" in true|false) ;; *) echo \"--set telemetry expects true|false\"; exit 2;; esac","typeGuard":"fn is_bool_str(s: &str) -> bool { matches!(s, \"true\" | \"false\") }","tryCatchPattern":"match cli.run() {\n    Err(e) if e.to_string().contains(\"invalid --set telemetry\") => {\n        eprintln!(\"telemetry must be true or false\");\n    }\n    other => other?,\n}","preventionTips":["Use literal true/false, not yes/no/1/0","Quote the argument: --set \"telemetry=false\" to survive shell splitting","Verify with `codewhale config get telemetry` after setting"],"tags":["cli","boolean","config"],"backgroundTag":"invalid-flag-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}