processPhase (internal/snapshot/scanner.go:1314-1345) loops over every file to process and never checks whether the run was cancelled. After Ctrl-C or SIGTERM, each processFileStreaming call returns the context's cancellation error. Under --skip-errors, processFileWithErrorHandling (:1353-1389) treats that error like an unreadable file: it prints Failed to process ... context canceled. Skipping (--skip-errors)., counts the file as failed and moves on to the next one. An interrupted backup of a large tree therefore opens and partly reads every remaining file and prints one error line for each, before it finally exits with the interrupted status from #267.
Reported by the worker on #284 and confirmed in the code on next at 79a73fa. Traced, not run.
Definition of done
The processing loop stops at the first file after the run is cancelled, whether or not --skip-errors is set. A cancellation error is never skipped or counted as a failed file.
A test cancels a --skip-errors backup partway through processing and asserts that the run returns the cancellation error and that no file is reported as failed because of it.
make check passes.
Model: opus-5-5
`processPhase` (`internal/snapshot/scanner.go:1314-1345`) loops over every file to process and never checks whether the run was cancelled. After Ctrl-C or SIGTERM, each `processFileStreaming` call returns the context's cancellation error. Under `--skip-errors`, `processFileWithErrorHandling` (`:1353-1389`) treats that error like an unreadable file: it prints `Failed to process ... context canceled. Skipping (--skip-errors).`, counts the file as failed and moves on to the next one. An interrupted backup of a large tree therefore opens and partly reads every remaining file and prints one error line for each, before it finally exits with the interrupted status from https://git.eeqj.de/sneak/vaultik/issues/267.
Reported by the worker on https://git.eeqj.de/sneak/vaultik/issues/284 and confirmed in the code on `next` at `79a73fa`. Traced, not run.
## Definition of done
1. The processing loop stops at the first file after the run is cancelled, whether or not `--skip-errors` is set. A cancellation error is never skipped or counted as a failed file.
2. A test cancels a `--skip-errors` backup partway through processing and asserts that the run returns the cancellation error and that no file is reported as failed because of it.
3. `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-08 11:12:28 +02:00
Confirmed on next at 05bf73c with a failing test, then fixed in #287. The processing loop now checks for cancellation before each file, and a file error after the cancel stops the run instead of being skipped. One thing the issue did not say: the cancelled scan also returned no error once it had skipped every remaining file.
Model: opus-5-5
Confirmed on `next` at `05bf73c` with a failing test, then fixed in https://git.eeqj.de/sneak/vaultik/pulls/287. The processing loop now checks for cancellation before each file, and a file error after the cancel stops the run instead of being skipped. One thing the issue did not say: the cancelled scan also returned no error once it had skipped every remaining file.
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.
processPhase(internal/snapshot/scanner.go:1314-1345) loops over every file to process and never checks whether the run was cancelled. After Ctrl-C or SIGTERM, eachprocessFileStreamingcall returns the context's cancellation error. Under--skip-errors,processFileWithErrorHandling(:1353-1389) treats that error like an unreadable file: it printsFailed to process ... context canceled. Skipping (--skip-errors)., counts the file as failed and moves on to the next one. An interrupted backup of a large tree therefore opens and partly reads every remaining file and prints one error line for each, before it finally exits with the interrupted status from #267.Reported by the worker on #284 and confirmed in the code on
nextat79a73fa. Traced, not run.Definition of done
--skip-errorsis set. A cancellation error is never skipped or counted as a failed file.--skip-errorsbackup partway through processing and asserts that the run returns the cancellation error and that no file is reported as failed because of it.make checkpasses.Model: opus-5-5
Confirmed on
nextat05bf73cwith a failing test, then fixed in #287. The processing loop now checks for cancellation before each file, and a file error after the cancel stops the run instead of being skipped. One thing the issue did not say: the cancelled scan also returned no error once it had skipped every remaining file.Model: opus-5-5