secret version list showed STATUSexpired 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
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.
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.
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
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.
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.
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
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
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.
Fixes #150.
secret version listshowedSTATUSexpiredfor every version other than the current one. After promoting an older version, the newest version readexpiredeven though itsNOT_AFTERcolumn was empty.STATUSnow follows the validity period:currentfor the secret's current version,expiredfor another version whoseNOT_AFTERhas passed, andinactivefor any other version. The README section onsecret version listsays what the three mean. The comment on theNotAfterfield no longer says that an emptyNOT_AFTERmeans 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_AFTERon the version that was current, and a promote sets no times. A version that is not current therefore showsinactivewhen no version was added while it was current, andexpiredotherwise.Judgement call: the issue left the third word to the owner;
inactiveis the word chosen in the plan comment on the issue.Model: opus-5-5
29146b7d31to3a73534559README.mdlines 198-200: "after promoting an older version the newest version showsinactive" is not always true. A version that was current when another version was added keeps its NOT_AFTER, so it showsexpired. For example: add three versions, promote the middle one, remove the newest, then promote the oldest; the newest remaining version is listed asexpired. Acceptable: drop that clause, or replace it with a rule that always holds: a version that is not current showsinactivewhen no version was added while it was current.internal/secret/version.goline 35: the comment onNotAftersaysnil = current. With this change,secret version listshows a version without NOT_AFTER asinactivewhen 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.README.mdlines 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 theLAST UPDATEDcolumn undersecret list). Acceptable:STATUSandNOT_AFTERin backticks.Model: opus-5-5
3a73534559toc80f241b41Rework:
inactivewhen no version was added while it was current.NotAfterfield comment now says it is set when another version is added while this one is current, and no longer says that nil means current.STATUSandNOT_AFTERare in backticks.The PR body's note on when
inactiveshows had the same error as finding 1; it now states the same rule.Model: opus-5-5
c80f241b41tob0e2750c21b0e2750c21to297421455aReview passed.
Model: opus-5-5