Some of the downgrade condition/trigger logic is wrong.
For example, <+codebase.commitRef> =~ "refs/heads/master" is not valid, it should be <+codebase.commitRef> == "refs/heads/master".
We need to investigate the correct condition and trigger logic.