Found in the review of #69 (#69 (comment), findings 3 and 4). That PR documents these cases instead of fixing them.
Problem
A command killed while its .tmp- directory exists leaves it for good: a secret or version being added, or the secret, version, unlocker or vault being removed (encrypted keys included). A vault rm killed mid-delete makes the vault vanish from vault list while its files stay in the state directory.
secret vault create stopped at the passphrase prompt leaves a new vault with no unlocker that is already the current vault; secret init stopped there leaves the default vault with no unlocker.
An unlocker add stopped before its metadata is written leaves a directory that unlocker list warns about on every run and unlocker rm cannot remove (overlaps #48 and #72).
Definition of done
Leftover .tmp- entries are deleted by the next command that takes the state-directory lock (while it holds it, no other command can own them), or by an explicit cleanup step that runs on every mutating command; a test kills nothing but plants a leftover and shows it gone after the next command.
vault create and init either leave no vault when stopped before the unlocker exists, or the vault becomes current only once it has one; a test simulates the stop.
A partial unlocker directory can be removed with unlocker rm.
The TODO.md exceptions written by #69 are removed as each is fixed.
Found in the review of https://git.eeqj.de/sneak/secret/pulls/69 (https://git.eeqj.de/sneak/secret/pulls/69#issuecomment-117651, findings 3 and 4). That PR documents these cases instead of fixing them.
## Problem
- A command killed while its `.tmp-` directory exists leaves it for good: a secret or version being added, or the secret, version, unlocker or vault being removed (encrypted keys included). A `vault rm` killed mid-delete makes the vault vanish from `vault list` while its files stay in the state directory.
- `secret vault create` stopped at the passphrase prompt leaves a new vault with no unlocker that is already the current vault; `secret init` stopped there leaves the default vault with no unlocker.
- An unlocker add stopped before its metadata is written leaves a directory that `unlocker list` warns about on every run and `unlocker rm` cannot remove (overlaps https://git.eeqj.de/sneak/secret/issues/48 and https://git.eeqj.de/sneak/secret/issues/72).
## Definition of done
- Leftover `.tmp-` entries are deleted by the next command that takes the state-directory lock (while it holds it, no other command can own them), or by an explicit cleanup step that runs on every mutating command; a test kills nothing but plants a leftover and shows it gone after the next command.
- `vault create` and `init` either leave no vault when stopped before the unlocker exists, or the vault becomes current only once it has one; a test simulates the stop.
- A partial unlocker directory can be removed with `unlocker rm`.
- The `TODO.md` exceptions written by https://git.eeqj.de/sneak/secret/pulls/69 are removed as each is fixed.
## Sequencing
After https://git.eeqj.de/sneak/secret/pulls/69 lands.
Model: opus-5-5
#82 makes secret init and secret vault create ask for the unlocker passphrase before writing anything, so a command stopped at that prompt no longer leaves a vault with no unlocker. What remains of that item here is a command killed after the prompt but before its unlocker is written; TODO.md keeps that as the exception.
Model: opus-5-5
https://git.eeqj.de/sneak/secret/pulls/82 makes `secret init` and `secret vault create` ask for the unlocker passphrase before writing anything, so a command stopped at that prompt no longer leaves a vault with no unlocker. What remains of that item here is a command killed after the prompt but before its unlocker is written; `TODO.md` keeps that as the exception.
Model: opus-5-5
#101 deletes .tmp- leftovers when the next command takes the state directory lock, looking only in the state directory, each vault, each secret and each version. The partial unlocker item needed no code change: #91 already made such a directory removable with unlocker remove; the PR adds a test for it.
Model: opus-5-5
https://git.eeqj.de/sneak/secret/pulls/101 deletes `.tmp-` leftovers when the next command takes the state directory lock, looking only in the state directory, each vault, each secret and each version. The partial unlocker item needed no code change: https://git.eeqj.de/sneak/secret/pulls/91 already made such a directory removable with `unlocker remove`; the PR adds a test for it.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found in the review of #69 (#69 (comment), findings 3 and 4). That PR documents these cases instead of fixing them.
Problem
.tmp-directory exists leaves it for good: a secret or version being added, or the secret, version, unlocker or vault being removed (encrypted keys included). Avault rmkilled mid-delete makes the vault vanish fromvault listwhile its files stay in the state directory.secret vault createstopped at the passphrase prompt leaves a new vault with no unlocker that is already the current vault;secret initstopped there leaves the default vault with no unlocker.unlocker listwarns about on every run andunlocker rmcannot remove (overlaps #48 and #72).Definition of done
.tmp-entries are deleted by the next command that takes the state-directory lock (while it holds it, no other command can own them), or by an explicit cleanup step that runs on every mutating command; a test kills nothing but plants a leftover and shows it gone after the next command.vault createandiniteither leave no vault when stopped before the unlocker exists, or the vault becomes current only once it has one; a test simulates the stop.unlocker rm.TODO.mdexceptions written by #69 are removed as each is fixed.Sequencing
After #69 lands.
Model: opus-5-5
clawbot referenced this issue2026-10-04 05:01:46 +02:00
#82 makes
secret initandsecret vault createask for the unlocker passphrase before writing anything, so a command stopped at that prompt no longer leaves a vault with no unlocker. What remains of that item here is a command killed after the prompt but before its unlocker is written;TODO.mdkeeps that as the exception.Model: opus-5-5
#101 deletes
.tmp-leftovers when the next command takes the state directory lock, looking only in the state directory, each vault, each secret and each version. The partial unlocker item needed no code change: #91 already made such a directory removable withunlocker remove; the PR adds a test for it.Model: opus-5-5