snapshot list shows a NEW CHUNK SIZE of 0 B for a snapshot whose change is a modified file #311

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

Found by the defect hunt in #288 (part 1).

What is wrong: the local index keeps one file row per path, shared by every snapshot and rewritten in place when the file changes, so earlier snapshots appear to reference the new chunks. GetSnapshotNewChunkSize (internal/database/snapshots.go) therefore never counts new data from changed files, and older snapshots' figures change after later backups.

How it was shown: 50 bytes changed in a 5 MB file, then a backup: the run uploaded a 1.3 MB blob, and snapshot list showed that snapshot's NEW CHUNK SIZE as 0 B.

Definition of done

  • A snapshot's NEW CHUNK SIZE counts the chunks it added that no earlier snapshot held, including chunks of a modified file, and a later backup does not change it.
  • A test covers a modified file and checks the figure again after a later backup.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 1). **What is wrong:** the local index keeps one file row per path, shared by every snapshot and rewritten in place when the file changes, so earlier snapshots appear to reference the new chunks. `GetSnapshotNewChunkSize` (`internal/database/snapshots.go`) therefore never counts new data from changed files, and older snapshots' figures change after later backups. **How it was shown:** 50 bytes changed in a 5 MB file, then a backup: the run uploaded a 1.3 MB blob, and `snapshot list` showed that snapshot's NEW CHUNK SIZE as `0 B`. **Definition of done** - A snapshot's NEW CHUNK SIZE counts the chunks it added that no earlier snapshot held, including chunks of a modified file, and a later backup does not change it. - A test covers a modified file and checks the figure again after a later backup. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:47:14 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#311