fix: do not emit annotations before unsupported-action comments#307
Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Open
fix: do not emit annotations before unsupported-action comments#307hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Conversation
When the describer falls back to a placeholder comment for an activity it does not know how to render, preceding `@position(...)`, `@anchor(...)`, or similar annotations become orphaned on re-execution. The grammar accepts annotations only as a prefix of a real microflow statement. A comment placeholder is intentionally not a statement target, so annotation-prefixed comments can fail to parse. Skip object annotations when the formatted statement begins with `--`. The unsupported placeholder remains visible in describe output, but the generated MDL stays parseable. Tests cover unsupported/comment activity output with preceding activity metadata.
AI Code ReviewWhat Looks Good
RecommendationApprove the PR. The fix is minimal, well-tested, and resolves the reported issue without introducing side effects or violating project conventions. No changes are needed. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Adds an MDL script under mdl-examples/bug-tests/ documenting the unsupported-activity comment regression and providing a positive-control microflow that exercises annotated supported activities. Pure MDL cannot create unsupported activities; the negative case is covered by the existing Go test TestTraverseFlow_UnsupportedActivitySkipsAnnotations. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor IssuesNone found. What Looks Good
RecommendationApprove. The PR correctly fixes the bug with appropriate tests, follows contribution guidelines, and maintains all project standards. No changes 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 #306.
Summary
Unsupported microflow activities are represented as comments in
DESCRIBE MICROFLOWoutput. This PR prevents activity annotations from being emitted before those comments, so the generated MDL remains parseable.Root cause
The describer emitted object annotations before every formatted activity result. For unsupported activity placeholders the formatted result starts with
--, leaving annotations orphaned because comments are not validmicroflowStatementtargets.Fix
When a formatted statement begins with a comment marker, emit only the comment and skip
emitObjectAnnotations.Tests
Added traversal coverage for unsupported/comment activity output with preceding activity metadata.
Validation
make buildmake testmake lint-gomake test-integrationAgentic Code Testing
Test plan