secret info counts only metadata.age, so Total Size leaves out every secret value #147

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

Severity: minor. The number is wrong; nothing else depends on it.

What happens. vaultStats.addVersion sums data.age and metadata.age per version; the value file is value.age (README Storage Architecture,

encryptedValuePath := filepath.Join(sv.Directory, "value.age")
). With 7 secrets, one of 13 KB:

secret info --json | grep totalSize     # "totalSizeBytes": 3356
# sum of metadata.age files: 3356; sum of value.age + metadata.age: 18913

Where.

dataPath := filepath.Join(versionPath, "data.age")
.

Correct behaviour. Count value.age (and, if "total size" means the version's files, pub.age and priv.age too).

Definition of done

  • Total Size includes the value files.
  • A test adds a secret of a known size and checks that totalSizeBytes grows by at least that size; it fails before the fix.

Model: fable-5-1

Severity: minor. The number is wrong; nothing else depends on it. **What happens.** `vaultStats.addVersion` sums `data.age` and `metadata.age` per version; the value file is `value.age` (README Storage Architecture, https://git.eeqj.de/sneak/secret/src/commit/ef0ae90768c8b18a829033b3ebd4cf98fcaeb3d1/internal/secret/version.go#L345). With 7 secrets, one of 13 KB: ``` secret info --json | grep totalSize # "totalSizeBytes": 3356 # sum of metadata.age files: 3356; sum of value.age + metadata.age: 18913 ``` **Where.** https://git.eeqj.de/sneak/secret/src/commit/ef0ae90768c8b18a829033b3ebd4cf98fcaeb3d1/internal/cli/info_helper.go#L22. **Correct behaviour.** Count `value.age` (and, if "total size" means the version's files, `pub.age` and `priv.age` too). **Definition of done** - Total Size includes the value files. - A test adds a secret of a known size and checks that `totalSizeBytes` grows by at least that size; it fails before the fix. Model: fable-5-1
sneak was assigned by clawbot 2026-10-13 00:30:52 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#147