In the same way that someone with chronic depression can still have days when they're happy, I can certainly still have days when I'm sad. I'd say it's much to a lesser degree though and I've almost never had negative emotions carry on to the following day.
Anger is pretty much non-existant for me. I had issues with a previous girlfriend because she felt I didn't care about her since I wouldn't get angry at things (she wanted to feel like I was willing to fight for her).
Boredom is inescapable. I'm as susceptible to that as anyone. I highly suspect that's just because we've tailored our existence around high information density activities in our web-based existence.
Code can be frustrating for sure, but I think I always know that when I am struggling with something, I'm learning from it and it makes me happy. When something REAL dumb happens, then really what can you do but laugh at it?
I agree with you about the evolution of it. I think the optimistic worldview is not advantageous in high risk environments. Along those lines as well I highly suspect that there are genetic components to my happiness. My father has a similar but not as exaggerated disposition. Things just really don't get us down that much. Here's one of my favorite pictures of him after our house burned down in the 2007 California wildfires: https://image.non.io/fire.webp