With default settings Foreman does not allow Puppet Agents to specify their own environment when connecting to the Puppetserver. This makes it impossible to use r10k and feature branch workflow like you can with a normal Puppetserver. This behavior can fortunately be reverted easily by modifying Foreman configuration file, /etc/foreman/settings.yaml:
# Allow testing feature branches on nodes :enc_environment: false
After modifying settings restart the webserver, e.g.
$ systemctl restart httpd
There is also a Foreman plugin called foreman_noenv which allows enabling agent-specified environments on a node-by-node basis. We have not yet tried how well it works.