WIP feature(gatekeepers): gatekeeper functions provide context to the forward hook

See #5792.