harness: Implement handling of allocation queries.