Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
15f925c
fix: project-tree prints compact JSON so the Project pane loads large…
claude Nov 29, 2026
a4984a2
fix: widget describe says which widget version its example holds for
claude Nov 29, 2026
5efb2ff
fix: MDL-AGENT02 follows the project's Agent Editor version
claude Nov 29, 2026
2f3cf5f
Merge pull request #2667 from ako/claude/issue-triage-prioritization-…
ako Nov 29, 2026
063beda
Merge pull request #2668 from ako/claude/issue-triage-prioritization-…
ako Nov 29, 2026
dae7f09
Merge pull request #2669 from ako/claude/issue-triage-prioritization-…
ako Nov 29, 2026
30f1141
fix: page sort by Assoc/Module.Entity.Attr no longer stores the entit…
engalar Nov 29, 2026
6e6045c
fix: a qualified final attribute in an association path is not qualif…
claude Nov 29, 2026
9eeef61
Import Edm.Date as a DateTime that is not localized
claude Nov 29, 2026
bae65d8
Let a page that shows itself be created after drop page
claude Nov 29, 2026
fabd8ee
fix(mx): resolve the exact mx before PATH; model writers refuse anoth…
claude Nov 29, 2026
d6b564b
Merge pull request #2679 from ako/claude/fix-2676-edm-date-unlocalized
ako Nov 29, 2026
295762a
Merge mendixlabs/mxcli#1984: page sort by Assoc/Module.Entity.Attr no…
claude Nov 29, 2026
76d6fa6
Merge pull request #2680 from ako/claude/fix-2677-page-shows-itself
ako Nov 29, 2026
6e57910
docs: cite ako/mxcli#2671 for the integrated mendixlabs#1984 fix
claude Nov 29, 2026
f78f8fd
fix(bug-tests): write the #1983 example's page with create or modify
claude Nov 29, 2026
ae395ec
Merge pull request #2684 from ako/fix/2681-exact-mx-before-path
ako Nov 29, 2026
9509ce2
Merge pull request #2682 from ako/claude/issue-triage-prioritization-…
ako Nov 29, 2026
efc1bec
Merge origin/main: keep main's #2671 resolver over mendixlabs#1984's
claude Nov 29, 2026
53fedaf
Merge pull request #2683 from ako/integrate/up1984-sort-qualified-final
ako Nov 30, 2026
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": "cmd/mxcli", "date": "2026-11-29", "symptom": "the companion Project pane failed on a large project with 'Unterminated string in JSON at position 4194304'", "cause": "project-tree printed indented JSON (4.5 MB on the reporter's app) and the desktop app keeps only the first 4 MB of a plugin command's output, so the pane parsed half a document", "file": "cmd/mxcli/project_tree.go (writeProjectTree); mods/companion/hooks/tree.ts (parseTree)", "fix": "writeProjectTree encodes without SetIndent (56% of the indented size on TestApp); parseTree reports output at the 4 MB limit as cut off rather than as a JSON parse error", "insight": "the error position was exactly 4194304 = 4 MiB, which names a transport cap, not a JSON bug. Machine-read output should be compact; anything a plugin pipes through $.process.run has a size ceiling the producer never sees", "refs": ["ako/mxcli#2601"], "test": "cmd/mxcli/project_tree_output_test.go; mods/companion/tests/tree.test.ts"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "cmd/mxcli", "date": "2026-11-29", "symptom": "with another Mendix version's mx on PATH, every command took it over the project's installed exact version; the marketplace post-install repairs and install --allow-format-change's module-import then wrote the project's model with it, and fix --mx <folder without mx> ran the PATH mx", "cause": "docker.ResolveMxForVersion tried PATH before an exact-version install or cache, and its callers that write the model never checked the release of what it returned (git merge #2644 and marketplace package #2652 had each patched around it locally)", "file": "cmd/mxcli/docker/check.go (ResolveMxForVersion), cmd/mxcli/mx_model_writer.go (mxForModelWrite, mxReleaseProblem, fixOverrideMx), cmd/mxcli/marketplace_postinstall.go, cmd/mxcli/cmd_marketplace_install.go, cmd/mxcli/cmd_fix.go", "fix": "the resolver takes localMxForVersion (exact install or cache) before PATH; model writers without an override go through mxForModelWrite, which refuses another release (*mxReleaseError) — post-install repairs are skipped with their manual commands, module-import is refused; fix --mx refuses an mx outside the named path; git merge's release check now shares mxReleaseProblem", "insight": "two per-caller fixes in a row (#2644, #2652) were the signal that the defect lived in the shared resolver: enumerate a helper's callers when the second caller needs the same patch, and split them by whether they WRITE the model — only writers need a hard release check, readers are served by fixing the preference order", "refs": ["ako/mxcli#2681", "ako/mxcli#2644", "ako/mxcli#2652"], "test": "cmd/mxcli/docker/resolve_exact_before_path_2681_test.go, cmd/mxcli/mx_model_writer_2681_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-29", "symptom": "on an Agent Editor 1.x project, `check -p` and `exec` refused a `create agent` with a Model and no SelectedModel (MDL-AGENT02 error) that the project phase accepted, so --no-check was the only way through", "cause": "the syntax phase (ValidateAgentSelectedModel) had no project and errored for every version; the project phase gated on a single 2.2 threshold, so it was also silent on 1.3–2.1, where Studio Pro does report AE018", "file": "mdl/executor/validate_agent_selected_model.go (agentSelectedModelVerdict, agentEditorCommonsVersion), validate_agent_left_unset.go, validate_program.go", "fix": "one verdict keyed on AgentEditorCommons' version, asked by both phases (the syntax phase through ValidateProgram's lazy project): before 1.3 nothing, 1.3–2.1 an error for an agent with a Model (AE018), 2.2+ also a warning without one; no project judges as current releases", "insight": "mx check does not run the Agent Editor extension (no AE code on 2.6.0 either, the control), so AE018 cannot be measured headlessly; grep the extension JS in the .mpk instead: the guard `model && !selectedModel` with errorCode AE018 is absent in 1.1.0/1.2.0 and present from 1.3.0. The startup-import threshold (2.2) and the Studio Pro check threshold (1.3) are different measurements of different things", "refs": ["ako/mxcli#2294", "ako/mxcli#2289", "ako/mxcli#2031"], "test": "mdl/executor/validate_agent_selected_model_version_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-29", "symptom": "`sort by Mod.Card_Task/Mod.Task.LastActivityAt` on a Gallery/pluggable datasource was stored as `Mod.Task.Mod.Task.LastActivityAt`; check and exec passed, mxbuild crashed loading the project (ArgumentNullException setting 'Attribute', no CE), fix widgets crashed, and re-exec reported Unchanged over the broken value", "cause": "resolveAssociationPathFrom qualified the final path segment with the hop's destination entity even when the author had already qualified it (`Mod.Entity.Attr` or `Entity.Attr`)", "file": "mdl/executor/cmd_pages_builder_v3.go (resolveAssociationPathFrom)", "fix": "a qualified final attribute is accepted when its entity is the destination or one it inherits from (an `Entity.` qualifier is read in the destination's module) and stripped to the bare name; any other entity leaves the path unresolved, so a sort refuses it at exec", "insight": "the resolver is shared by datasource sorts, DataGrid 2 columns, dynamic-text parameters and input bindings, so the reported widget is one of four writers of the same doubled name. The bare spelling is what describe emits, which is why round-trips never hit it: only hand- or agent-written qualified paths do. The 'in sync' report was correct about the bytes; the fix makes the same script produce different bytes, so re-exec repairs a stored page", "refs": ["ako/mxcli#2671", "mendixlabs/mxcli#1983", "mendixlabs/mxcli#1152"], "test": "mdl/executor/cmd_pages_builder_qualified_final_attr_2671_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area":"mdl/executor","date":"2026-11-29","symptom":"`create external entities from …` imported an Edm.Date property as a localized DateTime; mx check: CE4598 \"Cannot localize this attribute. The remote type of this attribute is 'Edm.Date', which does not support Localize\"","cause":"edmToDomainModelAttrType mapped Edm.DateTime, Edm.DateTimeOffset and Edm.Date in one case with LocalizeDate true; the single-entity rewrite then carried a stored true (carryStoredAttributeState, #1373) so even a re-import could not repair it","file":"mdl/executor/cmd_contract.go (edmToDomainModelAttrType, unlocalizeEdmDates), mdl/executor/cmd_odata.go (execCreateExternalEntity rewrite)","insight":"The remote type, not the stored value or the statement, decides Localize for Edm.Date: Mendix accepts only false. A carry rule that preserves a stored flag also preserves an earlier build's wrong value, so a constraint the platform imposes must run after the carry. The bulk import rebuilds attributes from the contract and repairs itself; the single-entity path does not. None of the formula1 contracts held an Edm.Date, which is why it surfaced only on a CRM contract.","refs":["ako/mxcli#2676"],"ce":["CE4598"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area":"mdl/executor","date":"2026-11-29","symptom":"A page whose widget does `show page` to the page itself cannot be created after `drop page`: \"failed to build page: failed to build widget: failed to resolve page: page not found: M.Driver\"; `check --references` also refused a script that creates such a page, drops and creates it again: \"page M.Driver references page M.Driver before it is created\"","cause":"execCreatePageV3 builds the page (buildPageV3, which minted the page ID) before CreatePage and trackCreatedPage, so resolvePageRef found the page only while an old copy was still stored; validateForwardPageRefs and MDL-PAGE01 counted the statement's reference to itself as one to the later create of the same name","file":"mdl/executor/cmd_pages_create_v3.go (pageBuilder.selfPage/selfPageID set before the build), cmd_pages_builder_input.go (resolvePageRef), cmd_pages_builder_v3.go (buildPageV3 uses selfPageID), validate.go (selfPageName, validateForwardPageRefs), validate_page_order.go","insight":"The report blamed `drop page`, but a first `create page` fails the same way: only the in-place rewrite worked, which is why it looked like a drop problem. Any resolver that looks a document up among the stored ones while that document is being built misses the document itself; decide the ID before the build and let the resolver answer for it. Fixing exec alone was not enough: the reference check had the same blind spot one layer up, so test the reporter's whole script, not only the failing statement.","refs":["ako/mxcli#2677"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-29", "symptom": "`mxcli widget describe maps -p` printed an MDL example with `advanced: false` from the installed Maps 3.2.2 with no note that it holds for that version only; Maps 5.0.0 has no `advanced` property", "cause": "DescribeWidget recorded the version and source but said nothing about what that means for the example; the reader took it as valid for the version about to be installed", "file": "mdl/executor/widget_describe.go (installedVersionNote, embeddedVersionNote, WidgetDescription.VersionNote, PrintWidgetDescription)", "fix": "a VersionNote (text 'Note:' line and JSON versionNote) names the package and version read, and says to describe again after installing another; without -p it says the embedded template may differ from the installed one", "insight": "the hint is 'describe again', not 'widget init': the project's widget definitions already refresh when a package is replaced (RefreshStaleWidgetDefinitions, #2155), so the issue's suggested remedy is a step nobody needs", "refs": ["ako/mxcli#2586", "mendixlabs/mxcli#1944"], "test": "mdl/executor/widget_describe_version_note_test.go"}
12 changes: 7 additions & 5 deletions .claude/skills/mendix/agents/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ description: "Author Mendix AI agent documents in MDL — Model, Knowledge Base,
| 24-50 | Overview |
| 51-195 | Syntax |
| 196-222 | Altering existing documents |
| 223-294 | Gotchas |
| 295-317 | Common Patterns |
| 318-385 | Calling Agents from Microflows |
| 386-388 | AI agent documents |
| 223-296 | Gotchas |
| 297-319 | Common Patterns |
| 320-387 | Calling Agents from Microflows |
| 388-390 | AI agent documents |

<!-- /skill-index -->
# Agents
Expand Down Expand Up @@ -233,7 +233,9 @@ an **error** and `exec` refuses the statement: on a `create agent` without it
(`mxcli check`), and on a `create or modify agent` that leaves a new or stored
agent without one (`check --references` and `exec`). A `create or modify` that
leaves the key out keeps a stored selected model and is not flagged. With no
`Model` at all it is a warning. `mxcli lint` reports a stored agent without
`Model` at all it is a warning. With `-p` the verdict follows the
project's AgentEditorCommons: nothing before 1.3, only the AE018 error from 1.3
to 2.1. `mxcli lint` reports a stored agent without
one (MPR014). Agent Editor 1.x does not read it, so the project check is
silent there.

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

### Fixed

- **An installed mx of the project's Mendix version is used before an `mx` on PATH, and no other version's mx writes the project's model** (ako/mxcli#2681) — `ResolveMxForVersion` tried PATH first, so another version's `mx` there won everywhere: `docker check`, `docker build`, the managed Java dependency sync and the marketplace reference project. The marketplace post-install repairs (`update-widgets`, `rename-design-properties`) and `marketplace install --allow-format-change` (`mx module-import`) then wrote the project's model with that `mx`, whatever its version. The resolver now takes an exact-version install or cache before PATH. Those two writers check the `mx`'s release: on a mismatch the repairs are skipped with their manual commands, and `module-import` is refused with the setup hint. `fix … --mx <path>` no longer falls back to the `mx` on PATH when the path holds none.
- **`check -p` rejects `modify attribute` on an external entity that leaves the service's type** (ako/mxcli#1258) — changing a mapped attribute to another type class (an Edm.Int32 to `decimal`, an Edm.String to `integer`) or a string to another length than the contract's passed `check` and `exec`, and the build reported CE6616 or CE6621. New MDL112, which reads the contract stored on the consumed service. Integer and Long count as one class, as Mendix compares them, so `long` for an Edm.Int32 is accepted. Measured on MxBuild 11.16.1.
- **`check -p` rejects `call external action` naming an action the service does not have** (ako/mxcli#1258) — an action missing from the consumed service's contract, or the right name in another case, passed `check` and `exec`, and the build reported CE7251 "Service … does not contain action …". New MDL111, which reads the contract stored on the project's consumed service and lists the actions it has. Action names are case-sensitive. A service the script itself creates or changes is not judged. Measured on MxBuild 11.16.1.
- **`check` rejects a published OData service that exposes a Binary attribute** (ako/mxcli#1258) — exposing the entity's own Binary attribute, or one it inherits, passed `check` and `exec`, and the build reported CE5013 "Binary attribute … cannot be exposed through an OData entity". New MDL110; the attribute's type is read from the script, then the project. Every other attribute type exposes clean. Measured on MxBuild 11.16.1.
Expand All @@ -27,6 +28,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- **`git merge` no longer runs another Mendix version's merge engine** (ako/mxcli#2644, upstream mendixlabs/mxcli#1976) — the engine was resolved by preference, so with only another version cached (a Linux container, a CI runner) or an `mx` on PATH, `mx merge` of that version wrote the project's merged model and nothing said so. A model merge now runs only on an mx of the project's own release: another version's, or one whose version cannot be told, is refused before it runs, the merge is aborted, and the message names `mxcli setup mxbuild --version <project version>`. The `mx diff` behind the conflict review is held to the same check. `--mxbuild-path` names an mx on purpose; with it a mismatch only warns, as in `marketplace package`. An installed mx of the project's release is taken before an `mx` on PATH, so a different version on PATH no longer blocks a merge the right engine is there for. `--mxbuild-path` must name a folder that holds an mx: it no longer falls back to the `mx` on PATH and runs that under the override.
- **Call ML model activities survive describe → exec** (ako/mxcli#2623, upstream mendixlabs/mxcli#1964) — `describe` printed a Call ML model activity as `-- Unsupported action: Microflows$MLModelCallAction`, so executing the description removed the activity. It now has a statement, `[$Out =] call ml model Module.MLModelMapping($In) [on error …];`, which writes Studio Pro's stored shape and is what `describe` prints. The output variable is typed as the mapping's output entity. `check --references` refuses a mapping that does not exist (mxbuild CE1613), and a nanoflow refuses the statement. `mxcli syntax microflow.ml-model`.
- **A layout-grid column with no `DesktopWidth` is no longer one twelfth wide** — it was written at weight 1. A project before Mendix 11.12 failed the row with CE0535 ("must add up to 12"), and 11.12 drew the column at one twelfth of the row. Bare columns now share what the row's stated widths leave of 12, as Studio Pro's row presets do: one bare column gets 12, and two get 6 each. A bare column is AutoFill when there is no whole share. `check` warns (MDL-GRID01) about a row whose widths do not add up to 12 in a project below 11.12, where mxbuild reports CE0535 (measured on 11.6.6; 11.12.6 accepts it).
- **The companion Project pane loads large projects** (ako/mxcli#2601) — `mxcli project-tree` printed indented JSON, and on a large app the indentation pushed it past the 4 MB the desktop app keeps of a plugin command's output, so the pane failed with "Unterminated string in JSON". The tree is now one line of JSON (about 56% of the size), and a tree that is still cut off says so instead of showing a JSON parse error. Pipe through `python3 -m json.tool` to read it.
- **`widget describe` says which widget version its example holds for** (ako/mxcli#2586, upstream mendixlabs/mxcli#1944) — the properties and the MDL example come from one version: the package installed in the project with `-p`, mxcli's embedded template without. A new `Note:` line (and `versionNote` in `--format json`) names that package and version, and says to describe again after installing another version. The project's widget definitions refresh on their own when a package changes, so no `widget init` is needed.
- **MDL-AGENT02 follows the project's Agent Editor version** (ako/mxcli#2294) — `check -p` and `exec` refused a `create agent` with a `Model` and no `SelectedModel` on an Agent Editor 1.x project, which does not need one. Measured from each package's extension code: Studio Pro's AE018 first appears in 1.3.0, and the startup import reads `selectedModel` from 2.2. With a project, check now reports nothing before 1.3, only the AE018 error from 1.3 to 2.1, and both from 2.2. The project phase gets the same verdict, so it no longer stays silent on 1.3–2.1. Without a project, nothing changes.
- **An association path whose final attribute is written qualified is no longer stored with the entity doubled** (ako/mxcli#2671, upstream mendixlabs/mxcli#1983) — `sort by Mod.Card_Task/Mod.Task.LastActivityAt` was stored as `Mod.Task.Mod.Task.LastActivityAt`. `check` and `exec` passed, then mxbuild crashed loading the project with an `ArgumentNullException` that named no page. The same resolver serves DataGrid 2 columns, dynamic-text parameters and input bindings, so they were affected too. The qualifier is now accepted when it names the entity the path arrives at, or one it inherits from. An entity the path does not reach is refused. Re-running the same `create or modify` script repairs a page that was stored broken.

## [0.34.0] - 2026-11-27

Expand Down
8 changes: 6 additions & 2 deletions cmd/mxcli/cmd_fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ func runFixTool(cmd *cobra.Command, subcommand, what string) error {
_ = reader.Disconnect()

var mxPath string
if mxOverride != "" || mendixVer == "" {
mxPath, err = docker.ResolveMxForVersion(mxOverride, mendixVer)
if mxOverride != "" {
if mxPath, err = fixOverrideMx(mxOverride, mendixVer); err != nil {
return fmt.Errorf("locate mx for Mendix %s: %w\nhint: run 'mxcli setup mxbuild -p %s'", mendixVer, err, mprPath)
}
} else if mendixVer == "" {
mxPath, err = docker.ResolveMxForVersion("", mendixVer)
if err != nil {
return fmt.Errorf("locate mx for Mendix %s: %w\nhint: run 'mxcli setup mxbuild -p %s'", mendixVer, err, mprPath)
}
Expand Down
12 changes: 1 addition & 11 deletions cmd/mxcli/cmd_git_merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,17 +752,7 @@ func pathWithin(path, dir string) bool {
// project version is not checked (ResolveMxForVersion had nothing to prefer
// either); an mx whose own version cannot be told is a problem.
func mergeMxProblem(mxPath, version string) string {
if version == "" {
return ""
}
got := mergeMxVersion(mxPath)
if docker.SameMendixRelease(got, version) {
return ""
}
if got == "" {
return fmt.Sprintf("cannot tell which Mendix version %s is, and the project is Mendix %s", mxPath, version)
}
return fmt.Sprintf("the mx found, %s, is Mendix %s, but the project is Mendix %s", mxPath, got, version)
return mxReleaseProblem(mergeMxVersion, mxPath, version)
}

// mxRunnersFor wires the real mx invocations to one version-checked lookup.
Expand Down
9 changes: 8 additions & 1 deletion cmd/mxcli/cmd_marketplace_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"archive/zip"
"context"
"encoding/xml"
"errors"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -291,7 +292,13 @@ func installModuleFromFile(ctx context.Context, mpkPath, mprPath string, allowFo
return nil
}

mxPath, err := docker.ResolveMxForVersion("", mendixVer)
// module-import writes the project's model, so only its own release's mx
// may run it (ako/mxcli#2681).
mxPath, err := mxForModelWrite(mendixVer)
var releaseErr *mxReleaseError
if errors.As(err, &releaseErr) {
return err
}
if err != nil {
return fmt.Errorf("locate mx for Mendix %s: %w\nhint: run 'mxcli setup mxbuild -p %s'", mendixVer, err, mprPath)
}
Expand Down
Loading
Loading