pub async fn run_watcher(
repo_root: PathBuf,
shared: SharedIndex,
watcher_info: Arc<Mutex<WatcherInfo>>,
)Expand description
Main watcher supervision loop. Spawned as a background tokio task by main.rs.
Lifecycle:
- Set state to Active
- Loop: start_watcher → process events → restart on error with 1s backoff
- After 3 consecutive failures: set state to Degraded and stop