A planet is a body of size 8 or more, whatever it is made of. Worldgen makes planets melted and settled, with one layer per resource and the lightest outermost, so a planet's surface is light rock such as Carbon and Silicate and its metals lie deep.
A body's kind is checked again whenever a world event changes it.