NOTE: It’s best if you make this as the cake bakes, to make use of the time and have fresh compote ready. However it can be made 3 days ahead.
Grate zest from both oranges into a non-reactive saucepan. Set pan aside. Using a sharp paring knife, cut off peel and white pith from both oranges. Working over the pan, cut between the membranes to release orange segments into the pan.
Then add cranberries, syrup, juice and vanilla. Cook over medium heat, stirring occasionally, until cranberries have burst and sauce has thickened, 5-10 minutes. Chill until cold.
If making ahead, store sauce in a glass bowl, covered with plastic wrap. Return to room temperature before serving.