A backup without --cron of a snapshot with two or more paths panicked with close of closed channel. scanAllDirectories calls Scan once per path on one scanner, and Scan started the progress reporter and deferred its Stop on every call. Stop closes the reporter's signal channel, so the second path's Stop panicked.
scanAllDirectories now starts the reporter before the first path and stops it after the last, and Scan no longer starts or stops it. The reporter's first detailed status therefore prints once per snapshot instead of once per path.
What the diff does not show: anything that calls Scan directly on a scanner built with progress on now gets a reporter nobody starts. Only createNamedSnapshot turns progress on today; the GetProgress comment says the caller owns the start and stop.
TestBackupWithoutCronOfTwoPathSnapshotRestoresBothPaths runs CreateSnapshot without Cron on a snapshot with two paths, restores it from the store alone with verification, and compares every file of both paths. It was written first and panicked on next at 5d685f0.
Judgement call: the start and stop sit in scanAllDirectories, not createNamedSnapshot, so the reporter still stops before the metadata export, as it did when Scan stopped it.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/vaultik/issues/253.
A backup without `--cron` of a snapshot with two or more `paths` panicked with `close of closed channel`. `scanAllDirectories` calls `Scan` once per path on one scanner, and `Scan` started the progress reporter and deferred its `Stop` on every call. `Stop` closes the reporter's signal channel, so the second path's `Stop` panicked.
`scanAllDirectories` now starts the reporter before the first path and stops it after the last, and `Scan` no longer starts or stops it. The reporter's first detailed status therefore prints once per snapshot instead of once per path.
What the diff does not show: anything that calls `Scan` directly on a scanner built with progress on now gets a reporter nobody starts. Only `createNamedSnapshot` turns progress on today; the `GetProgress` comment says the caller owns the start and stop.
`TestBackupWithoutCronOfTwoPathSnapshotRestoresBothPaths` runs `CreateSnapshot` without `Cron` on a snapshot with two paths, restores it from the store alone with verification, and compares every file of both paths. It was written first and panicked on `next` at `5d685f0`.
Judgement call: the start and stop sit in `scanAllDirectories`, not `createNamedSnapshot`, so the reporter still stops before the metadata export, as it did when `Scan` stopped it.
Model: opus-5-5
A backup without --cron of a snapshot with two or more paths panicked
with "close of closed channel". Scan runs once per path, and it started
the progress reporter and deferred its Stop each time; Stop closes the
reporter's signal channel, so the second path's Stop panicked.
scanAllDirectories now starts the reporter before the first path and
stops it after the last, and Scan no longer starts or stops it. A new
test backs up a two-path snapshot with the reporter on 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.
Fixes #253.
A backup without
--cronof a snapshot with two or morepathspanicked withclose of closed channel.scanAllDirectoriescallsScanonce per path on one scanner, andScanstarted the progress reporter and deferred itsStopon every call.Stopcloses the reporter's signal channel, so the second path'sStoppanicked.scanAllDirectoriesnow starts the reporter before the first path and stops it after the last, andScanno longer starts or stops it. The reporter's first detailed status therefore prints once per snapshot instead of once per path.What the diff does not show: anything that calls
Scandirectly on a scanner built with progress on now gets a reporter nobody starts. OnlycreateNamedSnapshotturns progress on today; theGetProgresscomment says the caller owns the start and stop.TestBackupWithoutCronOfTwoPathSnapshotRestoresBothPathsrunsCreateSnapshotwithoutCronon a snapshot with two paths, restores it from the store alone with verification, and compares every file of both paths. It was written first and panicked onnextat5d685f0.Judgement call: the start and stop sit in
scanAllDirectories, notcreateNamedSnapshot, so the reporter still stops before the metadata export, as it did whenScanstopped it.Model: opus-5-5
Review passed.
Model: opus-5-5