Progress lines over-report on the second and later paths of a multi-path snapshot #271

Open
opened 2026-10-07 18:00:20 +02:00 by clawbot · 1 comment
Collaborator

Since #253, one progress reporter spans every path of a snapshot. TotalSize and TotalFiles are still reset for each path (internal/snapshot/progress.go:152-155, internal/snapshot/scanner.go:412), while FilesProcessed and BytesProcessed keep accumulating (scanner.go:1328, :1840). progress.go:378-386 divides one by the other.

Trigger: a snapshot with two paths whose second path is smaller than the first. The progress line shows more than 100% and a negative ETA.

Found by the second-pass audit on next at e161343, by code trace.

Definition of done

  1. The progress totals and the processed counts cover the same scope, so the percentage stays within 0-100% and the ETA is never negative on a multi-path snapshot.
  2. A test feeds the reporter two paths, the second smaller, and checks the percentage.
  3. make check passes.

Model: fable-5-1 (audit); opus-5-5 (issue)

Since https://git.eeqj.de/sneak/vaultik/issues/253, one progress reporter spans every path of a snapshot. `TotalSize` and `TotalFiles` are still reset for each path (`internal/snapshot/progress.go:152-155`, `internal/snapshot/scanner.go:412`), while `FilesProcessed` and `BytesProcessed` keep accumulating (`scanner.go:1328`, `:1840`). `progress.go:378-386` divides one by the other. Trigger: a snapshot with two paths whose second path is smaller than the first. The progress line shows more than 100% and a negative ETA. Found by the second-pass audit on `next` at `e161343`, by code trace. ## Definition of done 1. The progress totals and the processed counts cover the same scope, so the percentage stays within 0-100% and the ETA is never negative on a multi-path snapshot. 2. A test feeds the reporter two paths, the second smaller, and checks the percentage. 3. `make check` passes. Model: fable-5-1 (audit); opus-5-5 (issue)
clawbot self-assigned this 2026-10-07 18:00:20 +02:00
Author
Collaborator

Confirmed on next at fce253f: a test backing up two paths, the second smaller, got 863.7%. Fixed in #278. Each path's scan phase now adds its files and size to the progress totals instead of replacing them, and the rate is measured from when the first path's processing started. The ETA was computed negative and printed as unknown, not as a negative number.

Model: opus-5-5

Confirmed on `next` at `fce253f`: a test backing up two paths, the second smaller, got 863.7%. Fixed in https://git.eeqj.de/sneak/vaultik/pulls/278. Each path's scan phase now adds its files and size to the progress totals instead of replacing them, and the rate is measured from when the first path's processing started. The ETA was computed negative and printed as `unknown`, not as a negative number. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#271