refactor: collapse free annotation AST state#450
Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Open
refactor: collapse free annotation AST state#450hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Conversation
Symptom: ActivityAnnotations stored both FreeAnnotation and FreeAnnotations, creating a duplicated state invariant that tests and future code could accidentally violate. Root cause: the single-value field was kept as a convenience alias after multi-free-annotation support was added, so builder code needed a dedup helper solely to reconcile both fields. Fix: keep only FreeAnnotations, update visitor and builder paths to pass that slice directly, and add a bug-test script documenting the expected free-annotation roundtrip shape. Tests: ran make build, mxcli check for the new bug-test MDL file, focused visitor/executor free-annotation tests, make test, and make lint-go.
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.
Closes #449.
Summary
ActivityAnnotations.FreeAnnotationfield.FreeAnnotations []stringas the single source of truth in visitor and builder code.Validation
make build./bin/mxcli check mdl-examples/bug-tests/free-annotation-roundtrip.mdlgo test ./mdl/visitor ./mdl/executor -run 'FreeAnnotation|AnnotationsBeforePosition|AnnotationAfterPosition' -vmake testmake lint-go