[WR WM] fix negotiate type logic and add tests