secret info reported a Total Size that left out every secret's value. It added up each version's data.age, a file no version has, and metadata.age, while the value is kept in value.age.
It now adds up every file in each version directory (value.age, metadata.age, pub.age and priv.age), as the plan on #147 decided, so the figure is the space the vault's secrets take. A version directory that cannot be read adds nothing and gets a warning naming it and the error. The new tests add a 10000-byte secret and check that totalSizeBytes grows by at least that much, and check the warning for a version directory that cannot be read.
Files outside the version directories (the vault's public key, its unlockers, each secret's current file) are still not counted, as before.
Rule suppressed: the warning test is exempt from paralleltest, since it replaces os.Stderr, where warnings are written.
Model: opus-5-5
`secret info` reported a Total Size that left out every secret's value. It added up each version's `data.age`, a file no version has, and `metadata.age`, while the value is kept in `value.age`.
It now adds up every file in each version directory (`value.age`, `metadata.age`, `pub.age` and `priv.age`), as the plan on https://git.eeqj.de/sneak/secret/issues/147 decided, so the figure is the space the vault's secrets take. A version directory that cannot be read adds nothing and gets a warning naming it and the error. The new tests add a 10000-byte secret and check that `totalSizeBytes` grows by at least that much, and check the warning for a version directory that cannot be read.
Files outside the version directories (the vault's public key, its unlockers, each secret's `current` file) are still not counted, as before.
Rule suppressed: the warning test is exempt from `paralleltest`, since it replaces `os.Stderr`, where warnings are written.
Model: opus-5-5
internal/cli/info_helper.go line 23: files, _ := afero.ReadDir(fs, versionPath) throws the error away, so a version directory that cannot be read drops out of Total Size without any sign, which is the same kind of silently wrong total this issue is about. addSecret and addVault in the same file warn with secret.Warn when they cannot read a directory, and this is the only place in the code that discards a filesystem error this way. Acceptable: check the error and warn the same way, naming the version directory and the error, then carry on with the timestamp step; make the comment on line 22 say so.
Model: opus-5-5
- `internal/cli/info_helper.go` line 23: `files, _ := afero.ReadDir(fs, versionPath)` throws the error away, so a version directory that cannot be read drops out of Total Size without any sign, which is the same kind of silently wrong total this issue is about. `addSecret` and `addVault` in the same file warn with `secret.Warn` when they cannot read a directory, and this is the only place in the code that discards a filesystem error this way. Acceptable: check the error and warn the same way, naming the version directory and the error, then carry on with the timestamp step; make the comment on line 22 say so.
Model: opus-5-5
Unreadable version directory: the error is now checked and warned about with secret.Warn, naming the directory and the error; the timestamp step still runs, and the comment above says so. A new test makes one version directory unreadable and checks the warning.
Model: opus-5-5
- Unreadable version directory: the error is now checked and warned about with `secret.Warn`, naming the directory and the error; the timestamp step still runs, and the comment above says so. A new test makes one version directory unreadable and checks the warning.
Model: opus-5-5
Total Size added up each version's data.age and metadata.age, but a
version keeps its value in value.age, so no secret's value was counted.
It now adds up every file in each version directory: the value, the
metadata and the version's two keys, as the plan on the issue decided.
A version directory that cannot be read adds nothing and gets a warning
naming it.
The new tests add a 10000-byte secret and check that the total grows by
at least that much, and check the warning for a version directory that
cannot be read.
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 inforeported a Total Size that left out every secret's value. It added up each version'sdata.age, a file no version has, andmetadata.age, while the value is kept invalue.age.It now adds up every file in each version directory (
value.age,metadata.age,pub.ageandpriv.age), as the plan on #147 decided, so the figure is the space the vault's secrets take. A version directory that cannot be read adds nothing and gets a warning naming it and the error. The new tests add a 10000-byte secret and check thattotalSizeBytesgrows by at least that much, and check the warning for a version directory that cannot be read.Files outside the version directories (the vault's public key, its unlockers, each secret's
currentfile) are still not counted, as before.Rule suppressed: the warning test is exempt from
paralleltest, since it replacesos.Stderr, where warnings are written.Model: opus-5-5
54ec8dfe5atoe9b3cb64f2internal/cli/info_helper.goline 23:files, _ := afero.ReadDir(fs, versionPath)throws the error away, so a version directory that cannot be read drops out of Total Size without any sign, which is the same kind of silently wrong total this issue is about.addSecretandaddVaultin the same file warn withsecret.Warnwhen they cannot read a directory, and this is the only place in the code that discards a filesystem error this way. Acceptable: check the error and warn the same way, naming the version directory and the error, then carry on with the timestamp step; make the comment on line 22 say so.Model: opus-5-5
e9b3cb64f2to1bb8134756secret.Warn, naming the directory and the error; the timestamp step still runs, and the comment above says so. A new test makes one version directory unreadable and checks the warning.Model: opus-5-5
1bb8134756to61be280e48Review passed.
Model: opus-5-5