Repository navigation
Conversation
A bare `returns Module.Name` is recorded by the parser as an entity
reference. exec retried it as an enumeration for parameters but not for the
return types of a microflow, a nanoflow or a rule, so a script that
`check -p --references` accepted failed with "entity 'M.E' not found for
return type". For a rule, check refused it as well ("a rule must return a
Boolean or an enumeration, not Entity").
The three create handlers now resolve a return type through the helper the
parameter path uses (entity first, then enumeration), and the rule check
applies the same retyping before validateRule. The stored return type equals
the one `returns enum M.E` stores. An unknown name now reports "entity or
enumeration 'M.X' not found for return type".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AI Code ReviewWhat Looks Good
RecommendationApprove - The PR fully resolves the reported inconsistency between Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
ako
added a commit
to ako/mxcli
that referenced
this pull request
Oct 19, 2026
Integrate wave 1 of the upstream PRs (mendixlabs/mxcli mendixlabs#1574 mendixlabs#1575 mendixlabs#1572 mendixlabs#1570 mendixlabs#1563 mendixlabs#1561 mendixlabs#1568 mendixlabs#1566 #1368), with review follow-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiMsnXa9crge2qnSk9S7Zn
This branch has not been deployed
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 #1562.
What it fixes
returns Shop.Variant, whereShop.Variantis an enumeration, passedcheckbut failed inexecwithentity 'Shop.Variant' not found for return type. This happened for microflows, nanoflows and rules. Parameters already accepted the bare name, and so did theenum XandEnumeration(X)spellings. For rules,checkitself also refused the bare form, with "a rule must return a Boolean or an enumeration, not Entity".How
bareEnumerationType(cmd_microflows_helpers.go) is the parameter path's existing entity → enumeration fallback, pulled out into one helper.validate.goretypes a rule's bare return type throughdeclaredTypeResolver.bareEnumerationbeforevalidateRule. A name that resolves to nothing is reported as that.microflow-structure.md.findings/mdl-executor/, and the regression scriptmdl-examples/bug-tests/1562-enum-return-type.mdl.Evidence
enum_return_type_test.go(mock backend, real MDL) andenum_return_type_pedapp_test.go(PedApp fixture). For each of microflow, nanoflow and rule:enumandEnumeration(...)spellings;assertAgreecheck/exec parity test passes, with the enumeration both already in the project and created in the same script.enumspelling, with GUIDs and the name stripped.main, 24 subtests fail with the reported symptoms. All pass with the fix.check -p --references, thenexecfails.mdl 1;.describeprintsreturns enum Shop.Variant, and re-running the describe output reports "Unchanged".returns Booleanmicroflow goes through the splice path.mx checkreports 0 errors.go test ./mdl/executor/shows the same 28 pre-existing failures asmain, and the diff of the two failure lists is empty.golang:1.26.6-bookworm, ANTLR 4.13.2):make grammar build test check-mdl check-findings check-conformance check-migration-reference lint-goall pass.Not in this PR
Java actions have the same ambiguity, and it fails later there.
create java action … (v: Shop.Variant) returns Shop.Variantexecs, but thenmx checkreports CE1613, "selected entity no longer exists". Separately,list of Shop.Variantas a parameter is silently stored as a scalar enumeration. That is pre-existing behaviour on the parameter path, which this PR leaves alone.🤖 Generated with Claude Code