It would not be necessary to gradually replace the brain, nor any other parts of the connectome. If you agree that cognition is due to physical processes of the brain, then it is impossible that consciousness is anything more than very advanced logic. You could devise a situation in which a person is gradually converted into a robotic form, and another where he is simply replaced with a robotic clone, such that you would end up with the same exact logical brain(contained within the robot) in both cases. So, in this instance, where does cognition diverge? If the gradual replacement results in the continuation of the stream of consciousness, but the creation of a robotic copy does not, then why can't that difference be physically measured? Would you suggest a supernatural explanation? Or is the experience consciousness as shallow as the belief that it has been preserved (which I say it is)?