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(&current, &segments) {
                    Some(next) => current = next,
                    None => logs.push(StepLogEntry::warn(format!(
                        "remove path `{dotted}` not found, skipped"
                    ))),
                }

View on GitHub (pinned to f7dbce2997)

Solutions

  1. Check the dotted path spelling and nesting against actual item contents
  2. Make removal conditional via `when` so it only targets items that have the key
  3. Treat the warning as benign if the key is expected to be optionally absent
  4. 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

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


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