Things like motherboards provide a good model for generalised "self-repairing" technology.
A set of replaceable modules, each capable of having its fault state diagnosed, so only the faulty module needs to be swapped.
The modules themselves could also be like this, so only sub-sub-components need changing.