Short pulses are the trick. Long enough to measure the resultant pulse of current, but too short to have any mechanical effect. On the order of milliseconds. If the wiring or solenoid are open circuit, then there would be no current signal.
Short circuits would be slightly trickier to distinguish. Calibration may be required. Software could self-calibrate with each normal operation, if the system is in regular use. This is called 'health monitoring' in general. The system pays attention to the details of the voltages and currents, and advises of any changes. If the linkage needs lubrication, ideally it should notice.
If this is a very critical system and worth the expense, then map out a complete list of all imaginable failures. Then see if they can be distinguished in advance. Probably need to add sensors, and redundant or interlocked actuators.
Interlocked would be that it requires both A and B. Each can be actuated individually and confirmed to work (with a sensor), but the system is only triggered with both A and B actuated at the same time. Just leaves software bugs as probably the only remaining failure mode. Of course, software never goes wrong, LOL.
This type of safety critical design is not uncommon. History of Apollo spacecraft has many examples of this sort of failure resistant or fail-safe design concepts. Same thing in nuclear reactors, based on books I've read. Aircraft too.