I'm looking for a short (which I'm fairly sure I read online rather than on paper) which has as its premise that an alien civilization observing humanity thought Star Trek was real rather than fictional, and based on humanity's behaviour and what they saw as hypocrisy (e.g. "you pay no regard to your own Prime Directive"), decide to
destroy the Earth with a dinosaur-plus-plus-sized asteroid.
The narrator is an astronaut in a solo vessel who tells how
he is now the last human alive and has been profusely apologized to by said aliens, which isn't much consolation.
I might have elaborated some details from imagination / memory, but the core plot is right I'm sure.
Would be grateful for any thoughts. For context, I was reminded of this by this post on reddit, on reading which I thought "well I've definitely read something a bit like that", then couldn't remember what...