flush

suspend fun flush(handler: suspend (QueuedMutation) -> AppResult<Unit>): FlushReport

Attempts to flush every pending mutation sequentially through handler.

Releases the queue state mutex around handler I/O so concurrent enqueues remain unblocked, immediately dequeues and persists each succeeded item to prevent duplicate replay on mid-flush cancellation, stops without consuming retries on OfflineError, and drops non-retryable ValidationError items immediately.