Skip to content

Metadata record isn't written when trash succeeds but original removal fails #14

Description

@smurftyy

Description

In the compress-before-trash flow, if send2trash succeeds but the subsequent removal
of the original directory fails (permissions, file-in-use, etc.), the error is correctly
raised, caught, and surfaced to the user (item lands in result.failed, printed clearly
in CLI output) — this part already works correctly, no data is lost and nothing is silent.

The actual gap: because the item is in result.failed rather than result.deleted, no
metadata record is written for it. The archive genuinely exists in trash, but devklean history and devklean doctor have no way to know that — from their perspective, nothing
happened.

Proposed fix

This needs a new outcome category on DeleteResult (distinct from success/failure) to
represent "archived successfully, original cleanup failed" — a product/design decision,
not a quick patch, tracked here separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions