fix: honor branch anchor destination on split-to-merge flows#311
Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Open
fix: honor branch anchor destination on split-to-merge flows#311hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Conversation
Branch-level `@anchor(... true: (...), false: (...))` metadata must preserve both the origin and destination sides for direct split-to-merge shortcut flows. The builder applied only the branch origin side in several shortcut paths. With no destination override, the flow fell back to the default destination side and the next describe changed the branch anchor. Pass the same branch anchor as both origin and destination override for split-to-merge shortcuts, matching the existing behavior for branches that have a first statement. Tests cover true and false branch destination sides surviving a builder roundtrip.
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor IssuesNone found. What Looks Good
RecommendationApprove the PR. The fix is correct, well-tested, and follows project conventions. No changes are needed. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Adds an MDL script under mdl-examples/bug-tests/ exercising IF-without-else and IF-with-empty-then patterns where the branch anchor `to:` side must survive a describe → exec → describe cycle. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AI Code ReviewCritical Issues
Moderate Issues
Minor Issues
What Looks Good
RecommendationApprove - The PR is ready for merging. It correctly fixes the reported issue with appropriate test coverage and follows all project guidelines. No changes are needed. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
29 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #332.
Fixes #310.
Summary
IF branch anchors on direct split-to-merge flows preserved the branch origin side but dropped the branch destination side.
Root cause
Several split-to-merge shortcuts called
applyUserAnchorswith the branch anchor as the origin override andnilas the destination override. That let the default destination side replace the user-provided branchtoside.Fix
Use the branch anchor for both origin and destination overrides in the split-to-merge shortcut paths, matching the existing behavior for branches with a first statement.
Tests
Added focused builder coverage for branch destination anchors on split-to-merge flows.
Validation
make buildmake testmake lint-gomake test-integrationAgentic Code Testing
Test plan