Degradation of greater than 40% of capacity would trigger a replacement within warranty period, well that is what was stated when I bought the car. I haven't paid attention if that language has changed since then, I have a 2017.
I'm not sure of what, when it comes to cell malfunctions/failures would trigger it. I would assume if you can show there are battery cell failures they would have to replace the entire thing unless they are able to and ok with just replacing the failed cells.