I agree that the logic works, but that the LED bit doesn't. When rjenkinsg says "no output from D4", he means that it stays high the whole time. If R7 and VL1 were removed, the circuit would work quite well, with VL2 lighting 1/6th of the time at mains frequency with one rotation, and not at all with the other rotation. The output of D4 would be kept at a high voltage all the time by transistor V, but that wouldn't actually matter. Transistor V would be turned on when the output of D4 tries to go low, and not when the output doesn't try to go low, so the circuit would work.
R7 and VL1 were probably an attempt to make the circuit have one light for one direction, and another for the other direction. However, that won't work as the output of D4 is high all the time with one direction, and high for 5/6 of the time with the other direction, and turning on a light when it is high will result in the light being nearly the same brightness whatever.
There are other things to be aware of if trying to make this circuit. The 12 V supply means that the logic gates need to be work at 12 V, so the obvious choice is a CD4011.
https://www.ti.com/lit/ds/symlink/cd4011b.pdf
The negative of the supply has to be connected to the neutral of the incoming supply, so the whole circuit should be treated as being possibly at mains voltage for safety reasons. The zener diodes have to keep the voltage down to a voltage that the logic gates can survive, and the 68 kOhm resistors will produce about 0.5 W of heat each, on a 230 V supply, so you need resistors rated to 1 W or more, and they will get hot.
You could power the circuit from the supply that you are sensing. I've added some components to show how that can be done. It's still all possibly at mains voltage. VS1 - VS3 should be 10 or 12 V, the additional diodes should be the same types as VD1 - VD3 and the capacitor should be 16 V or more, and 100 uF or more. I suggest you increase R8 as I have put in the diagram.