[EDIT: this question is about life on Earth surviving, not the physical destruction of the planet]
Could the Earth survive a gamma ray burst if that burst occurred in our galaxy and the Earth is in the Sun's shadow?
The main factors of that question are: if the Sun is massive enough to block it and if the burst is of short enough duration that the Earth will be in the Sun's shadow long enough.
The gamma ray burst took place at least 1000 years ago so there will be no records of the incident. The source does not need to conform to any known massive stars.
Also, Venus will be in conjunction with the Earth so I don't have to explain why it kept its atmosphere.
The only restriction on the source of the gamma ray burst is that it needs to be from within our galaxy and, likely, on this side of the galactic bulge (since I can't see much of the burst's energy getting though that thick star soup).
This is the first in a series of questions to see if the setting I'm creating gets past the sniff test. I have a number of questions along these lines but if the answer here in no, then it's back to the drawing board.