So the issue here is the codeshare, eg, UA5000 operated by OS6000. The united booking is in class S, however the milage credit will be based on the OS flight class <?>.
The issue being that it is unclear which OS class will be used. It could very well be S, however it may also be something totally different.
As far as I know there is no reliable way to figure this out. It is one of the main downsides of how *A works. I believe there is a (user-maintained) website that contains some mappings, based in previous experiences. However that/those sites may not be up to date, and the result will definitely not be guaranteed.
Best thing to do is to call UA. They should be able to tell you what their S class maps into for OS flights.