The connections on the stock alternator uses 1800's technology. It is simply the wires stripped back then wrapped around a tapered post, and the cover pushes them further into this position in an attempt to hold them there. In the decades of doing alternators for OEM's, I have never seen this, or would expect it to last. This connection point becomes loose, the resistance goes up, and then it becomes a heater, and melts. Lots of this exact failure posted here.
Alternator replacement for these range from $89 to $400 or even more. $89 is a yesterday technology Chinese Delco clone, and $400 is a 130a 24v modern replacement with temperature compensated voltage regulator, twin internal fans, high temp rated electronics, and a 200,000 mile rating. The stock alternators have this terrible connection system, inadequate cooling if really loaded up (especially at idle), and no fail safe on the remote sense wire. This allows the over-voltage situation to happen if the truck is shut off in the wrong sequence, and subsequent failire of your ABS module, possible PCB damage, CTIS freak-outs, all that. Best way to fix the stock alternator is to throw it in the dumpster. Retain the pulley when doing so. 2 of the 3 holes will line up on a civilian replacement, and a third will need a 2" long spacer pipe section for installation, or conversion over to the civilian bracket for the same engine.
Apology for the derail of a CTIS thread.