runIdForDeduplication string,
isReset bool,
// TODO (dan): This implementation is the result of unifying two previous implementations, one of which did
// deduplication. Can we always/never do this deduplication, or must it be decided by the caller?
isDuplicate := func(event *historypb.HistoryEvent) bool {
if runIdForDeduplication == "" {
return false