pub fn resilient_index<T>( root: &Path, attempt: impl FnMut() -> Result<T>, ) -> Result<T>
Run an index write; on store corruption anywhere in the attempt, quarantine the database and retry exactly once from scratch.