Search backend: add alert as a return value to the job interface
Created by: camdencheek
With alerts being such a general bear to work with, I think expanding the job interface to return an alert is going to be the fastest way to keep converting search code to jobs.
That said, I don't love it. Alerts are intended to be user-facing, and building a user-facing thing into our backend interface is a bad split of responsibilities.
I think the ideal situation here would be to have a richer set of error types that are convertible to alerts outside of the job execution tree. However, this will take a great deal of work to get there, and we'll get more immediate value out of expanding jobs, so this is debt I'm willing to take on in return for the freedom it gives us to pay down other debt.