Skip to content

Describer can pair a split with a downstream merge instead of the nearest merge #326

@hjotha

Description

@hjotha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions