So I sent in my ralts against a geodude which had sturdy. Ralts traced it, but geodude one shot it with rock tomb. Doesn't sturdy negate this?
Prior to Gen V, Sturdy only protected the Pokémon from OHKO moves like Horn Drill and Guillotine. It was later changed to the way it is today, where it survives all attacks as long as the Pokémon is at maximum health.
Source