//! Invariant: the list tool must reject the `root` parameter.
//!
//! The `root` override was removed because it allowed an AI agent to enumerate
//! arbitrary directories on the host.  Any client still sending `root` must
//! receive a validation error rather than silently ignoring the field.

#[test]
fn rejects_root_override_in_list_params() {
    let bad = serde_json::json!({
        "root": "/etc"
    });

    let result = serde_json::from_value::<envseal_mcp::tools::list::ListParams>(bad);
    assert!(
        result.is_err(),
        "Fix: list params must deny 'root' to prevent arbitrary directory enumeration via MCP"
    );
}
