Skip to content

fix: correct microflow body syntax in bug-test 258#270

Open
hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha:fix/258-bugtest-syntax
Open

fix: correct microflow body syntax in bug-test 258#270
hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha:fix/258-bugtest-syntax

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 23, 2026

Summary

The bug-test script that shipped with #258 (mdl-examples/bug-tests/258-drop-create-microflow-unitid-preservation.mdl) used the legacy paren-body microflow form:

create microflow BugTest258.MF_Original
    returns string
(
    set $return = 'original'
);

The current MDL parser only accepts the begin ... end; form — the script fails mxcli check before it can ever be executed. Script is defanged as a regression artifact until the body is fixed.

This PR rewrites the two microflows with the begin/end form so the script parses. The functional payload — DROP MICROFLOW, then CREATE OR MODIFY MICROFLOW with the same qualified name to exercise UnitID preservation, then DESCRIBE to verify the roundtrip — is unchanged.

Test plan

  • mxcli check mdl-examples/bug-tests/258-drop-create-microflow-unitid-preservation.mdl reports Syntax OK (5 statements).
  • go build ./... && go test ./... pass.

The bug-test script shipped with PR mendixlabs#258 used the old paren-body microflow
form ('create microflow X returns Y (...)'), which the current MDL parser
rejects. Studio Pro verification via 'mxcli check' fails before the script
can even be executed.

Rewrite the two microflows with the begin/end form so the script round-trips
through check + exec. Functional payload (DROP + CREATE OR MODIFY with the
same qualified name + DESCRIBE roundtrip) is unchanged.

Verified: 'mxcli check mdl-examples/bug-tests/258-drop-create-microflow-unitid-preservation.mdl'
reports 'Syntax OK (5 statements)'.
@github-actions
Copy link
Copy Markdown

AI Code Review

What Looks Good

  • The PR correctly updates the bug-test script to use the current MDL microflow syntax (begin ... end form) that the parser accepts.
  • The functional payload (DROP/CREATE OR MODIFY/DESCRIBE for UnitID preservation testing) remains unchanged.
  • Test plan verification passes: mxcli check reports "Syntax OK (5 statements)" and go build/test succeed.
  • The change is scoped to a single concern: fixing syntax in a regression test to make it executable.
  • Both microflows are updated consistently to the new form.

Recommendation

Approve the PR. The changes are minimal, targeted, and restore the bug-test script to a working state without altering its intended purpose. No checklist violations are identified.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants