switch host state query to join test_runs and build_hosts via host id