{"record":{"id":"158d110daeeb355e","repo":"libnyanpasu/clash-nyanpasu","slug":"working-config-proxies-is-not-a-sequence-append","errorCode":null,"errorMessage":"working config `proxies` is not a sequence, append skipped","messagePattern":"working config `proxies` is not a sequence, append skipped","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"backend/nyanpasu-config/src/runtime/executor/compose.rs","lineNumber":153,"sourceCode":"            }\n        },\n        None => {\n            logs.push(StepLogEntry::warn(format!(\n                \"member {member_id} has no `proxies`, contributed nothing\"\n            )));\n            Vec::new()\n        }\n    };\n\n    match obj_get(working, \"proxies\") {\n        Some(value) => match value.as_array_arc() {\n            Some(items) => {\n                let mut next = items.to_vec();\n                next.extend(extracted);\n                obj_insert(working, \"proxies\", ConfigValue::Array(Arc::from(next)))\n            }\n            None => {\n                logs.push(StepLogEntry::warn(\n                    \"working config `proxies` is not a sequence, append skipped\",\n                ));\n                working.clone()\n            }\n        },\n        None => obj_insert(working, \"proxies\", ConfigValue::Array(Arc::from(extracted))),\n    }\n}\n","sourceCodeStart":135,"sourceCodeEnd":162,"githubUrl":"https://github.com/libnyanpasu/clash-nyanpasu/blob/f7dbce2997c633e484f54788035e770b3ee99773/backend/nyanpasu-config/src/runtime/executor/compose.rs#L135-L162","documentation":"During composition, the extracted proxies must be appended to the working config's `proxies` field, but that field exists and is not a sequence. The append is skipped and the working config is returned unchanged, with a warning logged — extracted member proxies are dropped.","triggerScenarios":"append_proxies: the working config has a `proxies` key but working.as_array_arc() (via the match) fails — `proxies` in the accumulated working document is a non-array value (e.g. an object left over from a bad merge).","commonSituations":"A prior composition/merge step replaced `proxies` with a mapping; a base profile with `proxies` corrupted by manual editing or a bad enhancement/patch; loading a working config from a source emitting a different schema.","solutions":["Fix the base/working profile so `proxies` is a list (or remove the key so it is created fresh)","Re-derive the working config from a known-good base profile","Add schema validation of the working config before composition","Check earlier merge/enhance steps for rules that overwrite `proxies` with a non-list"],"exampleFix":"# before (working config)\nproxies:\n  enabled: true\n# after\nproxies: []","handlingStrategy":"validation","validationCode":"fn working_proxies_ok(working: &ConfigValue) -> bool {\n    obj_get(working, \"proxies\").map_or(true, |v| v.as_array_arc().is_some())\n}","typeGuard":"fn is_array_field(config: &ConfigValue, key: &str) -> bool {\n    obj_get(config, key).map_or(true, |v| v.as_array_arc().is_some())\n}","tryCatchPattern":"if !working_proxies_ok(&working) {\n    log::warn!(\"working proxies corrupted; resetting to [] before compose\");\n    let working = obj_insert(working, \"proxies\", ConfigValue::Array(Arc::from(vec![])));\n}","preventionTips":["Validate the base/working profile `proxies` is a list before composition","Audit merge/enhance steps for anything that could overwrite `proxies` with a non-list","Re-derive working configs from known-good base profiles after schema changes"],"tags":["config","compose","schema","proxies"],"backgroundTag":"config-type-mismatch","analyzedSha":"f7dbce2997c633e484f54788035e770b3ee99773","analyzedAt":"2026-09-08T01:24:59.197Z","contentChangedAt":"2026-09-08T01:24:59.197Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}