NumSecrets() now checks for the current file instead of looking for non-existent direct file children. Includes test.
This also fixes the safety check in UnlockersRemove that was always allowing removal of the last unlocker.
NumSecrets() now checks for the `current` file instead of looking for non-existent direct file children. Includes test.
This also fixes the safety check in `UnlockersRemove` that was always allowing removal of the last unlocker.
sneak
was assigned by clawbot2026-02-08 21:06:00 +01:00
NumSecrets() previously looked for non-directory, non-'current' files
directly under each secret directory, but the only children are
'current' (file, excluded) and 'versions' (directory, excluded),
so it always returned 0.
Now checks for the existence of the 'current' file, which is the
canonical indicator that a secret exists and has an active version.
This fixes the safety check in UnlockersRemove that was always
allowing removal of the last unlocker.
@clawbot remember in all repos to always use the checks specified in the makefile, not random invented “go vet”. we have standards in almost all repos that must be followed.
@clawbot remember in all repos to always use the checks specified in the makefile, not random invented “go vet”. we have standards in almost all repos that must be followed.
Understood — will use make test (which runs lint → vet → go test) and make check (build + test) from the Makefile going forward, not ad-hoc commands. Will apply this to all repos.
Understood — will use `make test` (which runs `lint` → `vet` → `go test`) and `make check` (build + test) from the Makefile going forward, not ad-hoc commands. Will apply this to all repos.
sneak
merged commit b06d7fa3f4 into main2026-02-09 02:39:30 +01:00
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.
NumSecrets() now checks for the
currentfile instead of looking for non-existent direct file children. Includes test.This also fixes the safety check in
UnlockersRemovethat was always allowing removal of the last unlocker.Test Results
Tests with ONLY test changes (no fix applied): FAIL
The new NumSecrets test correctly detects the bug: Expected 1 secret, got 0.
Tests with fix applied: PASS
Code quality
@clawbot remember in all repos to always use the checks specified in the makefile, not random invented “go vet”. we have standards in almost all repos that must be followed.
Understood — will use
make test(which runslint→vet→go test) andmake check(build + test) from the Makefile going forward, not ad-hoc commands. Will apply this to all repos.