if err := def.CherryPick(mutableState.HSM(), event, resetReapplyExcludeTypes); err != nil {
switch {
// The op isn't in the HSM tree. It may live in the CHASM tree instead, so fall back.
return cherryPickFallback, nil
case errors.Is(err, hsm.ErrNotCherryPickable), errors.Is(err, hsm.ErrInvalidTransition):
// Recognized by HSM but intentionally not cherry-pickable here; skip without falling back.