Found while writing tests for #225, on next at 5d685f0.
snapshot create without --cron panics with close of closed channel on any snapshot that has two or more paths. One Scanner backs up every path of a snapshot (scanAllDirectories in internal/vaultik/snapshot.go calls Scan once per path), and Scan starts the progress reporter and defers Stop on each call (internal/snapshot/scanner.go). Stop closes the reporter's signal channel, so the second path's Stop panics. --cron turns the progress reporter off, which is why cron runs do not hit it.
Reproduce: a config with one snapshot whose paths lists two directories, then vaultik snapshot create without --cron.
Definition of done
A backup without --cron of a snapshot with two or more paths completes, with the progress reporter started and stopped once per snapshot.
A test backs up a two-path snapshot with the progress reporter on and asserts it completes and restores both paths.
make check passes.
Model: opus-5-5
Found while writing tests for https://git.eeqj.de/sneak/vaultik/issues/225, on `next` at `5d685f0`.
`snapshot create` without `--cron` panics with `close of closed channel` on any snapshot that has two or more `paths`. One `Scanner` backs up every path of a snapshot (`scanAllDirectories` in `internal/vaultik/snapshot.go` calls `Scan` once per path), and `Scan` starts the progress reporter and defers `Stop` on each call (`internal/snapshot/scanner.go`). `Stop` closes the reporter's signal channel, so the second path's `Stop` panics. `--cron` turns the progress reporter off, which is why cron runs do not hit it.
Reproduce: a config with one snapshot whose `paths` lists two directories, then `vaultik snapshot create` without `--cron`.
## Definition of done
1. A backup without `--cron` of a snapshot with two or more `paths` completes, with the progress reporter started and stopped once per snapshot.
2. A test backs up a two-path snapshot with the progress reporter on and asserts it completes and restores both paths.
3. `make check` passes.
Model: opus-5-5
Confirmed on next at 5d685f0 and fixed in #255. The progress reporter is now started and stopped once per snapshot, around the scans of all its paths, and Scan no longer starts or stops it. A new test backs up a two-path snapshot without --cron and restores both paths.
Model: opus-5-5
Confirmed on `next` at `5d685f0` and fixed in https://git.eeqj.de/sneak/vaultik/pulls/255. The progress reporter is now started and stopped once per snapshot, around the scans of all its paths, and `Scan` no longer starts or stops it. A new test backs up a two-path snapshot without `--cron` and restores both paths.
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.
Found while writing tests for #225, on
nextat5d685f0.snapshot createwithout--cronpanics withclose of closed channelon any snapshot that has two or morepaths. OneScannerbacks up every path of a snapshot (scanAllDirectoriesininternal/vaultik/snapshot.gocallsScanonce per path), andScanstarts the progress reporter and defersStopon each call (internal/snapshot/scanner.go).Stopcloses the reporter's signal channel, so the second path'sStoppanics.--cronturns the progress reporter off, which is why cron runs do not hit it.Reproduce: a config with one snapshot whose
pathslists two directories, thenvaultik snapshot createwithout--cron.Definition of done
--cronof a snapshot with two or morepathscompletes, with the progress reporter started and stopped once per snapshot.make checkpasses.Model: opus-5-5
clawbot referenced this issue2026-10-06 22:54:55 +02:00
Confirmed on
nextat5d685f0and fixed in #255. The progress reporter is now started and stopped once per snapshot, around the scans of all its paths, andScanno longer starts or stops it. A new test backs up a two-path snapshot without--cronand restores both paths.Model: opus-5-5