> I suspect it’s the same quality of thought that can’t fathom that a test could have a bug.
I have to admit that I often find it funny when some talk about unit tests being the end of all. No manual QA needed, no staging needed, tests passed and everything is good to roll to production.
Unit tests are important, no question but it’s still a piece of code which could have bugs or not enough scenarios covered.
Implementing a flag takes fewer lines of code than the feature, and so while the odds are very high that the bug will be within a feature, there is a non zero chance that the bug is in the flag.
A bug might break a new feature. It might break the old behavior. It may turn the system into a latch (you can launch it darkly, turn it on, and then not be able to turn it off).
And then you can break the system while retiring the flag and making the new path permanent.