Implement remove, move and copy tree mutations #9

Closed
opened 2026-08-09 18:57:01 +00:00 by hugo · 1 comment
Owner

Objective

Implement rm/remove/delete, mv/rename, and cp/copy for entries and directory subtrees.

Scope

  • Support force, recursive deletion, interactive confirmation, trailing-slash directory semantics, and entry/directory ambiguity.
  • Copy or move whole subtrees atomically where feasible and reject unsafe partial overwrites.
  • Selectively reencrypt destination entries when recipient policy changes.
  • Remove empty source directories and generate correct automatic Git commits for additions, removals and renames.

Acceptance criteria

  • Fixture tests cover files, directories, collisions, forced overwrite, recursive requirements, nested .gpg-id boundaries, and cancellation.
  • Copy preserves source data; move removes it only after the destination is durable.
  • Failure leaves no partly moved/copied tree or incomplete Git commit.

Prerequisites

Safe password-store core; embedded GPG-compatible cryptography; recipient policy.

## Objective Implement `rm/remove/delete`, `mv/rename`, and `cp/copy` for entries and directory subtrees. ## Scope - Support force, recursive deletion, interactive confirmation, trailing-slash directory semantics, and entry/directory ambiguity. - Copy or move whole subtrees atomically where feasible and reject unsafe partial overwrites. - Selectively reencrypt destination entries when recipient policy changes. - Remove empty source directories and generate correct automatic Git commits for additions, removals and renames. ## Acceptance criteria - Fixture tests cover files, directories, collisions, forced overwrite, recursive requirements, nested `.gpg-id` boundaries, and cancellation. - Copy preserves source data; move removes it only after the destination is durable. - Failure leaves no partly moved/copied tree or incomplete Git commit. ## Prerequisites Safe password-store core; embedded GPG-compatible cryptography; recipient policy.
hugo added this to the 01 - Full Rust pass CLI parity milestone 2026-08-09 18:57:01 +00:00
hugo added the enhancement label 2026-08-09 18:57:01 +00:00
Author
Owner

Implemented in commit 410007c and pushed to main. Added storage-owned rollback-safe remove, move, and copy transactions for entries and complete directory subtrees, including force/confirmation handling, recursive deletion, trailing-slash and existing-directory destination semantics, ambiguity/type-collision rejection, empty-directory preservation, signed nested .gpg-id boundaries, selective OpenPGP reencryption, destination-first durable moves, compatible commit intents, and rollback of source plus overwritten/new destinations on filesystem or commit failure. Unknown auxiliary files and nested Git repositories are rejected before mutation to prevent partial transfers. Added 10 isolated compatibility-fixture tests covering entry and directory operations, forced collisions, cancellation, recursive requirements, directory destinations, ambiguity, recipient changes, empty subtrees, source preservation/removal, and exact-tree rollback. Verified cargo fmt --all -- --check; RUSTFLAGS="-D warnings" cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace.

Implemented in commit 410007c and pushed to main. Added storage-owned rollback-safe remove, move, and copy transactions for entries and complete directory subtrees, including force/confirmation handling, recursive deletion, trailing-slash and existing-directory destination semantics, ambiguity/type-collision rejection, empty-directory preservation, signed nested .gpg-id boundaries, selective OpenPGP reencryption, destination-first durable moves, compatible commit intents, and rollback of source plus overwritten/new destinations on filesystem or commit failure. Unknown auxiliary files and nested Git repositories are rejected before mutation to prevent partial transfers. Added 10 isolated compatibility-fixture tests covering entry and directory operations, forced collisions, cancellation, recursive requirements, directory destinations, ambiguity, recipient changes, empty subtrees, source preservation/removal, and exact-tree rollback. Verified cargo fmt --all -- --check; RUSTFLAGS="-D warnings" cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace.
hugo closed this issue 2026-08-09 22:59:14 +00:00
Sign in to join this conversation.