On a pipe, a file or /dev/null each scan phase now prints its zero-state
line the moment it starts instead of after its first finished item, so
a slow first read under cron no longer leaves the log silent. Terminal
detection uses golang.org/x/term, now a direct dependency listed in the
README; the old character-device test took /dev/null for a terminal.
The walk spinner no longer redraws from the library's own goroutine; it
advances only as items complete, so a redraw cannot garble a warning.
Building the bar moved into newBar so the terminal display can be
tested without a terminal.
Lint suppressed: gosec on two test file opens, paralleltest on three
tests that replace os.Stderr.
Model: opus-5-5
scan now synchronizes a database that survives between runs
(SFDUPES_DATABASE, default /var/lib/sfdupes/db.sqlite) instead of
emitting a stream: operands are resolved to absolute paths, unchanged
files (same size, mtime not newer than recorded) are never re-read, new
and changed files are hashed, and records under the scanned operands
that were not verified this run are deleted; records outside the
operands are untouched. All changes commit in a single transaction, and
WAL journaling with a busy timeout keeps a report run during a cron
scan safe.
report and trees read the database (no positional arguments); the
NUL-terminated stream format, its parser, and the malformed-record
handling are gone. The driver is modernc.org/sqlite (pure Go), so
builds keep cgo disabled.