Omg! Who the hell cares if the "boss" got a heads up. When I'm in engineering or you're in engineering with me, we party the same way: better is better.
The bosses - hell management's job leading into organizational culture - is to stop politics from derailing good engineering and customer satisfaction.
It's not too tough for me. Now that you know where I stand the other side better get it's act together.
Drowning in politics helps nobody including the boss. It's a net loser.
Now I'm practical and empathetic: a surprise can bring heat. But then you breath and get a grip. Cool. But thereafter the right things better get done. Politics for a day - np - politics sapping know how making cynical SE'S think twice? Never.
I learned a lot from that job, mostly how not to lead people. Subsequent jobs that I’ve been at for longer stints have placed much more emphasis on delivering good work than on building complicated plans to someday hopefully maybe consider delivering good work.