libnyanpasu/clash-nyanpasu · warning

working config `proxies` is not a sequence, append skipped

Error message

working config `proxies` is not a sequence, append skipped

What it means

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.

Solutions

  1. Fix the base/working profile so `proxies` is a list (or remove the key so it is created fresh)
  2. Re-derive the working config from a known-good base profile
  3. Add schema validation of the working config before composition
  4. Check earlier merge/enhance steps for rules that overwrite `proxies` with a non-list

Example fix

# before (working config)
proxies:
  enabled: true
# after
proxies: []
Defensive patterns

Strategy: validation

Validate before calling

fn working_proxies_ok(working: &ConfigValue) -> bool {
    obj_get(working, "proxies").map_or(true, |v| v.as_array_arc().is_some())
}

Type guard

fn is_array_field(config: &ConfigValue, key: &str) -> bool {
    obj_get(config, key).map_or(true, |v| v.as_array_arc().is_some())
}

Try / catch

if !working_proxies_ok(&working) {
    log::warn!("working proxies corrupted; resetting to [] before compose");
    let working = obj_insert(working, "proxies", ConfigValue::Array(Arc::from(vec![])));
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08). Data as JSON: /api/errors/158d110daeeb355e. Report an issue: GitHub.

Appendix: source

Thrown at backend/nyanpasu-config/src/runtime/executor/compose.rs:153

            }
        },
        None => {
            logs.push(StepLogEntry::warn(format!(
                "member {member_id} has no `proxies`, contributed nothing"
            )));
            Vec::new()
        }
    };

    match obj_get(working, "proxies") {
        Some(value) => match value.as_array_arc() {
            Some(items) => {
                let mut next = items.to_vec();
                next.extend(extracted);
                obj_insert(working, "proxies", ConfigValue::Array(Arc::from(next)))
            }
            None => {
                logs.push(StepLogEntry::warn(
                    "working config `proxies` is not a sequence, append skipped",
                ));
                working.clone()
            }
        },
        None => obj_insert(working, "proxies", ConfigValue::Array(Arc::from(extracted))),
    }
}

View on GitHub (pinned to f7dbce2997)