sophia: add planner branch min-lsn condition