If a critical pipeline fails halfway through execution, how do you ensure data consistency and idempotency upon retry?