{"record":{"id":"b62fa83a314810ca","repo":"gastownhall/beads","slug":"dolt-debug-must-be-true-or-false-got-q","errorCode":null,"errorMessage":"dolt.debug must be \"true\" or \"false\", got %q","messagePattern":"dolt\\.debug must be \"true\" or \"false\", got %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/config/yaml_config.go","lineNumber":896,"sourceCode":"\tswitch key {\n\tcase \"hierarchy.max-depth\":\n\t\t// Must be a positive integer >= 1 (GH#995)\n\t\tdepth, err := strconv.Atoi(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"hierarchy.max-depth must be a positive integer, got %q\", value)\n\t\t}\n\t\tif depth < 1 {\n\t\t\treturn fmt.Errorf(\"hierarchy.max-depth must be at least 1, got %d\", depth)\n\t\t}\n\tcase \"dolt.shared-server\":\n\t\tlower := strings.ToLower(value)\n\t\tif lower != \"true\" && lower != \"false\" {\n\t\t\treturn fmt.Errorf(\"dolt.shared-server must be \\\"true\\\" or \\\"false\\\", got %q\", value)\n\t\t}\n\tcase \"dolt.debug\":\n\t\tlower := strings.ToLower(value)\n\t\tif lower != \"true\" && lower != \"false\" {\n\t\t\treturn fmt.Errorf(\"dolt.debug must be \\\"true\\\" or \\\"false\\\", got %q\", value)\n\t\t}\n\tcase \"dolt.mode\":\n\t\tlower := strings.ToLower(value)\n\t\tif lower != \"server\" && lower != \"embedded\" {\n\t\t\treturn fmt.Errorf(\"dolt.mode must be \\\"server\\\" or \\\"embedded\\\", got %q\", value)\n\t\t}\n\tcase \"prime.max-memories\":\n\t\tn, err := strconv.Atoi(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"prime.max-memories must be a non-negative integer (0 = unlimited), got %q\", value)\n\t\t}\n\t\tif n < 0 {\n\t\t\treturn fmt.Errorf(\"prime.max-memories must be a non-negative integer (0 = unlimited), got %q\", value)\n\t\t}\n\tcase \"prime.max-memory-chars\":\n\t\tn, err := strconv.Atoi(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"prime.max-memory-chars must be a non-negative integer (0 = unlimited), got %q\", value)","sourceCodeStart":878,"sourceCodeEnd":914,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/config/yaml_config.go#L878-L914","documentation":"validateYamlConfigValue rejects a dolt.debug value that is not \"true\" or \"false\" (case-insensitive). The %q shows the rejected string. bd throws it because the debug flag is consumed as a strict boolean elsewhere in the Dolt driver setup.","triggerScenarios":"SetYamlConfig / SetYamlConfigInDir / SetUserYamlConfig with key \"dolt.debug\" and values like \"1\", \"yes\", \"on\", \"debug\", or a value with stray whitespace/quotes.","commonSituations":"Enabling Dolt debug logging with 'bd config set dolt.debug 1'; YAML habit of writing yes/no; environment-injected values that aren't normalized.","solutions":["Use bd config set dolt.debug true (or false)","Convert 1/0 and yes/no to true/false in any automation before setting","Trim whitespace and quotes from values sourced from env vars or flags","Verify the stored value with bd config get dolt.debug after setting"],"exampleFix":"// before\nSetYamlConfig(\"dolt.debug\", \"1\") // error\n// after\nSetYamlConfig(\"dolt.debug\", \"true\")","handlingStrategy":"validation","validationCode":"l := strings.ToLower(strings.TrimSpace(v))\nif l != \"true\" && l != \"false\" {\n    return fmt.Errorf(\"dolt.debug must be true or false, got %q\", v)\n}","typeGuard":"func isBoolString(s string) bool {\n    switch strings.ToLower(strings.TrimSpace(s)) {\n    case \"true\", \"false\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"if err := SetYamlConfig(\"dolt.debug\", v); err != nil {\n    if strings.Contains(err.Error(), \"dolt.debug must be\") {\n        // coerce to a strict boolean string, then retry\n    }\n    return err\n}","preventionTips":["Set debug toggles strictly with the strings \"true\" or \"false\"","Sanitize env-derived values (trim, lowercase) before config writes","Read back with bd config get dolt.debug to confirm stored format"],"tags":["config","validation","boolean","go"],"backgroundTag":"config-value-validation-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}