I think this should be your circuit.
When engine is stopped, the alternator indicator circuit is low (no voltage). When the Ignition is "on" and alternator is stopped, the indicator is "on" because current flows from battery, closed ignition switch, bulb, diode (with arrow) to ground by low at indicator connection. When car is started, alternator spins, and the current in the indicator circuit starts the regulator action. In most systems there is a delay, so the alternator does not load the starter motor, and avoid all the high current and voltage spikes. When the alternator puts out voltage the indicator circuit goes to high, so the bulb sees near zero voltage (voltage is the difference between each end) and is "out".
The run-on, is caused when the diode is not connected correctly, shorted, or another source of leakage powers the relay, after ignition switch is turned off. It can be a minor amount of leakage, since holding current for the relay is much lower than close current. A 25 mA leakage is also low enough to miss detection with test bulb, but enough to keep relay closed and engine running.
The leakage could even be in the alternator regulator, relay itself or accessory electronics equipment, or anything that connects both to battery and switch ignition circuit.