Skip to content

Duplicate microflow output checks should be scoped to exclusive control-flow paths #489

@hjotha

Description

@hjotha

Summary

mxcli check and describe microflow duplicate-output diagnostics currently treat output variable names as globally scoped across the entire microflow. That produces false positives for outputs declared in mutually exclusive branches where only one path can execute.

Expected behavior

Linear duplicate declarations should still fail or warn because both declarations can execute on the same path.

Outputs with the same name in sibling IF/ELSE or enum-split branches should not be reported as CE0111-style duplicates when those branches are mutually exclusive.

Actual behavior

The validation path accumulates branch declarations into one shared map, and the DESCRIBE warning path counts output names across the full object collection. Both checks can flag branch-local output variables as invalid even when each individual control-flow path is valid.

Proposed fix

Validate branch bodies with cloned variable scopes and make DESCRIBE duplicate-output warnings walk sequence-flow paths with path-local output state.

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