FACT-2666 added a Facter.load_external method which puppet checks to enable/disable external fact loading. The method was added to facter 3, but doesn't exist in facter 4, so puppet doesn't disable external fact loading.
# rpm -qa | grep puppet
puppet-agent-7.0.0-1.el8.x86_64
# cat /opt/puppetlabs/facter/facts.d/slow.sh
#!/bin/sh
>&2 echo "this is slow"
# chmod u+x /opt/puppetlabs/facter/facts.d/slow.sh
# puppet lookup --node notme key
Warning: Facter: Command /opt/puppetlabs/facter/facts.d/slow.sh completed with the following stderr message: this is slow
This wasn't noticed in tests, because we don't verify partial doubles: https://github.com/puppetlabs/puppet/blob/29a737f765d94bfb30bdb3d89c55e54edfcc16b9/spec/integration/application/lookup_spec.rb#L101-L102
Add acceptance test for the new API