What if you were friendly with your neighbor, but on the way to return a shovel you get hit by a bus?
Point being: you're dreaming up edge cases, presumably as a justification for... what? Refusing to engage with people who don't wear their political views like a badge on their chest?
If your stance honestly is "we cannot be friends unless I know your political views", then those who keep their views to themselves in the face of that are wise.
In my experience, yes, the irredeemable bigot is rare. For everyone else, regardless of whether their political views are unknown to you or they are threatening your personal way of life, the world will be a better place for you being good neighbors with them. Not to mention that it will improve your own living situation as well.
Most bigotry doesn't come from an inherent maliciousness or evil. It's often just limited experience and never having had reason to reflect on one's views. If you instinctively go "fuck off bigot", you're not only not helping, you're their mirror image.
To be clear, there's a point at which you have to be intolerant of intolerance, but starting off with that is not only counterproductive by reinforcing echo chambers and increasing division, it also makes you not unlike the thing you're opposed to.
Xenophobia and racial (or religious ) animus are hardly edge cases. On the contrary, they are the default setting for our species, as evidenced by (flips through history book) the last few millennia.
Bigotry is innate and one has to fight it. And that's exactly chmod775's point - stop being a bigot towards other people's reasonable opinions, stop being dramatic, stop making a mountain out of a molehill.
Point being: you're dreaming up edge cases, presumably as a justification for... what? Refusing to engage with people who don't wear their political views like a badge on their chest?
If your stance honestly is "we cannot be friends unless I know your political views", then those who keep their views to themselves in the face of that are wise.