Well first the key light is an anti-theft device and if it cant read the computer chip in the key then it will kill the engine and the light will stay on.
As for the cam shaft position sensor, if it didnt fix it, then that wasnt the problem. As for the dealer, I really dont know the policy for them fixing the wrong thing, I do everything myself for this exact reason, and if i dont know how, i figure it out.
Did the wiring harness fix the problem? If not, with your symptoms, it sounds like an alternator going, with the electrical problem on the dash, not starting, and rough running can all be because of the alt.