So this abstract for AAAS’s current Science seems to imply:
Crocodiles and armadillos armor themselves in an exoskeleton of bony plates, but the turtle goes a step further with a shell that is anchored to its rib cage and spine, making it part of its internal skeleton. Just how the developing turtle embryo builds its fortress—a feat unique among vertebrates—is unclear. But two scenarios are now vying to explain this major evolutionary puzzle. Until recently, many biologists thought that the turtle shell takes shape from skin cells adjacent to the ribs that are transformed into bone in the course of development. But Japanese developmental biologists have now weighed in with a new scenario, in which the shell is a direct outgrowth of bones themselves. Researchers trying to reach consensus about how the shell develops have concluded that turtles may have more than one way to build a turtle shell.
The nice thing about convergent evolution is that they may all be right, each about his own species. The less nice thing about it for current Darwinian theory is that it is more consistent with guided evolution or some other teleological form.
Here’s one approach: