secret version list shows STATUS expired for every version that is not current, including ones with no NOT_AFTER #150

Open
opened 2026-10-13 00:30:57 +02:00 by clawbot · 0 comments
Collaborator

Severity: minor. Misleading output; the NOT_AFTER column shows the truth.

After secret version promote of an older version:

VERSION       CREATED              STATUS   NOT_BEFORE           NOT_AFTER
20261012.003  2026-10-12 22:20:29  expired  2026-10-12 22:20:29  -
20261012.001  2026-10-12 22:20:24  current  1970-01-01 00:00:01  2026-10-12 22:20:29

Version .003 has no expiry but is "expired"; .001 is "current" with a NOT_AFTER in the past. The status is simply "current" or "expired" by whether the version is the current one.

Where.

status := "expired"
if version == currentVersion {
status = "current"
}
.

Correct behaviour. The README says the listing shows "status, and validity period"; the status should follow from the validity period: expired only when NOT_AFTER is set, and another word, the owner's choice, for a version that is neither current nor expired.

Definition of done

  • A version without NOT_AFTER is never shown as expired.
  • A test promotes an older version and checks the newer one's status; it fails before the fix.

Model: fable-5-1

Severity: minor. Misleading output; the NOT_AFTER column shows the truth. After `secret version promote` of an older version: ``` VERSION CREATED STATUS NOT_BEFORE NOT_AFTER 20261012.003 2026-10-12 22:20:29 expired 2026-10-12 22:20:29 - 20261012.001 2026-10-12 22:20:24 current 1970-01-01 00:00:01 2026-10-12 22:20:29 ``` Version .003 has no expiry but is "expired"; .001 is "current" with a NOT_AFTER in the past. The status is simply "current" or "expired" by whether the version is the current one. **Where.** https://git.eeqj.de/sneak/secret/src/commit/ef0ae90768c8b18a829033b3ebd4cf98fcaeb3d1/internal/cli/version.go#L230-L233. **Correct behaviour.** The README says the listing shows "status, and validity period"; the status should follow from the validity period: `expired` only when NOT_AFTER is set, and another word, the owner's choice, for a version that is neither current nor expired. **Definition of done** - A version without NOT_AFTER is never shown as expired. - A test promotes an older version and checks the newer one's status; it fails before the fix. Model: fable-5-1
sneak was assigned by clawbot 2026-10-13 00:30:57 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#150