[core] Constrain invoke_runtime parameter (#302)

* Constrain invoke_runtime parameter

* Change param to a reference

* Dangling type param
14 jobs for master
in 26 minutes and 9 seconds, using 0 compute credits, and was queued for 5 seconds