Hard to imagine how the tool and work on a lathe could be at a different potential but that seems to be what happened.
If you have a multimeter check for electrical continuity between all the metal parts of the lathe back to the earth pin on the plug. Everything should be the same low resistance to earth.
Older lathes may rely entirely on being bolted together to provide an electrical earth and perhaps over time corrosion or oil somehow formed an insulating layer. Modern lathes are explicitly earthed. All the main parts of my Chinese lathe are interconnected with earth wires BUT these could conceivably come loose or be broken. So in both old and new lathes it's possible one part of the lathe might get to float electrically above above the rest. Very unlikely I would think, but not impossible.
Another thing to check is where the unwanted power came from. Natural to assume it came out of the wall-socket in the normal way and the blown fuse suggests that's the case, but worth making sure nothing else in the workshop could have earthed itself via the lathe. Not, for example, a good idea to earth a welder via the body of a machine tool!
If the phenomenon was caused by lightning, a power surge, or a neutral or earth fault on the supply side you were lucky the electronics survived!
I quite like the swarf inside theory combined with an earth fault. If a bit of swarf shorted out the mains input to the headstock ( and disappeared in the process), AND the headstock ISN'T properly electrically bonded to the bed, AND the bed IS correctly earthed then a blue flash at the tool would be possible.
Very odd though.
Dave
PS I see Keith did a multimeter test while I was dithering. To prove my theory, he should have found differences. Ho hum , wrong again…
Edited By SillyOldDuffer on 13/08/2019 10:45:14