Skip to content

[BUG] save_data silently overwrites existing files #539

Description

@Shashankss1205

Severity: P2. Verified live 2026-08-08.

Problem

save_data silently overwrites an existing file with no indication.

save_data(data_handle=<20-row handle>, path="out.csv", format="csv")  -> {"success": true, "rows": 20}
save_data(data_handle=<3-row handle>,  path="out.csv", format="csv")  -> {"success": true, "rows": 3}

The second call replaces the file with no overwritten flag or warning. This is inconsistent with save_model, which refuses to write into a non-empty path.

Proposed fix

Return overwritten: true (or warn), or require an explicit overwrite=true opt-in — matching save_model's refuse-on-non-empty behavior.

(Catalogued as NB-12 in MCP_TEST_FINDINGS.md.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions