pub fn select_declared_body(
contracts: &[DeployedWorkerContract],
action: &str,
run_version: Option<&ContentHash>,
) -> DeclaredBodyLookupExpand description
Resolve the body action runs, given every retained contract on the queue
and — when it could be named — the package version the dispatching run is
pinned to.
With run_version known, that version’s contract is the SOLE authority: if
it declares a body, that body runs; if it does not, the action belongs to an
out-of-band worker and the dispatch is delegated. Reading a body off any
other version would run a command the run’s own package never declared.