I agree with several others in this thread about the depth of Fredo's involvement in the assassination. I feel like, to whatever extent we can trust the film makers to have given us clues about how the attempted hit on Michael happened, it just has to be Fredo (or I suppose "his men", on Fredo's orders) who opened the drapes and later killed the two gunmen, however implausible that seems. And thus Fredo had to have known it was a hit. Any other theory would have to be invented out of whole cloth, based on nothing.