Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "lint-rules", "date": "2026-12-02", "refs": ["ako/mxcli#2730", "mendixlabs/mxcli#2004"], "ce": ["CE2729"], "symptom": "a Marketplace module with a microflow and a snippet both named Lib.Overview: a menu item calling the microflow (execute only for Lib.Runner) made SEC012 report CE2729 on every attribute the snippet's nested snippet shows, for every role without Lib.Runner; mx check reported 0 errors. `show references to Lib.Overview` listed the menu item beside the page using the snippet with nothing to tell them apart", "cause": "the SEC012 reach model keyed every document by its bare qualified name: the navigation entry Lib.Overview was taken for the snippet (m.module set, so the entry's execute check was skipped) and the microflow's and snippet's references were merged under one key; showReferences selected no target type", "file": "mdl/linter/rules/reachable_page_read_access.go (node, sourceKinds, flowNode, reach), mdl/executor/cmd_search.go (showReferences)", "fix": "walk nodes are kind+name (PAGE, SNIPPET, MICROFLOW, NANOFLOW): refs by SourceType, menu items and homes by their page/microflow column and HomePageType, execute grants by ElementType; show references adds a TargetType column when the name names more than one kind", "insight": "qualified names are not unique across document kinds in Mendix (Studio Pro accepts a microflow and a snippet of one name; measured on 11.12.6), so any map keyed by qualified name alone conflates them. The catalog's refs carry SourceType/TargetType; a consumer that drops them reintroduces the collision. Grep other name-keyed maps over refs before assuming one fix covers the class", "test": "mdl/linter/rules/reachable_page_same_name_2730_test.go, mdl/executor/show_references_same_name_2730_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl-backend", "date": "2026-12-02", "refs": ["ako/mxcli#2718", "mendixlabs/mxcli#1999", "#854", "#1519"], "ce": [], "symptom": "a Data grid 2 column inserted with `alter page \u2026 insert after grid column(X) { column (\u2026, ColumnWidth: autoFit, minWidth: minContent) }` stored width `autofit` (autoFill as `autofill`) and minWidth `auto`; describe printed `ColumnWidth: autofit`; check warned minWidth would be dropped (MDL-WIDGET07); exec and mx check were clean. The widget compares its keys exactly, so the column rendered as auto-fill. create page stored both as written", "cause": "the ALTER column path does not go through the widget engine: widgetobj.BuildDataGrid2Column read every enumeration through colPropString, which lowercases, hard-coded minWidth `auto`, and dropped every other primitive the column schema declares; extractColumnPropertyIDs did not carry the stored type's EnumerationValues. check judged an inserted column with no parent, so not by the column schema", "file": "mdl/backend/widgetobj/datagrid_column.go (colPropEnum, colPropPrimitive), mdl/backend/pagemutator/mutator.go (extractColumnPropertyIDs), mdl/types/widget_property_type.go (EnumerationKeys), mdl/executor/validate_widgets.go (validateAlterFragment)", "fix": "PropertyTypeIDEntry.EnumerationKeys, filled from the grid's stored widget type; enumerations write the declared key the value names (exact, then case-insensitive, as #854 does in the engine); minWidth and any other declared primitive stated under its key are written; an insert or replace addressed `grid column(\u2026)` is validated with a datagrid parent, so its columns are object-list items of the grid's definition (or the embedded column schema)", "insight": "two writers for one widget drift: the engine had #854's enum canonicalization and the full column schema, the alter path a hand list with lowercasing that happened to match the all-lowercase keys (left, yes) and not the camel-case ones. Comparing describe output of a create-built and an alter-built column (re-exec Unchanged) is the cheapest parity check. Measured on 11.12.6: before autofit/autofill; after autoFit/autoFill/minContent, describe re-exec Unchanged, mx check 0 errors; with a project an undeclared column key is now MDL-WIDGET01 as in create page", "test": "mdl/backend/widgetobj/datagrid_column_enum_case_2718_test.go, mdl/executor/validate_alter_insert_column_schema_2718_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl-executor", "date": "2026-12-02", "refs": ["ako/mxcli#2714", "mendixlabs/mxcli#2001", "ako/mxcli#2603", "ako/mxcli#1258"], "ce": ["CE5015", "CE6099", "CE0227"], "symptom": "`create import mapping` binding a JSON integer member (`\"code\": 123`) to a String attribute stored the value element as DataTypes$StringType; mx check reported CE5015 \"Attribute type 'String' does not match schema type 'Integer'\". create or modify did not repair it. Since the check-gap sweep (MDL127) check refused the pairing outright, calling it an exact-match rule", "cause": "buildImportMappingElementModel and buildExportMappingElementModel set the value element's DataType from the bound attribute (resolveAttributeType), never from the JSON member it binds; MDL127's 'types must match exactly' table was measured against those writes, so every conversion looked like CE5015", "file": "mdl/executor/cmd_import_mappings.go (mappingValueDataType, mappingTypesAlign), cmd_export_mappings.go, validate_mapping_snippet_gaps.go (mappingValueAccepted, MDL127)", "fix": "the element stores the attribute's type where it aligns with the member's (integer\u2192Integer/Long/AutoNumber, string\u2192String/Enumeration/DateTime, same type) and the member's type otherwise; MDL127 now refuses only what mxbuild refuses with that write: import accepts any member into String and integer into Decimal, export a String attribute into any member and Integer/Long into a decimal; others are CE6099 (import) / CE0227 (export)", "insight": "a check derived from measurements of a writer inherits the writer's bugs: MDL127's table was right about what mxcli's writes built and wrong about Mendix. Neither 'attribute type' nor 'member type' alone is right \u2014 a string member into a DateTime attribute needs the attribute's type (member's type there is CE6099/CE0227). A one-project matrix (5 member types \u00d7 7 attribute types \u00d7 import/export, one element per pairing, attribute name encoding the pairing) settled it in one mx check, and the same matrix run through `check` must give the same set \u2014 it did (22 import, 21 export). Measured on 11.12.6: reporter's mapping CE5015 before, 0 errors after a create or modify, re-run Unchanged", "test": "mdl/executor/mapping_value_type_2714_test.go, mdl/executor/check_gap_mappings_snippets_test.go (TestMappingValueTypes re-measured)"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl-executor", "date": "2026-12-02", "refs": ["ako/mxcli#2726", "mendixlabs/mxcli#2002", "mendixlabs/mxcli#1517"], "ce": [], "symptom": "`create or modify microflow` turning a local list into a parameter of the same name ($SaleList: List of M.Sale, the `create list` and `commit` removed) was refused under mdl 1 (MDL-V1-REBUILD): \"drop $SaleList: $SaleList is still used by: add $NewSale to $SaleList\". Any other parameter name spliced", "cause": "alterFlowContext.checkOutputUnused counted the stored readers of a dropped producer's output, exempting only a variable an operation's fragment declares again; a parameter of the declared header (a.mf.Parameters once planFlowModify sees the header change) was not counted as declaring it", "file": "mdl/executor/cmd_alter_flow.go (checkOutputUnused, isParameter)", "fix": "a variable a parameter of the flow being written declares is not left without its producer; the readers read the parameter", "insight": "a unit test through afRun did NOT reproduce it: Executor.Execute does not apply the program's `mdl 1;` header, and under mdl 0 a refused splice silently falls back to a rebuild. Reproduce splice refusals through ExecuteProgram (or set the language version). Measured on 11.12.6: old binary refuses, new splices (2 dropped, parameter added), re-run Unchanged, mx check 0 errors", "test": "mdl/executor/flow_modify_local_to_parameter_2726_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "modelsdk", "date": "2026-12-02", "refs": ["ako/mxcli#2732", "mendixlabs/mxcli#2006", "ako/mxcli#1897", "#574", "#931", "ako/mxcli#2507"], "ce": ["CE0463"], "symptom": "`create or modify page` turning a Data grid 2 attribute column into `ShowContentAs: customContent` passed check and exec; mx check then reported CE0463 on the grid. The column's `tooltip` (hidden for custom content) kept the empty Forms$ClientTemplate the attribute column had, where create page writes null. fix widgets did not clear it", "cause": "canon.carryUnexpressed puts a stored EMPTY ClientTemplate back where the writer writes null \u2014 added for Studio Pro's unset screen-reader label (#1897). Inside a CustomWidgets$WidgetValue the writer's null is deliberate: the widget's editorConfig hides the property", "file": "modelsdk/canon/unexpressed.go (carryUnexpressed, isWidgetValue)", "fix": "the null-over-empty-template carry skips CustomWidgets$WidgetValue elements; the screen-reader label carry on built-in widgets is unchanged", "insight": "an equivalence a carry assumes (null == empty template) holds for one property family and not for another; in pluggable values null and empty are two editorConfig states. The diff was found with `bson dump --compare Fixed,Broken`: one property differing, everything else identical. A page already broken stays broken on re-run: the stored pluggable passes through when the statement describes the same widget, so repairing stored damage is fix widgets' job (#2507). Measured on 11.12.6: before CE0463, after a fresh create \u2192 modify gives 0 errors on that grid, describe re-exec Unchanged", "test": "modelsdk/canon/unexpressed_widgetvalue_2732_test.go"}
15 changes: 5 additions & 10 deletions .claude/skills/mendix/connect-rapidminer-graph/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ description: "Fetch data from a RapidMiner graph mart or any SPARQL 1.1 HTTP end
| 63-83 | SPARQL JSON result shape |
| 84-103 | The full pipeline |
| 104-243 | Step-by-step template |
| 244-283 | Gotchas (things that burned an hour during development) |
| 284-319 | Exploring the graph |
| 320-323 | Credential management |
| 324-329 | Related skills |
| 244-278 | Gotchas (things that burned an hour during development) |
| 279-314 | Exploring the graph |
| 315-318 | Credential management |
| 319-324 | Related skills |

