{"record":{"id":"b530846e92d378ef","repo":"zeroclaw-labs/zeroclaw","slug":"config-section-path-is-malformed-and-was-rese","errorCode":null,"errorMessage":"config section `{$path}` is malformed and was reset to defaults; values in that section are NOT in effect. Run `zeroclaw config migrate` to see the parse error, then repair the file.","messagePattern":"config section `(.+?)` is malformed and was reset to defaults; values in that section are NOT in effect\\. Run `zeroclaw config migrate` to see the parse error, then repair the file\\.","errorType":"console","errorClass":"DiagItem","httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-runtime/src/doctor/mod.rs","lineNumber":1101,"sourceCode":"\n/// Surface config sections the resilient loader dropped at load time\n/// (`Config::degraded_sections` / `Config::degraded_security`, populated by\n/// `migrate_to_current_salvaged` in `zeroclaw-config`) so `doctor` names the\n/// actual malformed section instead of downstream checks reporting confusing\n/// secondary symptoms (e.g. \"no channels configured\").\nfn check_degraded_sections(config: &Config, items: &mut Vec<DiagItem>) {\n    let cat = \"config\";\n    for path in &config.degraded_security {\n        items.push(DiagItem::error(\n            cat,\n            crate::i18n::get_required_cli_string_with_args(\n                \"cli-doctor-degraded-security\",\n                &[(\"path\", path.as_str())],\n            ),\n        ));\n    }\n    for path in &config.degraded_sections {\n        items.push(DiagItem::warn(\n            cat,\n            crate::i18n::get_required_cli_string_with_args(\n                \"cli-doctor-degraded-section\",\n                &[(\"path\", path.as_str())],\n            ),\n        ));\n    }\n}\n\nfn check_config_semantics(config: &Config, items: &mut Vec<DiagItem>) {\n    let cat = \"config\";\n\n    // Config file exists\n    if config.config_path.exists() {\n        items.push(DiagItem::ok(\n            cat,\n            format!(\"config file: {}\", config.config_path.display().to_string()),\n        ));","sourceCodeStart":1083,"sourceCodeEnd":1119,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/doctor/mod.rs#L1083-L1119","documentation":"The resilient config loader replaces sections that fail to parse with defaults and records their paths in `degraded_sections`. Doctor surfaces each path as this warning: the values currently in effect for that section are NOT your file's values — they are silent defaults. (Security sections degrade to an error; this warning covers the rest.)","triggerScenarios":"A config section fails deserialization at load (wrong types, unknown keys, malformed TOML) and the loader proceeds anyway; `zeroclaw doctor` -> check_degraded_sections lists the section path.","commonSituations":"Upgrades that change a section's shape while the old file remains; partially edited TOML; sections copied from older docs; the runtime behaving 'as if' config changes had no effect.","solutions":["Run `zeroclaw config migrate` to see the exact parse error for the section","Repair or remove the malformed keys in that section","Re-run `zeroclaw doctor` until no degraded sections are reported"],"exampleFix":"# before: typo makes the whole section fail to parse -> reset to defaults\n[channel.telegram]\ntoken = \"...\"\n\n# after: correct section name so your values take effect\n[channels.telegram]\ntoken = \"...\"","handlingStrategy":"validation","validationCode":"if zeroclaw doctor | grep -q 'malformed and was reset to defaults'; then\n  echo 'a config section is degraded; run zeroclaw config migrate and repair'\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat any degraded-section warning as 'your edits are not in effect' and repair immediately","Run `zeroclaw config migrate` after every upgrade to surface parse errors","Avoid hand-crafting section names; copy them from current docs"],"tags":["zeroclaw","config","doctor","resilient-loader","defaults"],"backgroundTag":"malformed-config-section","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}