refactor commute to use patch actions for advancing
factor out common maybe_defrag logic