Record-breaking black hole flare traced to massive star’s destruction