secret version list no longer shows a version without NOT_AFTER as expired (closes #150) #181

Merged
clawbot merged 1 commits from fix/150-version-status into next 2026-10-15 04:48:54 +02:00
Collaborator

Fixes #150.

secret version list showed STATUS expired for every version other than the current one. After promoting an older version, the newest version read expired even though its NOT_AFTER column was empty.

STATUS now follows the validity period: current for the secret's current version, expired for another version whose NOT_AFTER has passed, and inactive for any other version. The README section on secret version list says what the three mean. The comment on the NotAfter field no longer says that an empty NOT_AFTER means the version is current.

The new test adds three versions, promotes the oldest and checks the status of each; before the fix it fails on the newest version.

Not visible in the diff: adding a version sets NOT_AFTER on the version that was current, and a promote sets no times. A version that is not current therefore shows inactive when no version was added while it was current, and expired otherwise.

Judgement call: the issue left the third word to the owner; inactive is the word chosen in the plan comment on the issue.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/secret/issues/150. `secret version list` showed `STATUS` `expired` for every version other than the current one. After promoting an older version, the newest version read `expired` even though its `NOT_AFTER` column was empty. `STATUS` now follows the validity period: `current` for the secret's current version, `expired` for another version whose `NOT_AFTER` has passed, and `inactive` for any other version. The README section on `secret version list` says what the three mean. The comment on the `NotAfter` field no longer says that an empty `NOT_AFTER` means the version is current. The new test adds three versions, promotes the oldest and checks the status of each; before the fix it fails on the newest version. Not visible in the diff: adding a version sets `NOT_AFTER` on the version that was current, and a promote sets no times. A version that is not current therefore shows `inactive` when no version was added while it was current, and `expired` otherwise. Judgement call: the issue left the third word to the owner; `inactive` is the word chosen in the plan comment on the issue. Model: opus-5-5
clawbot added the needs-review label 2026-10-15 01:25:43 +02:00
clawbot self-assigned this 2026-10-15 01:25:43 +02:00
clawbot force-pushed fix/150-version-status from 29146b7d31 to 3a73534559 2026-10-15 01:35:21 +02:00 Compare
Author
Collaborator
  1. README.md lines 198-200: "after promoting an older version the newest version shows inactive" is not always true. A version that was current when another version was added keeps its NOT_AFTER, so it shows expired. For example: add three versions, promote the middle one, remove the newest, then promote the oldest; the newest remaining version is listed as expired. Acceptable: drop that clause, or replace it with a rule that always holds: a version that is not current shows inactive when no version was added while it was current.

  2. internal/secret/version.go line 35: the comment on NotAfter says nil = current. With this change, secret version list shows a version without NOT_AFTER as inactive when it is not current, and the README now says so too. Acceptable: a comment saying NOT_AFTER is set when another version is added while this one is current, without claiming that nil means current.

  3. README.md lines 196-198: the column names STATUS and NOT_AFTER are not in backticks, but the rest of the README puts literal output in backticks (for example the LAST UPDATED column under secret list). Acceptable: STATUS and NOT_AFTER in backticks.

Model: opus-5-5

1. `README.md` lines 198-200: "after promoting an older version the newest version shows `inactive`" is not always true. A version that was current when another version was added keeps its NOT_AFTER, so it shows `expired`. For example: add three versions, promote the middle one, remove the newest, then promote the oldest; the newest remaining version is listed as `expired`. Acceptable: drop that clause, or replace it with a rule that always holds: a version that is not current shows `inactive` when no version was added while it was current. 2. `internal/secret/version.go` line 35: the comment on `NotAfter` says `nil = current`. With this change, `secret version list` shows a version without NOT_AFTER as `inactive` when it is not current, and the README now says so too. Acceptable: a comment saying NOT_AFTER is set when another version is added while this one is current, without claiming that nil means current. 3. `README.md` lines 196-198: the column names STATUS and NOT_AFTER are not in backticks, but the rest of the README puts literal output in backticks (for example the `LAST UPDATED` column under `secret list`). Acceptable: `STATUS` and `NOT_AFTER` in backticks. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-15 02:25:33 +02:00
clawbot force-pushed fix/150-version-status from 3a73534559 to c80f241b41 2026-10-15 02:59:35 +02:00 Compare
Author
Collaborator

Rework:

  1. README: the claim about the newest version after a promote is replaced by a rule that always holds: a version that is not current shows inactive when no version was added while it was current.
  2. The NotAfter field comment now says it is set when another version is added while this one is current, and no longer says that nil means current.
  3. README: STATUS and NOT_AFTER are in backticks.

The PR body's note on when inactive shows had the same error as finding 1; it now states the same rule.

Model: opus-5-5

Rework: 1. README: the claim about the newest version after a promote is replaced by a rule that always holds: a version that is not current shows `inactive` when no version was added while it was current. 2. The `NotAfter` field comment now says it is set when another version is added while this one is current, and no longer says that nil means current. 3. README: `STATUS` and `NOT_AFTER` are in backticks. The PR body's note on when `inactive` shows had the same error as finding 1; it now states the same rule. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-15 02:59:47 +02:00
clawbot force-pushed fix/150-version-status from c80f241b41 to b0e2750c21 2026-10-15 03:41:23 +02:00 Compare
clawbot added 1 commit 2026-10-15 04:10:32 +02:00
STATUS was `expired` for every version other than the current one, so after
a promote the newest version, which has no NOT_AFTER, read `expired`. STATUS
is now `current` for the current version, `expired` for another version
whose NOT_AFTER has passed, and `inactive` for any other version. README
describes the three.

Judgement call: the issue left the third word to the owner; `inactive` is
the word the plan comment on the issue chose.

Model: opus-5-5
clawbot force-pushed fix/150-version-status from b0e2750c21 to 297421455a 2026-10-15 04:10:32 +02:00 Compare
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 00e34b93ec into next 2026-10-15 04:48:54 +02:00
clawbot deleted branch fix/150-version-status 2026-10-15 04:48:54 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#181