Problem
When a microflow has sequential branch structures, the describer can pair an ExclusiveSplit with a downstream ExclusiveMerge instead of the merge where that split's branches actually reconverge.
That can make the generated MDL nest the first split's continuation inside the branch body. A describe/exec/describe cycle can then change the microflow structure even when the original graph was valid.
Expected behavior
Split/merge pairing should choose the nearest common merge reachable from all normal branch flows, not an arbitrary common downstream merge.
Notes
The bug is caused by selecting a common reachable merge from map iteration. The fix ranks common merge candidates by branch distance and uses deterministic tie-breaking.
Problem
When a microflow has sequential branch structures, the describer can pair an
ExclusiveSplitwith a downstreamExclusiveMergeinstead of the merge where that split's branches actually reconverge.That can make the generated MDL nest the first split's continuation inside the branch body. A describe/exec/describe cycle can then change the microflow structure even when the original graph was valid.
Expected behavior
Split/merge pairing should choose the nearest common merge reachable from all normal branch flows, not an arbitrary common downstream merge.
Notes
The bug is caused by selecting a common reachable merge from map iteration. The fix ranks common merge candidates by branch distance and uses deterministic tie-breaking.