Skip to content

Sync ako/mxcli: MDL113-116 from the parity sweep; microflow note links and enumeration page parameters round-trip; Data Grid 2 rebinding; OData navigation names - #1990

Merged
ako merged 24 commits into
mendixlabs:mainfrom
ako:main
Nov 30, 2026

Conversation

@ako

@ako ako commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into upstream: 12 commits since the last sync (#1985) — microflow note links and enumeration page parameters that now round-trip, two fixes for things mx check refused after a clean exec (Data Grid 2 columns, OData navigation associations), four new checks from the check-gap parity sweep (MDL113–MDL116), and a decision-caption check.

Fixes #1982.

Microflows

  • Note links to the start event or to another note round-trip (Annotation links to start event and to other notes are lost in MDL #1982). MDL had no way to state them: a link to the start event was described with a warning and dropped on re-exec, and one to another note was dropped silently. @annotation(… link: start) and @annotation(… link: n1) now state the line on its origin note, a target may be declared further down, and check refuses a link to an undeclared note.
  • MDL-CAPTION01 (info) flags a decision captioned with its whole condition. An if with no @caption is captioned with its condition, which Studio Pro draws inside the diamond, so a compound one wraps mid-token and repeats the Expression field. Reported for an if/elsif whose condition joins tests with and/or or is longer than 40 characters; @caption '' and short single tests are not. Lint CONV012 reports the same on stored decisions.

Pages

  • Enumeration-typed page and snippet parameters. $Status: Enumeration(Module.Status) was resolved as an entity ("entity not found"), and describe printed a stored one as the raw DataTypes$EnumerationType, which does not re-parse. It is now written as Studio Pro's Enumeration parameter type, described as Enumeration(Module.Name), and an unknown enumeration is refused.
  • Data Grid 2 columns are rebound when the data source's entity changes. Rewriting a grid in place after its microflow was changed to return another entity kept every column bound to the old one (CE7247), and re-running the script printed "Unchanged page". A value bound to the data source is now kept only while the entities it names still match.

Integrations

  • create external entities names navigation associations apart from entities, and maps hand-made ones. A navigation property season beside an entity Season gave an association named season, which mx check refuses (CE0065: names are compared without regard to case); it is now Race_season. An association the user made in its place (CE6597) is mapped to the navigation property when it is the only navigation between the two entities, instead of a second one being added on every import.

New checks for build errors that passed check and exec

From the check-gap parity sweep; each measured on MxBuild 11.16.1, one project per case, with clean controls:

  • MDL113: a constant default the type does not accept (CE0047). Integer/Long take an optional sign and digits; Decimal also 1.5 and .5 (not 1,5 or 1e3); Boolean true/false in any case. DateTime takes only yyyy-mm-ddThh:mm:ss: a date alone, a Z, milliseconds, no seconds, and tokens such as [%BeginOfCurrentDay%] are all CE0047. The constant doctype example used that token and is corrected.
  • MDL114: an index on an unlimited String (CE0085) or a HashedString/Binary attribute (CE0084), alone or in a composite index.
  • MDL115: change or create setting an AutoNumber attribute (CE0852).
  • MDL116: a microflow, nanoflow, page, snippet, enumeration or constant named with a platform-reserved word (CE7247), and rename onto one — the list MDL021 already applies to entities.

Check coverage

  • 20 more broken-script fixtures for the parity sweep, with the round-2 results against MxBuild 11.16.1: 9 gaps where check passed a script the build failed, of which the four above are closed here. The diagnostic-coverage report records codes measured as unreachable from MDL or already handled, so they drop out of its ranking (32 → 25 codes)

claude and others added 24 commits November 30, 2026 06:20
`create external entities` named the association for Race's navigation
property `season` `season`, beside the entity `Season`. mx check refuses
that: CE0065 "Duplicate name 'Season' in module 'F1'. Entities,
associations and enumerations cannot share names". uniqueAssocName
compared names case-sensitively; Mendix does not. It now compares them
without regard to case, so the existing fallback gives `Race_season`.

An association the user made between the two entities in its place (or
rebuilt from describe output, which does not print the OData mapping) is
CE6597 "A local association between two external entities is not
allowed", and the next import added `season` beside it, because it
recognised an association only by its mapping or by the nav name. The
import now maps such an association to the navigation property under the
name it has, when it is the only navigation between the two entity types,
and says so ("Mapped 1 existing association(s) …"). `rename association`
keeps the mapping and was never affected.

Measured with mx check 11.14.0 on a project made by `mxcli new`: the old
build gives CE0065, then CE0065 and CE6597 after the user's replacement and
a re-import; the fixed build gives 0 errors at each step, and a third import
changes nothing.

Fixes #2675

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82t3TXiBNijmizS5cpZ
…ed.tsv)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
A Data Grid 2 with a microflow data source, rewritten in place after the
microflow was changed to return another entity, kept its columns bound to
the old one. mx check: CE7247 "Attribute 'M.OldRows.Year' is not an
attribute of entity 'M.NewRows'" on every column, and re-running the
unchanged script printed "Unchanged page".

The stored-widget patch (#832) keeps a property both of its builds agree
on. A column's attribute is bound to the grid's own data source and was
exempt from the context check, to keep a specialization describe cannot
print. But both builds read the data source as the same text in today's
context, so they agreed on NewRows and the stored OldRows binding was kept;
the rebuilt bytes equalled the stored ones, hence "Unchanged".

A data-source-bound value is now kept only while the entities it names are
the ones the describe build binds, or generalizations or specializations of
them. The #832 case (Administration.Account.FullName, printed through
System.User) is still kept, and its tests are the control. Anything else is
written from the statement.

Measured with mx check 11.14.0 on a project made by `mxcli new`: the old
build reports "Unchanged page" and gives CE7247 twice; the fixed build
reports "Replaced page", then "Unchanged page" on the next run, and 0
errors. Re-running the page with the fixed build repairs a project the old
build left broken.

The issue's second case (CE0463 after an HTML-template change and revert)
did not reproduce on 11.14 and is not addressed here.

Fixes #2673

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82t3TXiBNijmizS5cpZ
Studio Pro draws a decision's caption inside the diamond. An `if` with no
@caption is captioned with its full condition, so a compound one such as
`$Stints != empty and length($Stints/json) >= 2` wraps mid-token there and
repeats the decision's Expression field.

- check: MDL-CAPTION01 (info) for an if/elsif with no @caption whose
  condition joins tests with and/or (outside string literals) or is longer
  than 40 characters. `@caption ''` and short single tests are not reported.
  Runs on microflows and nanoflows, nested bodies included.
- lint: CONV012 now also reports a stored decision whose caption is such a
  condition, so existing flows can be found and captioned.
- One predicate (linter.ConditionTooVerboseForCaption) serves both.
- Guidance: write-microflows skill and reference, `mxcli syntax
  microflow.control-flow`, error-message appendix.

The default caption for an uncaptioned `if` is unchanged: deriving English
from an arbitrary expression is not reliable, so the author supplies it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qHWJe7hdkdMeLc8mw
`$Status: Enumeration(Module.Status)` on a page or snippet parameter --
Studio Pro's "Enumeration" parameter type -- could not be written: the
visitor copied the name into EntityType, so the builder, alter and the
reference check resolved it as an entity ("entity not found"). describe
printed a stored one as the raw `DataTypes$EnumerationType`, which does
not re-parse, so describe -> exec could not round-trip it.

- An explicit Enumeration(Module.Name) parameter no longer fills
  EntityType (a bare Module.Name is still an entity parameter).
- It maps to DataTypes$EnumerationType, and the enumeration name is
  carried through the page/snippet parameter structs, PageParameterSpec,
  the writer and both readers. describe prints Enumeration(Module.Name).
- An unknown enumeration is refused rather than written as a dangling
  by-name reference.
- A snippet enumeration parameter falls under the 11.17 primitive gate,
  quoting mxbuild's own caption ('Enumeration Module.Name').

Measured: an enumeration page parameter bound to a radio button group
checks at 0 errors on mx 11.16.0 and 11.17.0; the identical snippet
parameter is CE0046 "Invalid data type 'Enumeration Snippet.Color'." on
11.16.0 and 0 errors on 11.17.0. ako/TestApp's Studio Pro-authored
Snippet.SnippetPrimitiveParameter (par5: Enumeration(Rules.RuleResult))
now goes describe -> exec -> mx check (0 errors) -> describe identically.
Each fix was reverted once to show its test fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tMtoeCB6z2UuSeoKA
…trip

MDL had no way to state a note's line to the start event or to another
note. The first was described with a warning and dropped on re-exec; the
second was dropped silently, and the note at its origin got an `id: n1`
nothing referenced, because the line counted toward its "shared" total.

`@annotation(… link: start)` and `@annotation(… link: n1)` state the line
on its origin note. The builder resolves links once the whole flow is built,
so a target may be declared further down. describe derives link-target
labels over the whole flow, so the free-note prefix and the activity walk
agree, and a link no longer makes its origin shared. check refuses a link
to an undeclared note and `link: start` in an alter fragment.

Closes #2670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
Name navigation associations apart from entities, and map hand-made ones
…nding

Rebind Data Grid 2 columns when the data source's entity changes
Flag decisions captioned with their whole condition
feat(pages): enumeration-typed page and snippet parameters
…24rqgv

fix: microflow notes linked to the start event or another note round-trip
diag-coverage: record codes measured as unreachable or already handled (settled.tsv)
check-gap: 20 more broken-script fixtures, and the 9 gaps they find on MxBuild 11.16.1
…E7247, MDL113-MDL116)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
…ant doctype example

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
check: four gaps from the parity sweep (CE0047, CE0085/CE0084, CE0852, CE7247)
…ow-batch

# Conflicts:
#	CHANGELOG.md
#	mdl-examples/check-gap/README.md
#	mdl/executor/validate_program.go
check: four microflow type gaps from the parity sweep (MDL117-MDL119, E018)
@ako
ako merged commit 83c052d into mendixlabs:main Nov 30, 2026
15 checks passed
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.

Annotation links to start event and to other notes are lost in MDL

2 participants