fix: preserve microflow-call BSON field order#342
Open
hjotha wants to merge 1 commit intomendixlabs:mainfrom
Open
fix: preserve microflow-call BSON field order#342hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha wants to merge 1 commit intomendixlabs:mainfrom
Conversation
Symptom: rebuilding a microflow call with parameter mappings could produce an MPR that Studio Pro reported as CE0117 expression errors on the call activity even though the textual MDL roundtripped unchanged. Root cause: the writer emitted MicroflowCallAction and nested MicroflowCall fields in an order that differs from the shape Studio Pro writes for this model version. The parameter mapping also placed Parameter before Argument. Fix: emit the nested MicroflowCall before result-variable fields, place ParameterMappings before QueueSettings, and write each MicroflowCallParameterMapping as Argument then Parameter. Tests: add a BSON-level writer regression test with generic microflow names that asserts the stable field order for the action, nested call, and parameter mapping.
AI Code ReviewCritical IssuesNone Moderate IssuesNone Minor IssuesNone What Looks Good
RecommendationApprove. The PR correctly fixes a BSON serialization order bug with appropriate test coverage and follows the project's patterns. No changes are needed. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
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
MicroflowCallActionwith nestedMicroflowCallbefore result-variable fieldsMicroflowCall.ParameterMappingsbeforeQueueSettingsArgumentthenParameterWhy
A microflow call can roundtrip MDL text unchanged but still become invalid in Studio Pro validation if the BSON shape differs from Studio Pro's expected field order. The observed failure is CE0117 on the call activity.
Validation
make buildmake lint-gomake testCloses #341.
Related to #332.