Skip to content

Pull#531

Merged
ako merged 2 commits intomainfrom
pull
May 8, 2026
Merged

Pull#531
ako merged 2 commits intomainfrom
pull

Conversation

@ako
Copy link
Copy Markdown
Collaborator

@ako ako commented May 8, 2026

No description provided.

ako and others added 2 commits May 8, 2026 10:00
…e boundary (#528)

When a nested ExclusiveSplit inside traverseFlowUntilMerge matched the
guard pattern (true branch terminates, false branch looks like continuation),
the guard continuation code would "skip through" any ExclusiveMerge on the
false path.  If that merge happened to be the outer mergeID, activities
after the merge were traversed and marked visited inside the then-block —
leaving nothing for continueAfterSplitJoin to emit after `end if;`.

Fix: add `if contID != mergeID` before the skip-through so the guard
continuation never crosses the outer merge boundary.  Activities that
follow the outer merge are now correctly emitted outside the if block.

Regression test: TestTraverseFlow_Issue528_NestedGuardDoesNotSwallowSharedActivities

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…079)

When exactly one non-split branch continues and the rest terminate,
the builder was wiring the parent's next statement directly to the
continuing branch tail and skipping the ExclusiveMerge. Studio Pro
raised CE0079 on terminating branches because they had no merge to
converge on.

Fix: always emit ExclusiveMerge when any branch continues, mirroring
the invariant addEnumSplit already enforces.

Also adds:
- TestInheritanceSplitAlwaysEmitsMergeWhenBranchContinues
- TestValidateMicroflowReferences_DescendsIntoEnumSplitCases regression test
- mdl-examples/bug-tests/475-inheritance-split-continuing-branch-merge.mdl
- cast roundtrip warning in write-microflows.md

Closes #475

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ako ako merged commit ad864b0 into main May 8, 2026
4 of 6 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

AI Code Review

Critical Issues

None found.

Moderate Issues

None found.

Minor Issues

  • The PR title "Pull" and empty body don't follow contributing guidelines (should reference an issue and describe the changes). However, since we're reviewing the substance, this is more of a process issue than a code issue.
  • In mdl/executor/cmd_microflows_builder_actions.go, the removed code block had inconsistent indentation (mixing spaces and tabs visible in the diff), but this is likely just a display artifact of the diff tool since the surrounding code uses spaces consistently.

What Looks Good

  • Bug fixes: The PR correctly addresses two specific microflow issues (fix: always emit merge for continuing inheritance split branches (CE0079) #475 and Microflow MDL extraction is faulty #528) with clear root cause analysis and solutions.
  • Test coverage: Excellent addition of bug test files (mdl-examples/bug-tests/) plus unit tests that validate the fixes:
    • Inheritance split merge test ensures ExclusiveMerge is always emitted when branches continue
    • Traverse test verifies shared activities aren't swallowed by nested guards
    • Reference validation tests ensure enum split case/else bodies are properly walked
  • Documentation: Updates to .claude/skills/ files properly document the fixes and clarify MDL behavior (cast statement).
  • Code quality:
    • Removes problematic "no-merge shortcut" optimization that caused incorrect control flow
    • Adds clear guard condition with explanatory comment in traverseFlowUntilMerge
    • Changes are focused and minimal - only touching the specific logic that was faulty
    • Fixes align with existing patterns (matches how addEnumSplit already works)
  • Full-stack appropriateness: Since these are bug fixes to existing MDL behavior (not new syntax/features), the changes appropriately live in the executor and test layers without needing grammar/AST modifications.

Recommendation

Approve. The PR fixes two specific microflow bugs with appropriate test coverage, documentation updates, and clean code changes. The fixes are well-justified, minimally invasive, and follow existing patterns in the codebase. No checklist violations were found for this type of bug fix PR.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant