It can be hard to judge how far rusted through it can be, but surface rust is just that and shows. When you see big rotten looking areas, especially under the rimstrap and bead areas (often from sitting while stored and the tires go flat, letting in moisture) there are pretty well on their way out. Sometimes you can wire brush them out and probe in the deeper pits with something like an icepick (icepick?, whats that?). If things seem pretty solid use a couple of coats of some rust neutralizer on the spots and a new rimstrap. The old cotton rimstraps seemed bad for this, holding moisture/staying damp and letting rust grow. If you save a rim this way it will probably last, at least, your lifetime given good care and storage.