<!-- /skill-index -->
# Connecting Mendix to RapidMiner / AnzoGraph via SPARQL
Expand Down Expand Up @@ -260,12 +260,7 @@ Body: template '... WHERE {1} ... {2}'

### JSON structure auto-detects ISO strings as DateTime

If your JSLT emits ISO 8601 timestamps (`"2026-04-13T14:00"`) and the target Mendix attribute is `string`, `create json structure ... sample '...'` will infer `datetime` from the sample and mxbuild fails with `CE5015` ("schema type DateTime doesn't match attribute type String").

**Solutions:**
- Use a non-ISO sample value in the snippet (e.g. `"2026-04-13 14:00 CET"`).
- Or slice/format the timestamp in JSLT so it doesn't look like ISO 8601 (`$rawTime[11 : 16]` for `HH:MM`).
- Or change the target attribute to `datetime`.
If your JSLT emits ISO 8601 timestamps (`"2026-04-13T14:00"`), `create json structure ... sample '...'` infers `datetime` for the member. Binding it to a `string` attribute is fine: the mapping converts it (it failed with `CE5015` before ako/mxcli#2714). Bind it to a `datetime` attribute when you want the timestamp as a date.

### Non-persistent child lists can't be extracted in microflows

Expand Down
24 changes: 12 additions & 12 deletions .claude/skills/mendix/json-structures-and-mappings/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ description: "Create and manage JSON structures, import mappings and export mapp
| 33-110 | Key Concepts |
| 111-122 | Export Mappings |
| 123-188 | JSON Structures |
| 189-235 | Message Definitions |
| 236-401 | Import Mappings |
| 402-499 | Export Mappings |
| 500-517 | Starting a Mapping Below the Payload Root |
| 518-601 | Microflow Actions |
| 602-614 | Browse |
| 615-662 | Export Workflow: PE → NPE → JSON |
| 663-669 | Realistic Example: Countries REST API |
| 670-693 | Placing Documents in Folders |
| 694-709 | Documentation |
| 710-724 | Common Mistakes |
| 189-234 | Message Definitions |
| 235-400 | Import Mappings |
| 401-498 | Export Mappings |
| 499-516 | Starting a Mapping Below the Payload Root |
| 517-600 | Microflow Actions |
| 601-613 | Browse |
| 614-661 | Export Workflow: PE → NPE → JSON |
| 662-668 | Realistic Example: Countries REST API |
| 669-692 | Placing Documents in Folders |
| 693-708 | Documentation |
| 709-724 | Common Mistakes |

<!-- /skill-index -->
# JSON Structures, Import Mappings & Export Mappings
Expand Down Expand Up @@ -232,7 +232,6 @@ The full vocabulary, the ALTER statements, inherited attributes and what mxcli
deliberately does not guess:
[reference/message-definitions.md](reference/message-definitions.md).


## Import Mappings

### Domain Model for Import
Expand Down Expand Up @@ -722,3 +721,4 @@ create or modify import mapping Sales.IMM_Order
| `Param: parameter` with no `parameter Module.Entity` on the header | Declare the mapping's input object, or the build reports CE0279 |
| `parameter` on an EXPORT mapping | Export mappings have no input object — their parameter is the root object |
| Arrays in import with container entity | Import arrays map directly to item entity, no container |
| A value's JSON type differs from the attribute's (MDL127) | Import converts any member into a String attribute and an integer into a Decimal; export a String attribute into any member and an Integer/Long into a decimal. Anything else: match the types or convert in a microflow (CE6099 / CE0227) |
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- **An error handler that carries on no longer rejoins before a list operation on the output it never produced** (ako/mxcli#2696) — for `$Rows = <action> on error … end error; $Row = head $Rows; if $Row != empty …`, the handler rejoined right before the `head`. `check` and `exec` passed, and `mx check` reported CE0108 at it. A list operation, an aggregate, a cast, a rollback, a show page and the enumeration and inheritance splits now count as reading their input. The variable a list operation, aggregate or cast computes from the output is skipped too, also in flows that declare their return value.
- **`create or modify association` without a delete clause keeps the stored delete behaviour** (ako/mxcli#2713) — a statement written only to set documentation reset `on delete restrict error message '…'` to the default keep-references behaviour and dropped the message, with no warning from `check`, `exec` or `mx check`. An unstated `on delete` now keeps the stored behaviour and its message, the way unstated storage and export level already did. A stated one still replaces them.
- **An input's `AriaRequired` and a text box's `AutocompletePurpose` are written and described** (ako/mxcli#2710, upstream mendixlabs/mxcli#1996) — `check` refused both, every text box, text area, date picker and radio button group was stored with Aria required off, and every text box with autocomplete purpose `On`. So rewriting a page or snippet from MDL, `create or modify` as well as `drop` and `create`, reset what Studio Pro had set, without a warning. `AriaRequired: true`, `Autocomplete: false` and `AutocompletePurpose: PostalCode` (any of Studio Pro's purposes) are now written as given and described when they differ from the default. An unknown purpose is refused by `check` and `exec`.
- **A Data grid 2 column inserted with `alter page` keeps its width as written** (ako/mxcli#2718, upstream mendixlabs/mxcli#1999) — `alter page … insert after grid column(X) { column (…, ColumnWidth: autoFit) }` stored the width as `autofit`, and `autoFill` as `autofill`. The widget compares its keys exactly, so the column rendered as auto-fill, and `check`, `exec` and `mx check` reported nothing. `minWidth: minContent` was dropped, with a warning that it was not a column property. An inserted or replacing column now stores enumeration values as the widget declares them, and every column property `create page` accepts, `minWidth` and `minWidthLimit` included. `check` judges such a column by the Data grid 2 column schema: with a project, a key the column does not have is an error (MDL-WIDGET01), as in `create page`.
- **`create or modify page` turning a Data grid 2 column into custom content no longer breaks the grid** (ako/mxcli#2732, upstream mendixlabs/mxcli#2006) — replacing an attribute column with the same column as `ShowContentAs: customContent` kept the column's empty tooltip template. The widget hides that property for custom content, so `mx check` reported CE0463 on the grid after `check` and `exec` had passed. The replaced column is now written as `create page` writes it. A page already in this state is not repaired by re-running the statement.
- **A mapping value can convert between the JSON member's type and the attribute's** (ako/mxcli#2714, upstream mendixlabs/mxcli#2001) — an import mapping binding a JSON integer to a String attribute stored the value with the attribute's type, and `mx check` reported CE5015. Recent builds refused the mapping at `check` instead (MDL127), calling it an exact-type rule. A value now stores the member's type where the mapping converts, as Studio Pro does. `check` accepts what the build accepts, measured over every pairing: on import, any value into a String attribute and an integer into a Decimal; on export, a String attribute into any member and an Integer or Long into a decimal. Other pairings are still refused, now naming CE6099 (import) or CE0227 (export). Re-running `create or modify` repairs a mapping written before.
- **`create or modify microflow` can turn a local variable into a parameter of the same name** (ako/mxcli#2726, upstream mendixlabs/mxcli#2002) — moving a list to the caller meant adding the parameter `$SaleList` and removing the `create list` that declared it. That was refused (MDL-V1-REBUILD) with "drop $SaleList: $SaleList is still used by: add $NewSale to $SaleList", although the new parameter supplies the variable. The change is now spliced into the stored flow. A reader left with no variable at all is still refused.
- **SEC012 tells a microflow from a snippet of the same name** (ako/mxcli#2730, upstream mendixlabs/mxcli#2004) — a Marketplace module can hold a microflow and a snippet both named `Lib.Overview`. A menu item calling the microflow was taken for the snippet, without the check that the role may execute the microflow. `lint` then reported CE2729 on every attribute the snippet shows, for roles that cannot reach it, where `mx check` reported nothing. The reachability walk now keys each document by its kind as well as its name. `show references` adds the target's type when a name belongs to more than one kind of document.

## [0.34.0] - 2026-11-27

Expand Down
9 changes: 5 additions & 4 deletions mdl-examples/bug-tests/check-gap-mapping-values.fail.mdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
-- check-gap f75 f76 f77 (ako/mxcli#1258): mapping values MxBuild 11.16.1
-- rejects. A JSON string into an Integer attribute, and an Integer attribute
-- into a JSON string, are CE5015 (the two types must match exactly); a value
-- naming an attribute the entity does not have is CE1613. check reports MDL127.
-- check-gap f75 f76 f77 (ako/mxcli#1258): mapping values MxBuild rejects. A
-- JSON string into an Integer attribute is CE6099, and an Integer attribute
-- into a JSON string CE0227 (re-measured on 11.12.6 for ako/mxcli#2714); a
-- value naming an attribute the entity does not have is CE1613. check reports
-- MDL127.
mdl 1;
create module MvBad;
create json structure MvBad.J sample '{"age": "three", "name": "x"}';
Expand Down
Loading
Loading