fix: suppress default anchor fragments in describe#321
Open
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Open
fix: suppress default anchor fragments in describe#321hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha wants to merge 2 commits intomendixlabs:mainfrom
Conversation
Symptom: microflow describe emitted explicit @anchor fragments for flows that used the MDL default connection sides, creating cosmetic drift in round-trip output. Root cause: anchor formatting printed every known from/to side even when the value matched the statement default: regular flows use right-to-left, true branches use right-to-left, and false branches use bottom-to-top. Fix: omit default anchor fragments and skip the annotation entirely when all sides are defaults, while preserving explicit non-default sides. Tests: added regression coverage for omitted regular and split defaults, and adjusted existing split-anchor tests to assert that non-default branch anchors are still emitted.
AI Code ReviewCritical IssuesNone Moderate IssuesNone Minor IssuesNone What Looks Good
RecommendationApprove the PR. The fix is correct, well-tested, and maintains backward compatibility for non-default cases while improving roundtrip fidelity by omitting semantically redundant default values. No changes requested. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Adds an MDL script under mdl-examples/bug-tests/ verifying that linear flows produce zero @anchor lines (all defaults) while non-default sides like `to: top` survive a describe → exec → describe cycle. 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 issue #320 by suppressing redundant default anchor fragments in DESCRIBE MICROFLOW output while preserving non-default annotations. The changes are minimal, well-tested, and maintain backward compatibility for cases where non-default anchors exist. All checklist items are satisfied for this bug fix. 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 #320.
Summary
DESCRIBE MICROFLOWnow omits anchor fragments when all emitted sides match the MDL defaults.Root cause
Anchor formatting printed every known
from/toside even when the side matched the statement default. These explicit defaults were semantically redundant and created cosmetic roundtrip drift.Fix
Suppress default fragments for regular flows and split branches. Non-default sides are still emitted.
This intentionally changes describe output for flows that only used default sides.
Tests
Added regression coverage for omitted defaults and non-default anchor preservation.
Validation
make buildmake testmake lint-gomake test-integrationAgentic Code Testing
Test plan