Situation: You have two resource types of the same name provided by two different modules. You revert your code to remove the newest of the modules, which supplies the newest of the two types.
Expectation: puppet generate types updates to the older of the two types.
Behavior: puppet generate types uses the version with the newest timestamp, potentially causing hard to diagnose catalog errors when your repository's code is correct. The only solution ends up manually removing the newer file through /etc/puppetlabs/code-staging/*/production/.resource_types/ and re-running a code deploy/type regen.
The relevant code that determines whether the type needs to be regenerated can be found here:
1) Replace the timestamp logic and instead pass along `git diff` information
2) Add the --force flag to the generate types script to skip the timestamp check:
Such as from the following behavior: