Hold a lock so a second scan fails at once (closes #53) #75

Merged
clawbot merged 1 commits from issue-53-scan-lock into next 2026-10-04 02:30:23 +02:00
1 Commits
Author SHA1 Message Date
sneak efc2b62a77 Hold a lock so a second scan fails at once (closes #53)
check / check (push) Successful in 2m22s
scan takes an exclusive flock(2) on a lock file beside the database
(its path with .lock appended) before it walks anything or opens the
database, and holds it until it returns. A second scan against the
same database fails at once with a one-line error naming the lock
file and exits 1. report and trees never take the lock. The lock ends
with the process, so a fatal error or an interrupt releases it; the
file is never deleted. golang.org/x/sys becomes a direct dependency.

The README smoke test now keeps the database outside the scanned
tree, where its empty lock file would have joined the empty-file
group.

Model: opus-5-5
2026-10-03 23:52:55 +00:00