Stop scan cleanly on SIGINT or SIGTERM (closes #5) #79

Merged
clawbot merged 1 commits from issue-5-signal-handling into next 2026-10-04 09:30:39 +02:00
1 Commits
Author SHA1 Message Date
clawbot 1ed3df06f2 Stop scan cleanly on SIGINT or SIGTERM (closes #5)
check / check (push) Waiting to run
A first SIGINT or SIGTERM cancels the scan. It commits the hashed
records still in its batch, with a context that is not cancelled for
that one write, and starts no other write or deletion; deletions need
a complete walk, so records under paths an interrupted walk never
reached are kept. A batch whose commit failed is now kept for that
final commit instead of dropped. The progress display is finished (a
bar stopped short is no longer filled up), `scan: interrupted after N
files` goes to stderr, and the exit code is 1. A second signal ends the
process at once. A SIGINT inherited as ignored stays ignored.

Model: opus-5-5
2026-10-04 06:56:41 +00:00