Skip to content

Harden deletion logic and cache cleanup safety #12

@c0rychu

Description

@c0rychu

Current removal path is brittle: rm_rf raises if the target is already gone and link calls it on venv.parent without verifying what it will delete. There are no guards to ensure the path is actually a uvlink cache directory or that a symlink points to the expected target. Proposal: make removal idempotent (gracefully skip missing paths), add guardrails (only remove paths under the chosen cache root or matching metadata), and cover these cases with tests so concurrent/manual cleanup cannot trigger unexpected exceptions or deletions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions