What if the solver both fails to find a counterexample and fails to conclude there isn't one? (i.e. it times out)
Either way, you’re still forced to consider if the model can return sat or unsat, or a timeout. If it’s a timeout we don’t swap in the faster code, if it’s unsat then same deal, but if it’s sat we can get some new code to jump to
If this is a production model for the cloud, the engineer should have put some thought into the encoding as to express sat/unsat clearly, if possible.
In the general case, sure, to some extent one can construct an adversarial example just as with NN (random 3-sat hardness cliff). Real world formulations of problems are either nice or atrocious IME, discoverable at dev time.