Records reveal the investigation was based on the thinnest of evidence, raising alarms over how the November election could be disrupted.