libnyanpasu/clash-nyanpasu · warning
remove path `{dotted}` not found, skipped
Error message
remove path `{dotted}` not found, skipped What it means
Soft-failure path in remove_from_item: a remove rule with a string dotted path was applied to a mapping item, parse_dotted_path/remove_at walked the path, but the target key was not found. The item is kept unchanged and a StepLogEntry::warn is recorded instead of erroring — matching legacy parity where removing a non-existent path is a no-op warning, not a failure of the overlay step.
Source
Thrown at backend/nyanpasu-config/src/runtime/executor/overlay.rs:274
let segments = parse_dotted_path(dotted);
match remove_at(¤t, &segments) {
Some(next) => current = next,
None => logs.push(StepLogEntry::warn(format!(
"remove path `{dotted}` not found, skipped"
))),
}View on GitHub (pinned to f7dbce2997)
Solutions
- Check the dotted path spelling and nesting against actual item contents
- Make removal conditional via `when` so it only targets items that have the key
- Treat the warning as benign if the key is expected to be optionally absent
- Use logging output to list skipped paths and correct them
Example fix
// before remove: ["udp-x"] // after remove: ["udp"]
Defensive patterns
Strategy: validation
Validate before calling
if let Some(ConfigValue::Object(item)) = items.first() {
for path in ["udp"] {
if !item.contains_key(path) {
eprintln!("remove path `{path}` absent from items; fix or make conditional");
}
}
} Prevention
- Verify remove paths exist on target items in a sample profile
- Make removals conditional with `when` when keys are optional
- Treat benign 'not found' warnings as intentional optional-key removals and document them
When it happens
Trigger: A `remove: ["a.b.c"]` entry where key `a.b.c` does not exist on the matched item.
Common situations: Typos in removal paths; paths valid in one core/profile version but absent after schema changes; items that vary in shape so some lack the key.
Related errors
- remove path `{dotted}` on non-mapping item, skipped
- remove index on non-sequence item, skipped
- filter expr failed, item removed: {error}
- filter `when` failed, treated as false: {error}
- filter `expr` failed, item kept: {error}
AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08).
Data as JSON: /api/errors/2d3baa3b2ed656b3.
Report an issue: GitHub.