I did the Battle of Bunker Hill last night. There will be some spoilers ahead regarding this battle and the story leading up to it.
Even after reading the wiki article on this quest, I'm a bit confused.
I already felt like something was going wrong with my faction associations, as Sturges never analyzed the data I brought back from the Institute, and I no longer had the option to tell Father "No" after looking around the facility and finding ample evidence of casual evil, but instead had to accept a quest: Synth Retention.
After getting the Battle of Bunker Hill quest, I immediately went to inform the Railroad, but they wouldn't let me tell them anything because they wanted me to work for them instead of the Minutemen. Eventually I just gave up and said I'd side with the Railroad so I could inform them about the attack.
I then went to Bunker Hill, expecting to escort the courser inside where we would ambush and kill him, as well as my escort. There didn't appear to be an escort. As the courser and I were walking toward town, the Brotherhood showed up in their flying death ships. The courser decided he needed to fight them instead of go inside, so I just shrugged my shoulders and killed him there. There were still synths everywhere, and I knew I was supposed to kill all the Institute attackers, per Desdemona, so I started killing them. They didn't shoot back.
In fact, there were four factions fighting, and none of them were trying to kill me. The Brotherhood, Institute, Railroad, and Bunker Hill all had soldiers killing the other factions, but nobody would shoot at me even if I shot at them. All the synths just let me shoot them in the back. When I got inside to check on the escaped synths, the Railroad and Brotherhood ignored me, but the turrets attacked me.
Were the factions supposed to ignore me like that? Did I do something wrong or unexpected?