diff --git a/.claude/commands/mendix/lint.md b/.claude/commands/mendix/lint.md index b087bde3c3..bcf5fc710d 100644 --- a/.claude/commands/mendix/lint.md +++ b/.claude/commands/mendix/lint.md @@ -48,6 +48,7 @@ mxcli lint -p app.mpr --baseline lint-baseline.json | MPR013 | correctness | SnippetCallAppearance - Class/Style/DynamicClasses/design properties on a snippet call never reach the page (it renders no element) | | MPR014 | correctness | AgentWithoutSelectedModel - an agent with no selected model, which Agent Editor 2.2+ refuses at startup, stopping the import of every agent (not reported for AgentEditorCommons before 2.2) | | MPR015 | correctness | ConsumedMCPServiceWithoutEndpoint - a consumed MCP service with no endpoint constant, which Agent Editor skips at startup | +| MPR022 | correctness | AgentDocumentDanglingReference - an agent, model, knowledge base or MCP service names a document the project does not have; mx check does not see it, Studio Pro reports it on open (needs the full catalog) | | SEC001 | security | NoEntityAccessRules - Persistent entities need access rules | | SEC002 | security | WeakPasswordPolicy - Password minimum length should be 8+ | | SEC003 | security | DemoUsersActive - Demo users should be off at Production security | @@ -68,7 +69,7 @@ These are loaded automatically from `.claude/lint-rules/`: | Rule | Category | Description | |------|----------|-------------| | SEC004 | security | GuestAccessEnabled - Review anonymous user entity access | -| SEC005 | security | StrictModeDisabled - XPath constraint enforcement off | +| SEC005 | security | StrictModeDisabled - client API not restricted (Production, React client) | | SEC006 | security | PIIAttributesExposed - PII-sounding attributes need access rules | | SEC007 | security | UnconstrainedAnonymousEntityRead - DIVD-2022-00019 detection | | SEC008 | security | PIIUnconstrainedRead - PII entities readable without row scoping | diff --git a/.claude/lint-rules/sec_strict_mode.star b/.claude/lint-rules/sec_strict_mode.star index d324b9f60c..639aa556e5 100644 --- a/.claude/lint-rules/sec_strict_mode.star +++ b/.claude/lint-rules/sec_strict_mode.star @@ -1,14 +1,20 @@ # SEC005: Strict Mode Disabled # -# Strict mode enforces additional XPath constraint validation at runtime. -# When disabled, certain XPath constraint bypass attacks are possible -# (related to CVE-2023-23835 - XPath Constraint Bypass in Mendix Runtime). +# Strict mode restricts the client API: data.action, data.create, data.commit, +# data.remove and data.rollback are disabled in the runtime, and data.get works +# only by GUID. Data access then follows the pages, widgets, microflows and +# nanoflows in the model, so a user cannot fetch or change objects from the +# browser console or a JavaScript action beyond what the app offers — a +# backstop for access rules that are wider than intended. # -# https://cert-portal.siemens.com/productcert/html/ssa-097435.html +# It can be enabled at the Production security level with the React client +# only, so the rule is silent elsewhere. +# +# https://docs.mendix.com/refguide/strict-mode/ RULE_ID = "SEC005" RULE_NAME = "StrictModeDisabled" -DESCRIPTION = "Strict security mode is disabled - enables additional XPath constraint enforcement" +DESCRIPTION = "Strict mode is off: the client API may read and change any object the user's role can access" CATEGORY = "security" SEVERITY = "warning" @@ -20,12 +26,21 @@ def check(): if sec.strict_mode: return [] - # Only warn at Production level - not relevant for dev/prototype + # Strict mode exists at Production level only. if sec.security_level != "CheckEverything": return [] + # ...and with the React client only: under the classic client it cannot + # be turned on, so there is nothing to fix. + settings = project_settings() + if settings != None and settings.web_client == "No": + return [] + return [violation( - message="Strict mode is disabled. This weakens XPath constraint enforcement and is relevant to CVE-2023-23835.", + message="Strict mode is disabled, so the client API (data.get, data.commit, data.remove and others) " + + "may read and change any object the user's role can access, not only what the app's pages and flows offer.", location=location(module="", document_type="security", document_name="ProjectSecurity"), - suggestion="Enable it with: ALTER PROJECT SECURITY STRICT MODE ON; (or in Studio Pro under Project Security).", + suggestion="Enable it with: alter app security ( StrictMode: true ); (or in Studio Pro under App Security). " + + "Check first that no JavaScript action calls those APIs (use a nanoflow instead); " + + "File Uploader's delete and Web Actions' Take picture do not work in strict mode.", )] diff --git a/.claude/skills/fix-issue/findings/cmd-mxcli/2026-11-24-attach-ce0108-handler-variable.json b/.claude/skills/fix-issue/findings/cmd-mxcli/2026-11-24-attach-ce0108-handler-variable.json new file mode 100644 index 0000000000..862edd27f4 --- /dev/null +++ b/.claude/skills/fix-issue/findings/cmd-mxcli/2026-11-24-attach-ce0108-handler-variable.json @@ -0,0 +1 @@ +{"area": "cmd/mxcli/testrunner", "date": "2026-11-24", "symptom": "`mxcli test --attach` ran no test once a test called a microflow: the incremental build reported CE0108 (message not shown), the fallback cold build passed but asked for a runtime restart, which --attach cannot do; exit 1 and no Total (mendixlabs/mxcli#1874, reproduced on 11.16.1).", "cause": "The generated test microflow gave every call an ON ERROR handler that read the raised message into a variable ($MxTestErrorMessage_1 = call MxTest.Test_ErrorMessage) and used it. mxbuild --serve's incremental build rejects any USE of a variable created inside an error handler with CE0108 'defined but not in scope'; a full build accepts the same model. Measured on the dev serve with variants: the handler as generated fails, the same handler returning the variable fails, defining it without using it builds, and no variable builds.", "file": "cmd/mxcli/testrunner/generator_endpoint.go (rewriteBodyForVerdict, rewriteBodyForThrows, GenerateTestFlows), cmd/mxcli/testrunner/client.go (toResult), cmd/mxcli/docker/serve_recovery.go (recheckIncrementalErrors prints the errors)", "fix": "The endpoint path generates no handler: the error leaves the test microflow, the endpoint (which already caught it) returns its message, and toResult makes it FAIL 'exception during execution: ' or, for @throws, PASS/FAIL against the annotation (MDL-literal apostrophes undone). The serve recovery now prints the incremental build's CE0108 lines, document and message.", "insight": "Printing the suppressed error was the cheapest step and the decisive one: 'Variable MxTestErrorMessage_1 ... not in scope' named mxcli's own generated variable, which turned an 'mxbuild state' story into a reproducible shape that four handler variants against the live dev serve (curl POST /build) narrowed in minutes. Separately observed and NOT fixed here: after an --attach run whose builds fell back to a separate serve process, the dev serve's next build reports restartRequired=true for an unchanged model (then false), so a second --attach run can be refused with 'an entity or association changed'.", "refs": ["ako/mxcli#2331", "mendixlabs/mxcli#1874", "ako/mxcli#2064", "ako/mxcli#2100"], "test": "testrunner: generator_endpoint_test TestGenerateTestFlowsLeavesCallsToTheEndpoint (fails against the old generator), client_test TestToResult_ThrownTestMicroflow, throws_test; live on 11.16.1: the repro's call test PASSes under --attach, and four tests give verdicts identical to the old handler's (--local, main build)"} diff --git a/.claude/skills/fix-issue/findings/lint-rules/2026-11-24-sec005-strict-mode-misexplained.json b/.claude/skills/fix-issue/findings/lint-rules/2026-11-24-sec005-strict-mode-misexplained.json new file mode 100644 index 0000000000..4b4dbc2ec0 --- /dev/null +++ b/.claude/skills/fix-issue/findings/lint-rules/2026-11-24-sec005-strict-mode-misexplained.json @@ -0,0 +1 @@ +{"area": "lint-rules", "date": "2026-11-24", "symptom": "SEC005 said strict mode enforces XPath constraints and is relevant to CVE-2023-23835, suggested the deprecated `ALTER PROJECT SECURITY STRICT MODE ON;`, and fired on classic-client projects where strict mode cannot be enabled", "cause": "the rule's rationale was written from a CVE name rather than Mendix's strict mode page; strict mode restricts the client API (data.action/create/commit/remove/rollback, data.get except by GUID) and exists only with the React client at Production level. CVE-2023-23835 is fixed by a runtime update. The suggestion was not updated when `alter app security` moved to a property list (MDL-DEPR554)", "file": "`.claude/lint-rules/sec_strict_mode.star`, `cmd/mxcli/cmd_lint.go`, `.claude/commands/mendix/lint.md`, `docs-site/src/tools/starlark-rules.md`", "insight": "A rule's remedy text is code nobody runs: pin the suggested statement in a test so a syntax deprecation breaks it. Check a security rule's rationale against the vendor's page for the setting, not the CVE it is named after — the security report had the right explanation all along, and the two had never been compared", "refs": ["ako/mxcli#2550"], "rules": ["SEC005"], "test": "TestSEC005StrictMode"} diff --git a/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-rename-agent-blob-references.json b/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-rename-agent-blob-references.json new file mode 100644 index 0000000000..664de6ab9b --- /dev/null +++ b/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-rename-agent-blob-references.json @@ -0,0 +1 @@ +{"area": "mdl/backend/modelsdk rename sweep", "date": "2026-11-24", "symptom": "rename/move of a microflow an agent uses as a tool left the agent naming the old microflow, and `rename … dry run` did not list the agent; mx check stayed green (ako/mxcli#2265).", "cause": "CustomBlobDocuments$CustomBlobDocument keeps every reference as {\"documentId\",\"qualifiedName\"} inside one JSON string (Contents). RenameReferences and UpdateQualifiedNameInAllUnits match whole BSON string values, so the JSON string never equals the old name; Studio Pro re-syncs it through the agent-editor extension, which mx and mxbuild never load.", "file": "mdl/types/blob_rename.go (RewriteBlobQualifiedNames); mdl/backend/modelsdk/infrastructure_write.go (rewriteBlobContents, replaceQNInDocCounted, UpdateQualifiedNameInAllUnits)", "fix": "For a CustomBlobDocument, rewrite each \"qualifiedName\" value in Contents that equals the old name or starts with it plus '.', in place (documentId, key order and indentation kept byte for byte), count it as a hit, and keep Contents out of the expression sweep so prompt text is not rewritten. Lint MPR022 reports a stored reference that resolves to nothing (refs from agent sources whose target is not in objects; System names skipped).", "insight": "A reference sweep over string values misses every format that nests a payload in one string — check the doc types with a JSON/XML Contents property, not only the BSON tree. The catalog already had these edges (builder_agent_refs.go), so the hit list was knowable all along; a sweep that consulted CATALOG.REFS would have caught it. Measured on 11.14.0: a dangling agent tool reference gives mx check 0 errors, so the lint rule is the only headless signal.", "refs": ["ako/mxcli#2265"], "test": "mdl/types/blob_rename_test.go; mdl/backend/modelsdk/rename_agent_2265_test.go (fails with the fix reverted: dry run lists nothing, move updates no unit); mdl/linter/rules/agent_dangling_reference_2265_test.go; live on TestApp: dry run lists SupportAgent, rename and move rewrite the tool, lint MPR022 fires only on the copy whose tool was dropped"} diff --git a/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-required-datasource-template-nulled.json b/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-required-datasource-template-nulled.json new file mode 100644 index 0000000000..2537b3f0c7 --- /dev/null +++ b/.claude/skills/fix-issue/findings/mdl-backend/2026-11-24-required-datasource-template-nulled.json @@ -0,0 +1 @@ +{"area": "mdl/backend/widgetobj", "date": "2026-11-24", "symptom": "A Tree node (3.4.0) created without a data source failed mx check 11.16.1 with CE0463 'definition of this widget has changed' instead of the CE0642 'Data source is required' that check's MDL-WIDGET56 warning predicts; mx update-widgets changed only headerCaption's TextTemplate, null -> empty ClientTemplate. With a data source set the page built clean on main too.", "cause": "NullTemplatesOfUnsetDataSources (#1967) nulled every unset TextTemplate bound to an unset data source, but #1967 was measured on an OPTIONAL data source (required=\"false\"); Tree node's datasource declares no required attribute, so it is required, and for a required one Studio Pro keeps the empty template. The #1967 finding even notes TreeNode binds to a required data source, without the code checking it.", "file": "mdl/backend/widgetobj/unset_datasource_templates.go", "fix": "Skip the nulling when the bound data source's PropertyTypeIDEntry is Required.", "insight": "Found by placing every generated widget example on a page and labelling each CE0463 with docker check's update-widgets re-check, then bson dump page before/after mx update-widgets on a copy: one TextTemplate differed. A rule measured on one widget's shape (optional data source) generalised past what was measured; when a finding names the cases it did NOT cover, the code should refuse those cases, not just the prose.", "refs": ["ako/mxcli#1967", "mendixlabs/mxcli#1745"], "test": "mdl/backend/widgetobj/unset_datasource_templates_test.go TestNullTemplatesOfUnsetDataSources_RequiredDataSourceKeepsItsTemplate (failed before the guard); #1967's own case still nulls; live: Tree node example 1 CE0463 -> CE0642 only, with a data source 0 errors"} diff --git a/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-build-visibility-primitives-only.json b/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-build-visibility-primitives-only.json new file mode 100644 index 0000000000..607fcf34f8 --- /dev/null +++ b/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-build-visibility-primitives-only.json @@ -0,0 +1 @@ +{"area": "mdl/executor", "date": "2026-11-24", "symptom": "Regression from #2546: exec stored TextTemplate null for script-set labels of a widget whose editorConfig hides them only while an ATTRIBUTE is unbound (EvaluationBar textMaterial/textEngine, MoveList textBrilliant..textBlunder, KnightShift); the labels rendered blank, while check, docker check and mx check all passed (ako/mxcli#2548).", "cause": "Build step 4.10 ran getProperties with builder.PrimitiveValues() only, so an attribute (or expression, action) the statement binds reached it as unset and `!isSet(values.evaluation)` fired; the hidden-property resets and check passed configurationValues(stored, script) and disagreed.", "file": "mdl/executor/widget_engine.go (Build, step 4.10)", "fix": "Step 4.10 evaluates configurationValues(builder.PrimitiveValues(), scriptValues), the same configuration as the resets and check.", "insight": "Three consumers asked the same question with three value sets; the one that writes BSON had the narrowest. When a decision is computed per consumer, the values each passes are part of the contract — the #2546 unit tests used only primitive conditions (a boolean, an expression's text), which is why none of them could see it. The reporter's diff against a nightly-written model (exec writing a change where none was made) was the signal; a describe of the page after exec on a copy shows the labels gone on main and kept with the fix.", "refs": ["ako/mxcli#2548", "ako/mxcli#1776", "ako/mxcli#2546"], "test": "mdl/executor/editorconfig_eval_2548_test.go TestEvaluatedVisibility_BuildSeesTheBoundAttribute (failed before the fix); live: KnightShift 28-play-match-page.mdl on a copy, main rewrites Play.Match_View and drops 7 labels, fixed build: 7 documents in sync"} diff --git a/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-editorconfig-run-not-read.json b/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-editorconfig-run-not-read.json new file mode 100644 index 0000000000..483ba43b3b --- /dev/null +++ b/.claude/skills/fix-issue/findings/mdl-executor/2026-11-24-editorconfig-run-not-read.json @@ -0,0 +1 @@ +{"area": "mdl/executor", "date": "2026-11-24", "symptom": "A pluggable widget property the editor hides was unknown to mxcli whenever the widget's editorConfig.js hid it in a shape the static reader could not lift: check passed a non-default hidden value and exec wrote a hidden text template with its default text, both CE0463 (Image 1.5.0 `iconSize: 20` in imageUrl mode, mx check 11.16.1), and a widget with its own hide helper (ChessClock) had no rule at all. A guard on Studio's `target` was read as if it held in Studio Pro (TreeNode, Maps, charts), so Studio Pro-visible properties were treated as hidden.", "cause": "Hide rules were lifted from the bundle's source one JavaScript shape at a time (editorconfig_extract.go); 96 of 170 widget versions had hide calls it could not state, and `target` was never part of a rule.", "file": "modelsdk/widgets/editorconfig/editorconfig.go, mdl/executor/editorconfig_eval.go, mdl/executor/widget_engine.go, mdl/executor/validate_widgets.go, mdl/executor/validate_widget_required.go, mdl/executor/widget_describe.go, mdl/types/widget_visibility.go", "fix": "Run getProperties(values, defaultProperties, \"desktop\") in goja for the widget's actual values and replace the top-level lifted rules with always/never rules for that configuration (evaluatedVisibilityRules); lifted rules remain the fallback and the only source for object-list item properties.", "insight": "The spike that settled it was cheap: one Go program over every .mpk on the machine, calling getProperties with defaults and diffing against the lifted rules at the same defaults. It showed both kinds of miss in one table, and the static-only column (properties the reader called hidden that the function shows) was the surprise: all of it came from `target === \"web\"` branches. Pass the tree as real JS objects (JSON.parse inside the VM): a Go slice wrapped by goja does not survive the helpers' filter/splice, which is what 74 of the first 96 failures were. Regression guard: every TestApp (77) and PedApp (16) page rebuilt with create or replace stays byte-equal ('in sync'), and the 42 generated widget examples give the same CE0463 set as main.", "refs": ["ako/mxcli#1776", "ako/mxcli#2507", "ako/mxcli#1762", "ADR-0016"], "test": "modelsdk/widgets/editorconfig/editorconfig_test.go (own helper, desktop target, no getProperties, hostile bundles, cache); mdl/executor/editorconfig_eval_1776_test.go (check reports with a control that the reader lifted 0 rules, build nulls a hidden template with a shown control, rule merge, describe example); revert proof: evaluation disabled fails the check and build tests"} diff --git a/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-editorconfig-target-both.json b/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-editorconfig-target-both.json new file mode 100644 index 0000000000..988c4f6e10 --- /dev/null +++ b/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-editorconfig-target-both.json @@ -0,0 +1 @@ +{"area": "modelsdk/widgets/editorconfig", "date": "2026-11-24", "symptom": "Regression from #2546: check and exec refused `treenode … (advancedMode: true)` on a web page with MDL-WIDGET10 (error, CE0463 claimed), though the page builds with 0 errors and renders (ako/mxcli#2549).", "cause": "The evaluator ran getProperties with target \"desktop\" only. TreeNode's bundle hides advancedMode unless target is \"web\" (and for \"web\" hides animate/icons while advancedMode is off). The \"desktop\" choice was an assumption from the pluggable-widgets typings, never measured against mxbuild.", "file": "modelsdk/widgets/editorconfig/editorconfig.go (Targets, Hidden)", "fix": "Run getProperties for both \"web\" and \"desktop\" and count a property hidden only when both hide it.", "insight": "Measured on 11.16.1, TreeNode 3.4.0, TestApp: advancedMode true (hidden for desktop) and animate false with advancedMode off (hidden for web) both pass mx check with 0 errors, and mx update-widgets resets neither — mxbuild enforces neither target-dependent branch — while a target-independent hide (Image iconSize outside icon mode) is CE0463. Two pages, each hidden under exactly one target, settle which target a tool uses in one mx check; the #2546 trial compared against static rules, which shared the same unmeasured premise, so it could not catch it.", "refs": ["ako/mxcli#2549", "ako/mxcli#2546", "ako/mxcli#1776", "ADR-0016"], "test": "modelsdk/widgets/editorconfig/editorconfig_test.go TestHiddenRequiresBothTargets; live: both TreeNode pages pass check, the Image iconSize control is still refused"} diff --git a/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-tabindex-label-parameters-round-trip.json b/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-tabindex-label-parameters-round-trip.json new file mode 100644 index 0000000000..93b4ecc28d --- /dev/null +++ b/.claude/skills/fix-issue/findings/modelsdk/2026-11-24-tabindex-label-parameters-round-trip.json @@ -0,0 +1 @@ +{"area": "modelsdk/canon", "date": "2026-11-24", "symptom": "describe page -> exec reported 'Replaced page' for unchanged Marketplace pages (AgentCommons 4.4.0 AgentImport_SelectVersionAndModel, MCPView_New, MCPView_New_EditDisplayNames; MxGenAIConnector 7.4.0 ConfigurationStringImport_NewEdit) on Mendix 11.16.1; a second exec was Unchanged. ako/mxcli#2106 listed the same pages from FactoryManagement.", "cause": "Two values MDL does not state: a widget's TabIndex (Studio Pro stores 1 on a footer button and -1 on a combo box, as int64; the writer writes int32 0), and the parameters of an input widget's LabelTemplate (describe prints a check box label '{1}' as text only, so the rebuild wrote no parameter and the label would read '{1}').", "file": "modelsdk/canon/unexpressed.go (carryTabIndex, carryLabelParameters)", "fix": "CarryUnexpressed keeps a stored non-zero TabIndex over a written 0, and a stored LabelTemplate's Parameters when the written template has the same text and none.", "insight": "FactoryManagement itself is not reachable from a cloud session, but most of #2106's pages are Marketplace modules: `mxcli marketplace install` of AgentCommons, ConversationalUI, MxGenAIConnector, GenAICommons and MCPClient into a TestApp copy (plus the Markdown viewer widget their pages use) reproduced 4 rewrites in one describe->exec sweep. The first carry did nothing live although its unit test passed: Studio Pro stores TabIndex as int64 and the fixture used int32 — a value's BSON width is part of what a carry has to match.", "refs": ["ako/mxcli#2106", "ako/mxcli#1897"], "test": "modelsdk/canon/unexpressed_tabindex_labelparams_test.go (TabIndex int32 and int64, label parameters, and a control that changed text or parameters still land); live: 47 Marketplace pages, 77 TestApp, 16 PedApp all 'in sync' after one exec"} diff --git a/.claude/skills/mendix/agents/SKILL.md b/.claude/skills/mendix/agents/SKILL.md index c2e9648ebf..93673781e5 100644 --- a/.claude/skills/mendix/agents/SKILL.md +++ b/.claude/skills/mendix/agents/SKILL.md @@ -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-284 | Gotchas | -| 285-307 | Common Patterns | -| 308-375 | Calling Agents from Microflows | -| 376-378 | AI agent documents | +| 223-294 | Gotchas | +| 295-317 | Common Patterns | +| 318-385 | Calling Agents from Microflows | +| 386-388 | AI agent documents | # Agents @@ -264,6 +264,16 @@ Single-quoted strings cannot span lines. Use `$$...$$` for any SystemPrompt or U ### documentId vs qualifiedName Each reference stores a `qualifiedName` (e.g. `Module.MyModel`) and a `documentId`. A document reference's id is that document's unit id; an agent's `Entity` holds the entity element's `$ID`, which mxcli resolves and writes as Studio Pro does. For a **System** entity the id comes from a measured table (`modelsdk/meta/system_entity_ids.go`): System.User, System.Language and the other System entities have a fixed `$ID` that is the same in 10.24 and 11.16 builds. A dozen — System.Thumbnail, PrivateFileDocument, BackgroundJob, ChangeHash, WorkflowVersion and others — get an `$ID` minted each time the model loads, so there is none to write: those are stored by name with an empty `documentId`, and a rewrite keeps whatever id is already stored. +### Rename and move keep the references in step +`rename` and `move` of a microflow, constant, entity, model, knowledge base or +MCP service (and `rename module`) rewrite the `qualifiedName` inside every agent +document that names it, keep its `documentId`, and list the agent in `dry run`. +Studio Pro does this itself through its agent-editor extension; `mx` and +mxbuild never load that extension, so a reference left stale by an edit made +without Studio Pro passes `mx check` and the build. `mxcli lint` reports one +(MPR022, needs the full catalog) before Studio Pro does. A prompt that mentions +a name is the user's text and is not rewritten. + ### Drop order Agents reference Model, Knowledge Base, and MCP Service documents. Always drop Agents before dropping their dependencies: ```sql diff --git a/.claude/skills/mendix/change-data-capture/SKILL.md b/.claude/skills/mendix/change-data-capture/SKILL.md new file mode 100644 index 0000000000..87f9cdbc1a --- /dev/null +++ b/.claude/skills/mendix/change-data-capture/SKILL.md @@ -0,0 +1,232 @@ +--- +name: change-data-capture +description: "Stream entity changes to a data lake with Mendix change data capture (CDC) — declare which entities and members a service publishes, read what a project already streams, and verify the whole chain against a local Kafka broker. Use when pushing entity data to a lake or warehouse, when inspecting or changing a CDC service, or when a CDC topic is not receiving what you expect." +--- + +## Find it fast + +`sed -n ',p' SKILL.md` one section rather than reading the file; +`./mxcli syntax ` answers *how do I write this* for a fraction of either. + +| lines | section | +|---|---| +| 25-37 | When to Use This Skill | +| 38-66 | Commands | +| 67-99 | Members Are Named, Not Typed | +| 100-122 | The Topic, and Why a Major Bump Is Expensive | +| 123-147 | What You Author, and What Is Computed | +| 148-165 | Version Policy — Inferred, Not Measured | +| 166-219 | Verifying the Whole Chain | +| 220-232 | Checklist | + + +# Change Data Capture + +## When to Use This Skill + +- Push entity data changes to a data lake, warehouse or any Kafka consumer +- Read what a project already streams, and to which topics +- Add or remove a tracked entity, attribute or association +- Work out why a topic is empty, or why its name changed + +CDC is **publish-only**. Mendix 11.16 has no model for subscribing to another +app's CDC stream — `ChangeDataCapture` has exactly one document type and no +consumed counterpart. To *read* another app's data, use `odata.consume` +(external entities), `rest.consumed`, or the external database connector +(`database-connection`, `sql.generate`) against whatever the lake exposes. + +## Commands + +```sql +mdl 1; +list change data capture services; +list change data capture services in MyModule; +describe change data capture service Module.OrdersCDCService; + +create or modify change data capture service Module.OrdersCDCService +( + ServiceName: 'OrdersCDCService' +) +{ + entity Module.Order ( + OrderId, + CustomerName, + Price as 'Amount', -- exposed name only when it differs + Order_Customer -- an association of this entity + ); + entity Module.Customer as 'Client' (CustomerId, Address); +}; + +drop change data capture service Module.OrdersCDCService; +``` + +**Needs Mendix 11.10+.** Below that the project cannot store the baseline +(`ChangeDataCapture$VersionedEntityChangeDataCaptureService`), and `check` +refuses with MDL-VERSION01 before anything is written. + +## Members Are Named, Not Typed + +A member resolves to an attribute **or** an association of that entity, and its +CDC type comes from the domain model. Attributes are looked at first; a name +that is both is a check error rather than a guess. + +| Mendix attribute type | CDC type | +|---|---| +| Binary, Boolean, DateTime, Decimal | the same name | +| Date | `DateTime` (Mendix has no date-only type) | +| Enumeration | `Enumeration` | +| Integer | `Int32` | +| Long, AutoNumber | `Int64` | +| String, HashedString | `String` | +| an association | `ArrayOfInt64` | + +Measured from Studio Pro's own CDC editor, which mxbuild ships as readable +JavaScript — not inferred. Those are every Mendix attribute type, so nothing is +unmappable. + +Two rules the editor enforces and so does `check`: + +- **`id` is implicit and must not be listed.** Studio Pro shows it as a checked, + disabled row but stores no property for it; the object id reaches a consumer + from the runtime's change envelope, not from the model. +- **An association is tracked from its FROM entity** — the one that owns the + foreign key. Naming it on the TO side is not something the model can express. + +Only **persistable** entities can be tracked. A view entity or an external +entity has no rows of its own, so there is nothing to capture; both are refused. +(A view entity reports `Persistable = true`, so the refusal is on its source, +not that flag.) + +## The Topic, and Why a Major Bump Is Expensive + +``` +cdc.... +``` + +Every segment but the last is a model value. `AppName` comes from the project +and is **not settable from MDL** — changing it would re-point every topic the +service publishes to. `` is the `BusinessEvents.EventBrokerSpace` +constant at runtime. + +So a **major version bump starts a new topic**, and downstream that is a new +table with no history. The same is true of renaming an entity's exposed name. +`describe` prints each source's revision next to its topic for exactly this +reason: + +``` +-- entity CdcPublish.Order +-- revision 1.1 topic cdc.TestApp.Order.1.{space} +-- attribute CdcPublish.Order.OrderId [Int64] +-- association CdcPublish.Order_Customer [ArrayOfInt64] +``` + +## What You Author, and What Is Computed + +Only the **live side**. The document also holds a **baseline** — the frozen copy +Studio Pro's *accept changes* writes — and mxcli rebuilds it from the domain +model on every write. You cannot author it, by design: + +the baseline identifies what it tracks by **GUID**, and the runtime keys +`mendixsystem$entity.id` and `mendixsystem$attribute.id` on those values. A +wrong GUID detaches an entity from its table and destroys its rows on the next +deploy, with no build error and nothing in a diff to see. A GUID an author could +write is a GUID an author could get wrong, so MDL has no syntax for one. + +Consequences worth knowing: + +- `create or modify` rebuilds the whole document, and storage elides the write + when the result matches what is stored — so re-running an unchanged script + reports `Unchanged`, not a churn. +- Running it over a **Studio Pro-authored** service also reports `Unchanged`: + mxcli's output is byte-identical to Studio Pro's. If it ever says `Modified` + on a service nobody touched, something has drifted — investigate rather than + accept it. +- mxbuild reports CE1585 when the two sides disagree, and CE1577 on an empty + `AppName`. An *absent* baseline is worse than either: `mx check` crashes with + `The given key '' was not present in the dictionary`. + +## Version Policy — Inferred, Not Measured + +On modify: + +| change to a source | result | +|---|---| +| nothing | keeps its stored version | +| a member added | minor + 1 | +| a member removed, an exposed name renamed, or a type changed | **major + 1**, minor 0 | +| a brand-new source | starts at 1.0, and does not bump the service | + +The service takes the largest bump any source took. + +**This rule is inferred from one Studio Pro document.** mxbuild ignores version +numbers entirely, so a wrong rule never fails a build — it quietly moves a +topic. If you can, add, rename and remove a property in Studio Pro, accept the +changes, and compare: a disagreement means this table is wrong. + +## Verifying the Whole Chain + +`mx check` passing proves the document is valid, not that anything is published. +For that you need a broker and a running app. Verified end to end against +[DuckGraphLake](https://github.com/ako/DuckGraphLake), which serves a Kafka +endpoint and writes each topic to an Iceberg table: + +```bash +duckgraphlake ~/lake +``` + +Two constants are **mandatory** — without either, the app does not merely +consume nothing, it **fails to boot** (`StartupBusinessEvents` throws in the +after-startup action): + +```bash +mxcli constant set BusinessEvents.ServerUrl 127.0.0.1:9092 -p app.mpr +``` + +```bash +mxcli constant set BusinessEvents.EventBrokerSpace local -p app.mpr +``` + +They are stored per-machine in gitignored `.mxcli/constants.json`, so nothing +reaches version control. + +```bash +mxcli run --local --detach --db-type hsqldb --runtime-setting Kafka.BootstrapServers=127.0.0.1:9092 -p app.mpr +``` + +Then commit a tracked object and look. The runtime publishes within a second: + +```bash +psql -h 127.0.0.1 -p 5433 -U lake -d lake -c 'select * from testapp."order"' +``` + +What the log should show, in order: + +``` +Change Data Capture Publisher: Elected as active producer - starting CDC producer worker +Change Data Capture Publisher: Snapshot decision: 2 entities to snapshot (2 changed, 0 forced) +``` + +Three things that cost time to learn: + +- **`--db-type hsqldb` is enough.** CDC publishes normally on it. The runtime + warns `SystemPropertyManager.supportsUpdate is false; snapshot overlap + protection is degraded` — that is not a failure and PostgreSQL is not needed. +- **A snapshot is sent once per revision.** The first boot against an empty + database snapshots nothing, and the next boot logs `skipping N unchanged`. Data + created before the app first ran against that broker never arrives: start with + an empty database, or a fresh lake folder. +- **Mendix 11.14+ needs JDK 25.** On 21 the runtime refuses to start. + +## Checklist + +- [ ] Project is Mendix 11.10 or later +- [ ] Every tracked entity is **persistable** — not a view or external entity +- [ ] `id` is not in any member list +- [ ] No two sources share an exposed name (they would share a topic) +- [ ] `AppName` is not in the property list +- [ ] After a modify, `describe` shows the revisions and topics you expect — a + major bump means a **new topic** and a new table downstream +- [ ] `mxcli check -p app.mpr` passes before `exec` +- [ ] Re-running an unchanged script reports `Unchanged` +- [ ] For a real check, boot the app against a broker and look for the rows; + a valid document publishes nothing if the two constants are unset diff --git a/.claude/skills/mendix/create-custom-widget/SKILL.md b/.claude/skills/mendix/create-custom-widget/SKILL.md index 7bc6ab05ed..ffdd2c3ff5 100644 --- a/.claude/skills/mendix/create-custom-widget/SKILL.md +++ b/.claude/skills/mendix/create-custom-widget/SKILL.md @@ -15,13 +15,13 @@ description: "Build a Mendix pluggable widget from scratch with React and TypeSc | 118-252 | Step 2: Define Widget Properties (widget.xml) | | 253-313 | Step 3: Write the Entry Component | | 314-339 | Step 4: Write the React Component | -| 340-368 | Step 5: Editor Config (optional but recommended) | -| 369-380 | Step 6: CSS Styles | -| 381-390 | Step 7: Build | -| 391-398 | Step 8: Install to Mendix Project | -| 399-422 | Common Widget Patterns | -| 423-435 | Checklist Before Build | -| 436-443 | Troubleshooting | +| 340-377 | Step 5: Editor Config (optional but recommended) | +| 378-389 | Step 6: CSS Styles | +| 390-399 | Step 7: Build | +| 400-407 | Step 8: Install to Mendix Project | +| 408-431 | Common Widget Patterns | +| 432-444 | Checklist Before Build | +| 445-452 | Troubleshooting | # Create Custom Pluggable Widget @@ -366,6 +366,15 @@ export function getProperties( } ``` +To hide a property, remove it from the returned tree, with the toolkit's +`hidePropertyIn` or a helper of your own. mxcli runs this function itself, for +both targets (`"web"` and `"desktop"`), to decide which properties `check` and +`exec` treat as hidden; a property counts as hidden only when both hide it, which +is what mxbuild enforces. A hidden property must hold its default, or the build fails with +CE0463. So keep the compiled bundle self-contained (no `require` at load time) and +the function synchronous: one that throws or takes longer than a second is ignored, +and mxcli falls back to the rules it can read from the source. + ## Step 6: CSS Styles ### src/ui/\.css diff --git a/.claude/skills/mendix/generate-domain-model/SKILL.md b/.claude/skills/mendix/generate-domain-model/SKILL.md index 2930088641..7c4a24c6fb 100644 --- a/.claude/skills/mendix/generate-domain-model/SKILL.md +++ b/.claude/skills/mendix/generate-domain-model/SKILL.md @@ -14,10 +14,10 @@ description: "Generate a complete Mendix domain model in MDL — entities, attri | 47-53 | When to Use This Skill | | 54-65 | Modelling for the client: widgets bind members, not expressions | | 66-102 | Documentation Best Practices | -| 103-235 | Step-by-Step Process | -| 236-254 | Checklist | -| 255-264 | References | -| 265-274 | Tips for AI Assistants | +| 103-236 | Step-by-Step Process | +| 237-255 | Checklist | +| 256-265 | References | +| 266-275 | Tips for AI Assistants | # Creating Mendix Domain Model MDL Scripts @@ -207,9 +207,10 @@ follow-up to offer: a diagram nobody laid out is the first thing a developer opening the app sees. `layout` is idempotent (a second run moves nothing) and lays out from the -association graph — lookups on the left, each entity one column past what it +association graph — each lookup just left of what uses it, each entity one column past what it references and on the row of the entity it is most linked to, with the gap between -columns wide enough for the association names. It **replaces every position in +columns wide enough for the association names, and re-attaches every association +line so it runs straight where it can. It **replaces every position in the module**: - **Module this script created, or that mxcli built before:** run it. diff --git a/.claude/skills/mendix/generate-domain-model/reference/syntax.md b/.claude/skills/mendix/generate-domain-model/reference/syntax.md index 8150ae0a18..14bf796b51 100644 --- a/.claude/skills/mendix/generate-domain-model/reference/syntax.md +++ b/.claude/skills/mendix/generate-domain-model/reference/syntax.md @@ -128,8 +128,8 @@ mxcli layout -p app.mpr --module MyModule --dry-run # see the moves mxcli layout -p app.mpr --module MyModule # apply ``` -That lays entities out from the association graph — lookups on the left, each -entity one column past the furthest thing it references, on the row of the +That lays entities out from the association graph — each lookup just left of +what uses it, each entity one column past the furthest thing it references, on the row of the entity it is most linked to — so the lines mostly run one way and straight across, with room between columns for the association names. It is idempotent (a second run moves nothing) and local (adding an entity later moves a handful, not the model). It REPLACES positions you set by diff --git a/.claude/skills/mendix/test-microflows/SKILL.md b/.claude/skills/mendix/test-microflows/SKILL.md index 7214f02fb4..2f9e53f8b0 100644 --- a/.claude/skills/mendix/test-microflows/SKILL.md +++ b/.claude/skills/mendix/test-microflows/SKILL.md @@ -18,12 +18,12 @@ description: "Write and run MDL-based microflow tests with `mxcli test` — anno | 249-272 | Running Tests | | 273-471 | How It Works | | 472-510 | Check a test file before you run it | -| 511-632 | Writing Good Tests | -| 633-647 | Test File Organization | -| 648-660 | Interpreting Failures | -| 661-682 | CI Integration | -| 683-689 | Related Skills | -| 690-694 | Warm test loop (`mxcli test --local [--watch]`, `--attach`, `run --local --test-endpoint`) | +| 511-633 | Writing Good Tests | +| 634-648 | Test File Organization | +| 649-661 | Interpreting Failures | +| 662-683 | CI Integration | +| 684-690 | Related Skills | +| 691-695 | Warm test loop (`mxcli test --local [--watch]`, `--attach`, `run --local --test-endpoint`) | # Test Microflows Skill @@ -606,9 +606,10 @@ call microflow Sales.ValidateOrder(Total = -1); Anything else after the tag is an error, not a message: `@throws not found` is refused rather than read as an unquoted one. -A call that already has its own `on error` clause keeps it — the runner adds -its handler only to calls without one, so the test runs the statement exactly as -production does: +The runner adds no error handler to the body: an error from any statement leaves +the test microflow and the endpoint reports it — FAIL `exception during +execution: …`, or PASS under a matching `@throws`. A call with its own `on error` +clause keeps it, so the test runs the statement exactly as production does: - `on error rollback` is Mendix's default spelled out and behaves like no clause: FAIL `exception during execution: …`, or PASS under a matching `@throws`. @@ -617,12 +618,12 @@ production does: - A custom handler that ends normally skips every statement reading the failed call's result — the assertions — so the test FAILs with `not every assertion was evaluated`. Assert on something the handler sets instead. -- A custom handler that re-raises lets the error leave the test: ERROR with the - message, also under `@throws`. Under Docker / `--legacy-runner` it ends the - whole run. +- A custom handler that re-raises lets the error leave the test, as no clause + does: FAIL with the message, or PASS under a matching `@throws`. Under Docker / + `--legacy-runner` it ends the whole run. `@throws` and `@expect` cannot be combined. A `@throws` test compiles to a -different shape — the verdict starts as a failure and only the error handler +different shape — the verdict starts as a failure and only a raised error clears it — and the `@expect` checks are not emitted into it at all, so the assertion was counted and never evaluated. There is nothing to assert on either way: the body was expected not to produce a result. Assert on the error with diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d162193d4..7a7fa29c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,17 +8,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added +- **Lint `MPR021`: a domain model line runs through an entity it does not connect** — an association (from its stored connection points), a generalization arrow, or a cross-module association, which Studio Pro always draws from the entity's left side to the diagram's edge. A warning; a line that only grazes an estimated box edge is not reported. On ako/PizzaV1: 27 findings as generated, 1 after `mxcli layout`. - **`@documentation 'text'` on a microflow or nanoflow statement** (ako/mxcli#2328) — an activity's, decision's or loop's documentation had no MDL spelling: describe left it out, so an activity replaced by `create or modify` lost it and the script could not carry it. Describe now prints it; a statement that leaves it out keeps the stored text, as it keeps the node's position. - **Lint `MPR020`: a domain model that was never laid out** — linked entities still on the grid slots mxcli gives an entity created without `@position`, the trace of a script that skipped `mxcli layout`. An **error**, so `mxcli lint` and `mxcli verify` fail on it where MPR016's warning let overlapping and tangled diagrams through. Hand-arranged diagrams are not reported (Studio Pro positions do not land on those exact coordinates), nor is (100, 100), nor any entity `mxcli layout` itself placed, so the command the finding names always clears it. - **`exec` says when a module it changed is not laid out** — `Domain model Shop is not laid out: 2 linked entities are on the default placement grid (Order, OrderLine). Run: mxcli layout --module Shop`, printed once per module at the end of the script, so the step is named when the script that needs it runs rather than only when the gate does. Not printed with `--quiet` or for Marketplace modules. +- **Lint `MPR022`: an agent document names a document the project does not have** (ako/mxcli#2265) — an agent's tool, knowledge base, MCP service, model or entity, or a model's, knowledge base's or MCP service's constant or microflow, by a name nothing in the project has. Studio Pro keeps these names in step itself, but `mx` and mxbuild never load its agent-editor extension, so a reference left stale by an edit made without Studio Pro passed `mx check` and the build and surfaced only when the project was opened. An error; needs the full catalog. ### Changed +- **`mxcli layout` puts unconnected entities beside the graph, not in a band under it** — entities with no association in their module went in a fixed band below everything; one tall helper (PizzaV1 Shop's TrackView, taller than the whole graph) doubled the diagram's height. They now fill the free space to the right of the graph or below it, wherever the diagram stays closest to a landscape screen, with their cross-module lines clear. PizzaV1 Shop: 3717 → 2408 px tall; PizzaChat 1216 → 728. +- **`mxcli layout` can put a lookup in its referrer's column** — a lookup that would have a column to itself may share its nearest referrer's column, directly above or below it, when that gives fewer crossings, or as many and a narrower diagram that is no taller, and never a new line through a box. PizzaV1 Catalog: Allergen with Ingredient, crossings 6 → 2, 317 px narrower. +- **`mxcli layout` orders each column for the fewest crossings, and reports them** — it swaps neighbouring entities within a column and keeps a swap whenever the result has fewer lines crossing lines or running through a box (strictly fewer, so it is never worse than before and stays deterministic), and prints `crossings A -> B (…; estimated)` for every module it changes. On ako/PizzaV1: Catalog 30 → 6, Fulfilment 13 → 3, Shop 30 → 8, from the generated grid. Phase 4 of `PROPOSAL_domain_model_readable_layout.md`. +- **`mxcli layout` puts a lookup next to what uses it** — an entity that references nothing in its module always went in the leftmost column, at the top, so a lookup used only by an entity several columns in had a long line across everything between, and after the cross-module bands pushed referrers down it was left high above them. A lookup now sits in the column just left of its nearest referrer and moves to the row of the entities referencing it where its column has room, without blocking any cross-module line. On ako/PizzaV1's Catalog, `Category` moves beside `Product`: 8 of 10 lines straight (was 6) and 160 px shorter. Adding an entity still moves only its own column and the band underneath. +- **`mxcli layout` keeps cross-module association lines out of other boxes** — Studio Pro draws a cross-module association from the left side of each of its entities straight to the diagram's left edge, through whatever is in the way, and its position cannot be changed. Layout now places each such entity (either end, so the other modules' associations count too) where all its lines and their labels are clear, and starts the leftmost column far enough right for those labels. On ako/PizzaV1, 28 of 39 cross-module lines ran through a box; none do now. Modules where most entities have cross-module associations get taller, each column stepping below the one to its left. MPR020 and the `exec` reminder judge against the same layout. Phase 3 of `PROPOSAL_domain_model_readable_layout.md`. +- **`mxcli layout` re-attaches every association line** — it moved entities but left each line's connection points (`ParentConnection` / `ChildConnection`) as stored, so a line pointed wherever it was dragged for the old positions, and Studio Pro's default of mid-height on both boxes slanted every line between boxes of different heights. Each end now attaches on the side facing the other box, straight across where the two boxes share a span and no other box is in the way, with several associations between one pair offset from each other and the remaining lines spread along their side in the order of their far ends. On ako/PizzaV1's Fulfilment the referrers of Order no longer meet at one point; nine of its twelve lines are straight. `--only-overlapping` keeps stored connection points. Phase 2 of `PROPOSAL_domain_model_readable_layout.md`. +- **Which pluggable widget properties are hidden is decided by running the widget's `editorConfig.js`** (ako/mxcli#1776, ako/mxcli#2507) — mxcli read the editor's hide logic from the bundle's source, which covered part of most widgets and none of a widget that hides through its own helper, and it took guards meant for Studio as applying in Studio Pro. It now runs the package's `getProperties` the way Studio Pro does, in an embedded JavaScript interpreter for the widget's actual settings (no file, network or process access; a call that takes more than a second is stopped). `check` now reports a hidden value it used to pass, such as Image's `iconSize` outside icon mode, which the build rejects with CE0463. `exec` stores a hidden text template as null, `describe`'s examples leave out what the editor hides, and a property shown in Studio Pro is no longer treated as hidden. An object-list item's properties still go by the rules read from the source. See ADR-0016. - **A bare `save changes` / `cancel changes` closes the page** (ako/mxcli#2536) — it stored ClosePage false, so a pop-up's Cancel left the pop-up open, while Studio Pro's default is to close (every save and cancel button in a Studio Pro-built app stores it). The bare form now closes; `with (ClosePage: false)` keeps the page open. `describe` prints both explicitly (`close page`, `with (ClosePage: false)`), so its output means the same to older versions. Scripts that relied on the bare form staying on the page need the setting. - **`mxcli layout` puts each entity on the row of the entity it is most linked to, and sizes each column gap to its association names** — before, every column was stacked from the top on its own, so most lines ran diagonally, and a fixed 90 px gap cut off any association name over ~10 characters in Studio Pro. On ako/PizzaV1's Catalog, Fulfilment, Shop and PizzaChat modules every horizontal line now has room for its label (16 of 16, against 1 of 16), and more lines run straight across; diagrams with long association names are wider. Phase 1 of `PROPOSAL_domain_model_readable_layout.md`. ### Fixed +- **`rename` and `move` update the agent documents that name what they rename** (ako/mxcli#2265) — an agent names its tools, model, entity and the rest inside one JSON string, which the reference sweep never looked into, so renaming or moving a tool microflow left the agent calling the old name and `dry run` did not list it. The sweep now rewrites those names, keeps each reference's document id, and lists the agent; a prompt that mentions the name is left as written. +- **check no longer refuses a Tree node's `advancedMode` on a web page** (ako/mxcli#2549) — since mxcli runs a widget's editorConfig (#2546) it asked it about Studio Pro's `"desktop"` target only, and Tree node hides `advancedMode` for every target but `"web"`, so `advancedMode: true` was refused although the page builds and renders. mxbuild enforces neither of a target's two branches (measured on 11.16.1), so a property now counts as hidden only when the widget hides it for both targets. + +- **`mxcli test --attach` runs tests that call a microflow** (ako/mxcli#2331, mendixlabs/mxcli#1874) — every call in a generated test microflow got an error handler that read the raised message into a variable, and mxbuild's incremental build rejects a variable used that way (CE0108, which a full build accepts), so `--attach` fell back to a full build it could not apply and ran nothing. The test microflows no longer carry such handlers: an error leaves the test microflow, the test endpoint reports its message, and the verdict is the same as before (FAIL `exception during execution: …`, or a matching `@throws` PASSes). An error from a statement other than a call — a `commit`, a `change` — is now that same FAIL rather than an ERROR, and a handler that re-raises counts for `@throws`. When the incremental build does report CE0108, mxcli now prints the document and message. + +- **describe → exec no longer rewrites pages for a widget's tab index or a label's parameters** (ako/mxcli#2106) — MDL states neither, so a round trip of an unchanged page reset a tab index Studio Pro stored (1 on a footer button, -1 on a combo box) to 0, and dropped the parameter of a check box labelled `'{1}'`, whose label would then read "{1}". Both are now kept from the stored page; measured on AgentCommons and MxGenAIConnector, whose pages came back rewritten and now report unchanged. +- **exec keeps a pluggable widget's labels that are hidden only while an attribute is unbound** (ako/mxcli#2548) — since the editorConfig of a widget is run to decide what is hidden (#2546), exec asked it with the widget's primitive settings only, so an attribute the statement binds looked unset, a rule like "hide the engine label while no evaluation attribute is set" fired, and the label the script set was stored empty. check, which asks with the whole configuration, said nothing. exec now asks with the same configuration as check. + +- **A Tree node without a data source fails with the error that names it** — mxcli stored its header caption template as null, which made mxbuild report CE0463 "the definition of this widget has changed" instead of CE0642 "Data source is required", the error check's MDL-WIDGET56 warning names. A template bound to a data source is now nulled only when that data source is optional, the case #1967 measured; a required one keeps the empty template Studio Pro writes. + - **Drop + create keeps a Studio Pro microflow's merges and loop boxes** (ako/mxcli#2369) — re-creating a flow from its own `describe` output recomputed every loop box (which then overlapped its neighbours, MPR008), shrank every merge from Studio Pro's 90×60 to 40×40, rebuilt a type split's merge on top of its first branch when one case returned, and made two stacked merges of a merge that closed both an `if` and the `if` nested in it. Describe now prints a size that is not the default — `@merge(x, y, w, h)`, and `@size(w, h)` on a loop, a `while true` loop-head merge or a `merge