secret list showed the time of the listing as every secret's creation and last-update time (#142), because Secret.LoadMetadata set both to the current time.
LoadMetadata now reads file modification times, so secret list still needs no passphrase:
last update (LAST UPDATED, updated_at): when the secret's current file was written, which every add and secret version promote replace;
creation (created_at): when the oldest version's value.age was written.
A move to another vault writes new copies of those files, so it now gives each copy the modification time of the file it was copied from. The README and the secret version promote help say that a promote moves the last update.
GetSecretObject no longer loads the times, so secret get keeps its error for a missing current file; secret list calls LoadMetadata itself. A secret whose times cannot be read is listed as before: unknown in the table, no time fields in --json.
The new tests run on a real filesystem. One lists twice with a clock step between, then adds again with --force; the other moves a secret between vaults and compares the times listed on both sides.
Deviation from the plan: the creation time comes from the oldest version's value.age, not its directory, whose time changes when the next add rewrites that version's metadata.age.
Removing the oldest version with secret version remove makes the next version's time the creation time.
Times stay in the local time zone, as the listing printed them before.
Model: opus-5-5
`secret list` showed the time of the listing as every secret's creation and last-update time (https://git.eeqj.de/sneak/secret/issues/142), because `Secret.LoadMetadata` set both to the current time.
`LoadMetadata` now reads file modification times, so `secret list` still needs no passphrase:
- last update (`LAST UPDATED`, `updated_at`): when the secret's `current` file was written, which every add and `secret version promote` replace;
- creation (`created_at`): when the oldest version's `value.age` was written.
A move to another vault writes new copies of those files, so it now gives each copy the modification time of the file it was copied from. The README and the `secret version promote` help say that a promote moves the last update.
`GetSecretObject` no longer loads the times, so `secret get` keeps its error for a missing `current` file; `secret list` calls `LoadMetadata` itself. A secret whose times cannot be read is listed as before: `unknown` in the table, no time fields in `--json`.
The new tests run on a real filesystem. One lists twice with a clock step between, then adds again with `--force`; the other moves a secret between vaults and compares the times listed on both sides.
- Deviation from the plan: the creation time comes from the oldest version's `value.age`, not its directory, whose time changes when the next add rewrites that version's `metadata.age`.
- Removing the oldest version with `secret version remove` makes the next version's time the creation time.
- Times stay in the local time zone, as the listing printed them before.
Model: opus-5-5
README.md line 190 and internal/cli/version.go lines 67–68 still say that secret version promote does not modify any timestamps. With this change a promote replaces the secret's current file and so moves the last-update time that secret list gives, as the new paragraph at README.md lines 153–157 says. Acceptable: both say that a promote leaves the versions' own times unchanged and that secret list then gives the time of the promote as the secret's last update.
A secret moved to another vault is listed with the time of the move as both its creation and its last update. A move between vaults copies each version through CopySecretVersion (internal/vault/secrets.go lines 464–503), which writes a new value.age, and writes a new current (line 820). The move keeps the versions' own creation times on purpose (line 496), its help says it preserves history (internal/cli/secrets.go line 243), and the definition of done asks for times that match when the secret was added or updated. Acceptable: the copy gives each copied value.age and current the modification time of the file it was copied from, and a test moves a secret between vaults and finds the same times in secret list on both sides; or, if the time of the move is the intended answer, the secret list paragraph in README.md says so.
Model: opus-5-5
1. `README.md` line 190 and `internal/cli/version.go` lines 67–68 still say that `secret version promote` does not modify any timestamps. With this change a promote replaces the secret's `current` file and so moves the last-update time that `secret list` gives, as the new paragraph at `README.md` lines 153–157 says. Acceptable: both say that a promote leaves the versions' own times unchanged and that `secret list` then gives the time of the promote as the secret's last update.
2. A secret moved to another vault is listed with the time of the move as both its creation and its last update. A move between vaults copies each version through `CopySecretVersion` (`internal/vault/secrets.go` lines 464–503), which writes a new `value.age`, and writes a new `current` (line 820). The move keeps the versions' own creation times on purpose (line 496), its help says it preserves history (`internal/cli/secrets.go` line 243), and the definition of done asks for times that match when the secret was added or updated. Acceptable: the copy gives each copied `value.age` and `current` the modification time of the file it was copied from, and a test moves a secret between vaults and finds the same times in `secret list` on both sides; or, if the time of the move is the intended answer, the `secret list` paragraph in `README.md` says so.
Model: opus-5-5
README.md and the promote help now say a promote leaves the versions' own times unchanged and that secret list then gives the time of the promote as the last update.
A move to another vault gives each copied value.age and current the modification time of its original; TestMovedSecretKeepsItsTimes moves a secret and compares secret list on both sides, and README.md says a move keeps both times.
Model: opus-5-5
1. `README.md` and the promote help now say a promote leaves the versions' own times unchanged and that `secret list` then gives the time of the promote as the last update.
2. A move to another vault gives each copied `value.age` and `current` the modification time of its original; `TestMovedSecretKeepsItsTimes` moves a secret and compares `secret list` on both sides, and `README.md` says a move keeps both times.
Model: opus-5-5
secret list and secret list --json gave the time of the listing as every
secret's creation and last-update time, because Secret.LoadMetadata set
both to the current time. It now reads file modification times, so
listing still needs no passphrase: the last update is when the secret's
current file was written, and the creation is when its oldest version's
value.age was written. A move to another vault gives the copied files
the times of the originals.
GetSecretObject no longer loads the times, so secret get keeps its error
for a missing current file; secret list calls LoadMetadata itself.
Judgement call: the creation time comes from value.age, not from the
oldest version's directory, whose time changes when the next add
rewrites that version's metadata.age.
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.
secret listshowed the time of the listing as every secret's creation and last-update time (#142), becauseSecret.LoadMetadataset both to the current time.LoadMetadatanow reads file modification times, sosecret liststill needs no passphrase:LAST UPDATED,updated_at): when the secret'scurrentfile was written, which every add andsecret version promotereplace;created_at): when the oldest version'svalue.agewas written.A move to another vault writes new copies of those files, so it now gives each copy the modification time of the file it was copied from. The README and the
secret version promotehelp say that a promote moves the last update.GetSecretObjectno longer loads the times, sosecret getkeeps its error for a missingcurrentfile;secret listcallsLoadMetadataitself. A secret whose times cannot be read is listed as before:unknownin the table, no time fields in--json.The new tests run on a real filesystem. One lists twice with a clock step between, then adds again with
--force; the other moves a secret between vaults and compares the times listed on both sides.value.age, not its directory, whose time changes when the next add rewrites that version'smetadata.age.secret version removemakes the next version's time the creation time.Model: opus-5-5
759dbb1b1dtob467b6822aREADME.mdline 190 andinternal/cli/version.golines 67–68 still say thatsecret version promotedoes not modify any timestamps. With this change a promote replaces the secret'scurrentfile and so moves the last-update time thatsecret listgives, as the new paragraph atREADME.mdlines 153–157 says. Acceptable: both say that a promote leaves the versions' own times unchanged and thatsecret listthen gives the time of the promote as the secret's last update.A secret moved to another vault is listed with the time of the move as both its creation and its last update. A move between vaults copies each version through
CopySecretVersion(internal/vault/secrets.golines 464–503), which writes a newvalue.age, and writes a newcurrent(line 820). The move keeps the versions' own creation times on purpose (line 496), its help says it preserves history (internal/cli/secrets.goline 243), and the definition of done asks for times that match when the secret was added or updated. Acceptable: the copy gives each copiedvalue.ageandcurrentthe modification time of the file it was copied from, and a test moves a secret between vaults and finds the same times insecret liston both sides; or, if the time of the move is the intended answer, thesecret listparagraph inREADME.mdsays so.Model: opus-5-5
b467b6822ato39c9d1bf8839c9d1bf88tocad38994ddREADME.mdand the promote help now say a promote leaves the versions' own times unchanged and thatsecret listthen gives the time of the promote as the last update.value.ageandcurrentthe modification time of its original;TestMovedSecretKeepsItsTimesmoves a secret and comparessecret liston both sides, andREADME.mdsays a move keeps both times.Model: opus-5-5
cad38994ddto4cfbfc3719Review passed.
Model: opus-5-5