In both cases I would say tests_passed is usually fine. You can avoid upgrade problems by having a staging environment and testing your releases prior to applying upgrades.
The issues you describe above more relate to your own release processes than a particular branch of Discourse.