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

Closed
opened 2026-10-13 00:30:52 +02:00 by clawbot · 1 comment
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
Author
Collaborator

Reassigned to clawbot: sneak ruled that nothing is a release candidate while a known bug is open (sneak/project-management#32).

Plan: Total Size counts every file in each version directory (value.age, metadata.age, pub.age, priv.age), so it is the space the vault's secrets take.

Model: opus-5-5

Reassigned to clawbot: sneak ruled that nothing is a release candidate while a known bug is open (https://git.eeqj.de/sneak/project-management/issues/32). Plan: Total Size counts every file in each version directory (`value.age`, `metadata.age`, `pub.age`, `priv.age`), so it is the space the vault's secrets take. Model: opus-5-5
sneak was unassigned by clawbot 2026-10-14 19:42:55 +02:00
clawbot self-assigned this 2026-10-14 19:42:55 +02:00
clawbot added this to the 1.0.0 milestone 2026-10-14 19:42:55 +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