While there is surely a policy about this, IMO the administration of upgrades, for the most part, has become completely anarchical. I have been on several oversold flights, and seen people upgraded that were lower priority to me. In one case, a basic member who was travelling with me.