findUnlockerByID in internal/vault/unlockers.go returns an error as soon as it meets an unlocker directory whose unlocker-metadata.json is not valid JSON. When such a directory sorts before the target, secret unlocker select ID and secret unlocker remove ID fail outright, even though the target itself is fine. #61 makes secret unlocker list skip such a directory with a warning, so the user can now see the target but still cannot select or remove it, nor remove the corrupt one by its ID.
Definition of done
Looking up an unlocker by ID skips a directory whose metadata cannot be read or parsed, with the same secret.Warn() naming the directory that listing gives, and still finds the target.
A corrupt unlocker can still be removed (by its directory name, which listing shows).
Tests: with a corrupt unlocker sorting before the target, select and remove of the target succeed; removing the corrupt one succeeds.
Found in the review of https://git.eeqj.de/sneak/secret/pulls/61.
## Problem
`findUnlockerByID` in `internal/vault/unlockers.go` returns an error as soon as it meets an unlocker directory whose `unlocker-metadata.json` is not valid JSON. When such a directory sorts before the target, `secret unlocker select ID` and `secret unlocker remove ID` fail outright, even though the target itself is fine. https://git.eeqj.de/sneak/secret/pulls/61 makes `secret unlocker list` skip such a directory with a warning, so the user can now see the target but still cannot select or remove it, nor remove the corrupt one by its ID.
## Definition of done
- Looking up an unlocker by ID skips a directory whose metadata cannot be read or parsed, with the same `secret.Warn()` naming the directory that listing gives, and still finds the target.
- A corrupt unlocker can still be removed (by its directory name, which listing shows).
- Tests: with a corrupt unlocker sorting before the target, `select` and `remove` of the target succeed; removing the corrupt one succeeds.
- `TODO.md` updated in the same commit.
## Sequencing
After https://git.eeqj.de/sneak/secret/pulls/61 lands (same file).
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 #61.
Problem
findUnlockerByIDininternal/vault/unlockers.goreturns an error as soon as it meets an unlocker directory whoseunlocker-metadata.jsonis not valid JSON. When such a directory sorts before the target,secret unlocker select IDandsecret unlocker remove IDfail outright, even though the target itself is fine. #61 makessecret unlocker listskip such a directory with a warning, so the user can now see the target but still cannot select or remove it, nor remove the corrupt one by its ID.Definition of done
secret.Warn()naming the directory that listing gives, and still finds the target.selectandremoveof the target succeed; removing the corrupt one succeeds.TODO.mdupdated in the same commit.Sequencing
After #61 lands (same file).
Model: opus-5-5