Implement the safe password-store repository core #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Implement the safe password-store repository and entry model in
crates/storage.Scope
.gpgfiles without introducing a new on-disk format..gpg-id,.gpg-id.sig, and the innermost applicable Git repository.Acceptance criteria
crates/storage.Prerequisites
Compatibility fixture harness.
Implemented in commit
8e4c939(pushed to main).Added the storage-owned, capability-scoped password-store repository core. Logical entries map directly to upstream .gpg paths with no new format. Deterministic discovery covers directories, encrypted entries, .gpg-id/.gpg-id.sig policies, auxiliary regular files, and innermost nested .git boundaries. Typed validation rejects absolute/traversal paths, entry/directory ambiguity, symlinks, special file types, invalid Git boundaries, and mutation collisions.
Encrypted writes use same-directory capability temporary files, private Unix permissions, file sync, atomic replacement, and directory sync. Pre-rename failures retain the old entry and roll back newly created empty directories; post-rename interruption reports durability uncertainty while retaining a complete new entry. Empty ancestor cleanup stops at content, policy, or root boundaries. SecretBytes owns decrypted bytes, redacts Debug, and zeroes memory on drop.
Related verification:
All unrelated and compatibility fixture tests remained green.