If we write a custom fact with dots in names, we must use a string in Facter.add
Facter.add('my.custom.fact') do
has_weight(10_000)
setcode do
'my_custom_fact'
end
The result is
my.custom.fact => my_custom_fact
All examples in docs are with symbols as custom fact names (https://puppet.com/docs/facter/3.9/custom_facts.html)