If I buy a ticket from United Airlines, I don't care if they contract it out or code share things with some other company. Your ticket is with one company. It's their responsibility to hold another / the contracted company accountable, not yours.
In a codeshare dispute, both airlines will blame each other, but it is important to focus all your efforts on the ticket seller.