prepare_operation_cost(
state: CostState,
thread_id: str,
) -> PreparedOperationCostPrice model calls made by a server operation without committing them.
The caller must persist PreparedOperationCost.update atomically with the
operation state, or call rollback() if that write fails or is abandoned.
A prepare with a zero delta still consumes its records, so an abandoned
prepare must roll back even when it has nothing to write.