Does Stayman guarantee a 4-card major? It used to, but MIchael explains how you can use a particular Stayman sequence to show a problem hand. This is an agreement, but it's a common one for advanced players.
Michael explains this agreement and more advanced Stayman ideas in his Deep Dive after notrump series.