feat: support ellipsis placeholder expression#336
feat: support ellipsis placeholder expression#336hjotha wants to merge 3 commits intomendixlabs:mainfrom
Conversation
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove. The PR thoroughly implements the ellipsis placeholder feature following all project guidelines, with proper documentation, test coverage, and full-stack implementation. The minor concern about visitor logic is likely addressed in the generated or omitted code sections given the passing tests and explicit documentation of the AST behavior. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Symptom: microflow Java action parameters with an empty BasicCodeActionParameterValue could not be represented in MDL, so describe/exec round-trips had to either invent a value or fail to parse the generated source. Root cause: the expression grammar had no placeholder expression that could carry an intentionally unbound code-action argument through the parser and builder. Fix: add an ellipsis source expression, emit it for `...`, preserve it through expression formatting, and map it back to an empty BasicCodeActionParameterValue for Java action arguments. Tests: added parser/visitor coverage, builder coverage for placeholder Java action arguments, an MDL doctype fixture, and validation docs for the new syntax.
Symptom: Java actions with microflow-typed parameters roundtripped placeholder arguments as basic empty expressions, which Studio Pro reported as stale Java action arguments. Root cause: the SDK/parser/writer did not model Microflows$MicroflowParameterValue, and the builder treated all ellipsis placeholders as BasicCodeActionParameterValue. Fix: add MicroflowParameterValue support end-to-end and emit it for Java action parameters whose definition is MicroflowType, keeping ellipsis as an empty microflow reference. Tests: added builder and parser regressions and ran make test.
b8ee049 to
a8dee83
Compare
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove the PR. The implementation correctly addresses the need to preserve round-trip symmetry for unbound Java action parameters, follows all required architectural patterns, includes comprehensive tests, and provides appropriate documentation. The minor concerns about LSP/VS Code extension are unlikely to impact functionality given the nature of the feature as an expression placeholder that doesn't introduce new language constructs requiring special editor support. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Summary
Adds
...as a microflow expression placeholder for intentionally unbound code-action parameters. This letsdescribeoutput preserve emptyBasicCodeActionParameterValuebindings and letsexecwrite them back without inventing synthetic expression values.Part of #332.
Changes
ELLIPSISto the MDL grammar and preserves it as a source expression....back to empty basic code-action parameter values.Validation
make buildmake lint-gomake test./bin/mxcli check mdl-examples/doctype-tests/ellipsis_placeholder.test.mdl