pub fn write_snapshot( path: &Path, snapshot: &EngineStateSnapshot, ) -> Result<(), String>
Write a snapshot atomically: temp → fsync → rename → dir sync.