There is a small flaw here (isAdjacentOperation and also isSameDirectionOfTravel) with things happening around annotations, no? E.g. first delete first char of annotation/comment text, than first char before the annotated range. These would be seen as adjacent if I got things right.
Might not happen in real life currently, as the user needs to move the cursor between those ops. But could in theory happen with generated code. Might be worth a comment here.