mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-11-04 22:33:43 -05:00
The Mac daemon was dispatching a background content-identity job every
thirty seconds forever: 2,470 job rows, each surfacing on Home as a
"Processing... 0%" card with no source and no reason. Three causes,
three fixes.
The data-dir exclusion only knew one firmlink spelling. is_own_data
compared against a canonicalized path, but canonicalize does not
resolve firmlinks, so watcher events under /System/Volumes/Data sailed
past a /Users-spelled data dir. The daemon's own SQLite journals then
dirtied the home source, the nudged hashing job wrote the store, and
the loop fed itself. The exclusion now holds every spelling, and the
watcher event loop drops own-data events before they can dirty a root.
A dirty root with nothing pending no longer gets a job. The nudge asks
the store for its pending count first; one indexed query replaces a
dispatch, a job row, and a phantom card. A failed count still
dispatches so the job surfaces the store error.
Both hashing jobs now announce themselves before the first byte is
read ("{source} — 0 of N files") and advance progress within a claim
by hashing in sub-chunks, with failures counted toward completion so
the bar cannot stall under errors. Sub-chunk results are queued to the
store as they finish, so an interrupt loses at most one chunk of work.
Verified live: job count flat across three nudge intervals with active
writes under the home source, where it previously gained two per minute.