discovered.hostgroup_id = <ID>

<... some time later >

new_host = discoverd.becomes(host:managed)
new_host.hostgroup --> the one you need?

it would be interesting to discuss if discovered might want to have another
stage where it can be mapped to a hostgroup (with belongs to).