mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-31 05:20:17 -04:00
An index becomes browsable two ways and only one of them armed a watch. A walk finishes and the indexing job watches what it walked. A restart restores the same index from a snapshot and watched nothing, so the drive browsed perfectly and reported no changes until it was indexed again. Measured on the running daemon: one source, /System/Volumes/Data, 2.1M entries restored, no ephemeral index job this session, and a real file created on the desktop produced no ResourceChanged on the event bus. The cache now announces a root when its snapshot restore populates the index, and the watcher service arms a watch for each. A channel rather than a handle because the watcher service already holds the cache. Announced once per source per session, and watch_ephemeral returns early for a root it already watches, so nothing accumulates a reference count it never sheds. core.ephemeral_status reports watched roots, and `sd-cli index ephemeral-cache` prints them even when the list is empty. Empty is the whole answer here, and reading it took a code walk twice.