Add engine socket upgrade logic and test