Phase 1 of a backup counts every new or changed regular file into BytesScanned and FilesScanned (internal/snapshot/scanner.go:1043, :1057). Phase 2 may then fail to open the file. That happens under --skip-errors (scanner.go:1373-1383), or without the flag when the file is gone between the two phases (:1364-1370). The only adjustment made is FilesSkipped++. The file's size stays in BytesScanned, and the file reaches neither snapshot_files nor a blob.
The summary (internal/vaultik/snapshot.go:412-437) then prints the file as "unchanged" and its bytes as "backed up". The snapshots row gets a file_count and total_size that include it (:364-365). docs/DATAMODEL.md defines those columns as the number and size of the files in the snapshot.
Trigger: snapshot create --skip-errors over a directory holding one regular file that the process can lstat but not open, for example chmod 000 as a normal user. The output reads Files: 1 examined, 0 backed up, 1 unchanged and Data: S total (S backed up), contradicting the Failed to process error line printed above it.
Found by the third audit pass on next at c06c4d2, by code trace.
Definition of done
A file that phase 2 could not store is in neither BytesScanned nor the "unchanged" count. The summary reports it as failed or skipped, and file_count and total_size exclude it.
A test covers both cases, an unopenable file under --skip-errors and a file removed between the phases, and asserts the summary figures and the snapshots row.
make check passes.
Model: fable-5-1 (audit); opus-5-5 (issue)
Phase 1 of a backup counts every new or changed regular file into `BytesScanned` and `FilesScanned` (`internal/snapshot/scanner.go:1043`, `:1057`). Phase 2 may then fail to open the file. That happens under `--skip-errors` (`scanner.go:1373-1383`), or without the flag when the file is gone between the two phases (`:1364-1370`). The only adjustment made is `FilesSkipped++`. The file's size stays in `BytesScanned`, and the file reaches neither `snapshot_files` nor a blob.
The summary (`internal/vaultik/snapshot.go:412-437`) then prints the file as "unchanged" and its bytes as "backed up". The `snapshots` row gets a `file_count` and `total_size` that include it (`:364-365`). `docs/DATAMODEL.md` defines those columns as the number and size of the files in the snapshot.
Trigger: `snapshot create --skip-errors` over a directory holding one regular file that the process can `lstat` but not `open`, for example `chmod 000` as a normal user. The output reads `Files: 1 examined, 0 backed up, 1 unchanged` and `Data: S total (S backed up)`, contradicting the `Failed to process` error line printed above it.
Found by the third audit pass on `next` at `c06c4d2`, by code trace.
## Definition of done
1. A file that phase 2 could not store is in neither `BytesScanned` nor the "unchanged" count. The summary reports it as failed or skipped, and `file_count` and `total_size` exclude it.
2. A test covers both cases, an unopenable file under `--skip-errors` and a file removed between the phases, and asserts the summary figures and the `snapshots` row.
3. `make check` passes.
Model: fable-5-1 (audit); opus-5-5 (issue)
clawbot
self-assigned this 2026-10-08 08:12:28 +02:00
Fixed in #282: a file that phase 2 cannot store is now counted as failed in the summary, and the data total, file_count and total_size leave it out.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/vaultik/pulls/282: a file that phase 2 cannot store is now counted as failed in the summary, and the data total, `file_count` and `total_size` leave it out.
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.
Phase 1 of a backup counts every new or changed regular file into
BytesScannedandFilesScanned(internal/snapshot/scanner.go:1043,:1057). Phase 2 may then fail to open the file. That happens under--skip-errors(scanner.go:1373-1383), or without the flag when the file is gone between the two phases (:1364-1370). The only adjustment made isFilesSkipped++. The file's size stays inBytesScanned, and the file reaches neithersnapshot_filesnor a blob.The summary (
internal/vaultik/snapshot.go:412-437) then prints the file as "unchanged" and its bytes as "backed up". Thesnapshotsrow gets afile_countandtotal_sizethat include it (:364-365).docs/DATAMODEL.mddefines those columns as the number and size of the files in the snapshot.Trigger:
snapshot create --skip-errorsover a directory holding one regular file that the process canlstatbut notopen, for examplechmod 000as a normal user. The output readsFiles: 1 examined, 0 backed up, 1 unchangedandData: S total (S backed up), contradicting theFailed to processerror line printed above it.Found by the third audit pass on
nextatc06c4d2, by code trace.Definition of done
BytesScannednor the "unchanged" count. The summary reports it as failed or skipped, andfile_countandtotal_sizeexclude it.--skip-errorsand a file removed between the phases, and asserts the summary figures and thesnapshotsrow.make checkpasses.Model: fable-5-1 (audit); opus-5-5 (issue)
Fixed in #282: a file that phase 2 cannot store is now counted as failed in the summary, and the data total,
file_countandtotal_sizeleave it out.Model: opus-5-5