libnyanpasu/clash-nyanpasu · warning
field ` ` is not a sequence, skipped
Error message
field `{field}` is not a sequence, skipped What it means
This warning is emitted by splice_sequence when an overlay step tries to prepend/append items to a field, but the field exists in the config yet is not an array. The executor is 'never-fail': instead of erroring or panicking, it logs a warning and returns the config unchanged for that step.
Solutions
- Verify the target field in the base config is an actual array (e.g. a YAML list, not a string or mapping)
- Fix the dotted path in the splice step to point at the correct sequence field
- Convert the field to an array in the source profile
- Inspect the emitted StepLogEntry logs to identify which step failed and correct that step's field
Example fix
// before (field holds a string) rules: "MATCH,DIRECT" // after rules: - MATCH,DIRECT
Defensive patterns
Strategy: validation
Validate before calling
if let Some(field) = config.get_path("rules") {
if !matches!(field, ConfigValue::Array(_)) {
eprintln!("splice target `rules` is not a sequence; fix the profile before applying overlay");
}
} Type guard
fn is_sequence(v: &ConfigValue) -> bool { matches!(v, ConfigValue::Array(_)) } Prevention
- Always define list fields (rules, proxies, proxy-groups) as YAML/JSON arrays
- Validate the base profile shape before running overlay steps
- Check StepLogEntry warnings after apply_overlay to catch skipped splices early
When it happens
Trigger: Calling apply_overlay with a splice (prepend/append) step whose dotted field path resolves to an object, string, or number rather than an array.
Common situations: Config mistakes where a user defines `rules` or `proxies` as a string or mapping instead of a YAML/JSON list; schema migrations changing a field's shape; typos pointing at a scalar field.
Related errors
- field ` ` not found, skipped
- filter `expr` failed, item kept
- filter expr failed, item removed
- filter `when` failed, treated as false
- invalid remove entry, skipped
AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08).
Data as JSON: /api/errors/b55a333847d31bb0.
Report an issue: GitHub.
Appendix: source
Thrown at backend/nyanpasu-config/src/runtime/executor/overlay.rs:73
value: &ConfigValue,
prepend: bool,
logs: &mut Vec<StepLogEntry>,
) -> ConfigValue {
let Some(to_merge) = value.as_array_arc() else {
logs.push(StepLogEntry::warn(format!(
"merge value for `{field}` is not a sequence, skipped"
)));
return config;
};
let segments = parse_dotted_path(field);
let Some(target) = get_at(&config, &segments) else {
logs.push(StepLogEntry::warn(format!(
"field `{field}` not found, skipped"
)));
return config;
};
let Some(existing) = target.as_array_arc() else {
logs.push(StepLogEntry::warn(format!(
"field `{field}` is not a sequence, skipped"
)));
return config;
};
let items: Vec<ConfigValue> = if prepend {
to_merge
.iter()
.cloned()
.chain(existing.iter().cloned())
.collect()
} else {
existing
.iter()
.cloned()
.chain(to_merge.iter().cloned())
.collect()
};View on GitHub (pinned to f7dbce2997)