If. I. Turn. The. Knob. Slowly. Then. It. Works. Fine.
Because we’ll get an interrupt for each click in either direction, we can’t simply look at the B input to tell which way the knob is turning.
Even if you RTFM, apply painstaking logic, and wire very carefully, there’s a 50% chance that the knob will turn the wrong way.