TLDR: I pushed (broken) functionality without approval that ended up being caught by QA, and my boss is (rightfully) upset. What should I do?
I work as a developer on a digital product.
Recently, under tight deadline, we submitted a build to be reviewed by our QA team, and a report came back last night that they found a bug in the product. This bug was functionality I added, without approval, as a test for a future version of the product.
I had put this functionality behind a sort of passcode that had to be entered by interacting with an in-product element in a certain sequence, with the assumption on my part being that only I would be able to trigger it, and no one else would see it. I later realized that the code I initially put in would actually trigger the unapproved functionality even if the sequence was included in a larger sequence, meaning a series of random interactions would have a possibility of triggering the funcionality (though I thought it would still be rare). I made a fix to only allow the precise sequence, but that code did not make it into the build sent out.
A few days after that (yesterday), after QA tested the product, they accidentally triggered the sequence and reported the resulting functionality as a bug. My boss showed it to our creative director, who was also able to trigger the functionality. He then spoke with me about the matter this morning.
When my boss spoke with me about this, he expressed several concerns:
- I added this functionality without seeking any approval
- I created a "fix" that did not remove the functionality
- In code commits I referenced it as being an "easter egg", implying the intent to push this live
- My functionality is both broken and off-brand
- This would have gone live if QA didn't catch it
- Our timeline (and related marketing/featuring opportunities - $$$) are jeopardized as a result of having to make another build now
- Extra QA costs are now necessary
- I wasted time that should have been spent on higher priority bugs and features
In addition to the above, he said he would now have to speak with his own boss to decide what they would do about the matter. As it turns out, he approached me shortly after, asking me if I would be able to make the smallest possible code change to remove the functionality, possibly being able to bypass a full QA sweep, and salvage our release window. I immediately pushed a one-line change that removed the functionality, showing him the code that I changed to do so. He thanked me, but I have not spoken to him since (earlier today).
Though I realize the error in my judgement now, at the time my actions were informed by this thinking: Unfortunately, many times my boss and director will see a partially-completed feature (by myself or another dev) or hear an idea described verbally, and reject the feature or functionality, due to what I feel is a lack of vision for what a feature could be in its final form. When I have instead taken the approach of presenting something more polished to them, it is nearly always approved. We recently discussed a feature like the one under question, and so I put in an hour of work to just get in the rough functionality, to use as a demonstration. I thought with my "passcode" wall, no one would accidentally see it.
I now realize how serious this could be. In the past, even if I worked on things so that I thought I could prove their worth, I always showed things I worked on and presented them for final approval, far before a final build. I realize I stepped over the line by allowing something to go live, even if I thought I was keeping anyone from seeing it accidentally.
I think this could be something my boss might fire me over. Though I am one of the stronger performers on the team, it might be that this breaking of trust is enough to warrant my termination.
I do not want to lose this job. I enjoy my work, it is challenging and creative, and I am grateful for the pay and flexibility. I sent a message to my boss apologizing, saying I realize the severity of my actions and that I broke trust and will never do something similar again, going off-spec without approval, etc. He has not responded yet.
Any advice as to what to do at this point would be greatly appreciated! Thanks in advance.