Mayor McDonough, the mayor of Diamond City, expelled all of the ghouls and synths (except Valentine) from Diamond City.
However, we know that from his
brother's comments as a companion, Mayor McDonough appeared "different" when he expelled the ghouls and synths. The wikia article states that it is unknown when he was replaced by the synth.
Was Mayor McDonough already
a synth in the service of the Institute
by the time he issued the banishing edict?