fix: preserve duplicate implicit output aliases#337
Open
hjotha wants to merge 1 commit intomendixlabs:mainfrom
Open
fix: preserve duplicate implicit output aliases#337hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha wants to merge 1 commit intomendixlabs:mainfrom
Conversation
Symptom: when a described microflow contained repeated implicit output variables at the same canvas position, rebuilding the MDL could reuse the first variable name for later activities and make downstream changes or returns point at the wrong object. Root cause: the builder tracked variable declarations by name only and did not distinguish same-position duplicate implicit outputs that need a deterministic local alias. Fix: record implicit output positions, assign numeric aliases such as `Foo_2` for same-position collisions, and resolve downstream variable references, attribute paths, change targets, and retrieve start variables through the active alias. Tests: added a builder regression for duplicate create-object outputs, added a doctype fixture, and documented the aliasing rule in the proposal index and quick reference.
AI Code ReviewWhat Looks Good
RecommendationApprove the PR. The changes are correct, well-tested, and properly documented. No blocking issues found. 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.
Summary
Preserves same-position duplicate implicit output variables by assigning deterministic local aliases such as
Foo_2and resolving downstream references to the active alias.Part of #332.
Changes
Validation
make buildmake lint-gomake test./bin/mxcli check mdl-examples/doctype-tests/variable_alias_collision.test.mdl