I think the key issue here isnt whether warranty covers aftermarket parts or not, or if the original dealer know or didnt know there was aftermarket modifications to the harness but the fact that the second dealer went ahead and performed customer pay work that apparently wasnt authorized as the OP brought the car in believing it was covered under warranty. This is the key issue of the whole story and the fulcrum on which everything rests.
It's not known if the OP brought the car in and told them to fix it thinking it would be covered under warranty or if he told them call me with the explanation of the problem and cost if it's not under warranty.
Either way I think the key issue is what all the warranty covers (electrical?) and whether or not the warranty covers aftermarket parts. The car only has 15000 miles on it so it is pretty much a new car.
I would be frustrated too but normally things that go wrong with cars are hardly ever covered under warranty. I think extended warranties are kind of a rip off but that's a whole different soap box.