When evaluating classes from an external node classifier, Puppet evaluates the set of those declared without parameters prior to the set of those declared with class parameters. This is a problem because this ordering causes "Error: Duplicate declaration" more commonly. In addition, the behavior is in contradiction to the code comment of, "This means classes with an empty set of parameters won't conflict even if the class has already been included."
The following manifest behavior as it maps to ENC behavior illustrates the bug:
It is common to write something like the following Puppet manifest:
Which produces the following error:
However, changing the order of the class declarations avoids the error:
As it relates to node classification, the following code is the equivalent of the first Puppet manifest, which produces errors. The expected behavior is to match that of the second manifest, which does not produce errors: