That was it! Thanks Dan!
But … its not a bug, its a feature
As you noted, specification states its undefined what happens then. Id say that doing ‘the right thing’ isn’t bad (not in general of undefined behavior, just this specific case), because comparison/non-comparison usage models are mutually exclusive. Ie the state of GL_TEXTURE_COMPARE_MODE has to be kept in sync with sampler type in shader. This is spec failure imo as this redundancy buys you nothing.