That sounds pretty strange. And you have run your YZ for quite a number of hours after doing all the WR parts swap, correct? Gary, from what I recall, testing the coil is easy (resistance test) via the manual using a meter. I think the CDI was sort of a process of elimination after you have checked a boatload of other things and then the manual says to just replace it. Hopefully there is a better way for that. If the battery was fully charged and you did not have the lights on, even with no charge going to the battery, the bike should have spark for quite some time. Certainly more than 5 minutes. And I think you said in another post that you could let it sit a while and it would run fine for another 5 minutes or so. I would think that would pretty much rule out the battery. What happened to my bike when it started to drain the battery with the blue wire connected was it started to miss really bad. It did not just instantly die, but rather ran extremely ratty going down the trail until I shut the light off and then it was back to normal.
I'm going to steal a cdi from a friends bike and try that. I did have a cdi go out on a 06yz450. It had similiar symtoms.